Browse Source

misc. UBL fixes (#6631)

* Restore LSF functionality

Some of the typo's persisted...   Hopefully this gets them all fixed.

* Restore user's expectations of how G28 should behave

* Allow Nozzle size control with ornery host programs
Roxy-3D 7 years ago
parent
commit
d92fa40c62
3 changed files with 11 additions and 4 deletions
  1. 2
    1
      Marlin/G26_Mesh_Validation_Tool.cpp
  2. 6
    0
      Marlin/Marlin_main.cpp
  3. 3
    3
      Marlin/least_squares_fit.cpp

+ 2
- 1
Marlin/G26_Mesh_Validation_Tool.cpp View File

92
    *        un-retraction is at 1.2mm   These numbers will be scaled by the specified amount
92
    *        un-retraction is at 1.2mm   These numbers will be scaled by the specified amount
93
    *
93
    *
94
    *   N #  Nozzle    Used to control the size of nozzle diameter.  If not specified, a .4mm nozzle is assumed.
94
    *   N #  Nozzle    Used to control the size of nozzle diameter.  If not specified, a .4mm nozzle is assumed.
95
+   *        'n' can be used instead if your host program does not appreciate you using 'N'.
95
    *
96
    *
96
    *   O #  Ooooze    How much your nozzle will Ooooze filament while getting in position to print.  This
97
    *   O #  Ooooze    How much your nozzle will Ooooze filament while getting in position to print.  This
97
    *        is over kill, but using this parameter will let you get the very first 'cicle' perfect
98
    *        is over kill, but using this parameter will let you get the very first 'cicle' perfect
674
       }
675
       }
675
     }
676
     }
676
 
677
 
677
-    if (code_seen('N')) {
678
+    if (code_seen('N') || code_seen('n')) {
678
       nozzle = code_value_float();
679
       nozzle = code_value_float();
679
       if (!WITHIN(nozzle, 0.1, 1.0)) {
680
       if (!WITHIN(nozzle, 0.1, 1.0)) {
680
         SERIAL_PROTOCOLLNPGM("?Specified nozzle size not plausible.");
681
         SERIAL_PROTOCOLLNPGM("?Specified nozzle size not plausible.");

+ 6
- 0
Marlin/Marlin_main.cpp View File

3741
 
3741
 
3742
   // Disable the leveling matrix before homing
3742
   // Disable the leveling matrix before homing
3743
   #if HAS_LEVELING
3743
   #if HAS_LEVELING
3744
+    #if ENABLED(AUTO_BED_LEVELING_UBL)
3745
+      const bool bed_leveling_state_at_entry = ubl.state.active;
3746
+    #endif
3744
     set_bed_leveling_enabled(false);
3747
     set_bed_leveling_enabled(false);
3745
   #endif
3748
   #endif
3746
 
3749
 
3882
     // move to a height where we can use the full xy-area
3885
     // move to a height where we can use the full xy-area
3883
     do_blocking_move_to_z(delta_clip_start_height);
3886
     do_blocking_move_to_z(delta_clip_start_height);
3884
   #endif
3887
   #endif
3888
+  #if ENABLED(AUTO_BED_LEVELING_UBL)
3889
+    set_bed_leveling_enabled(bed_leveling_state_at_entry);
3890
+  #endif
3885
 
3891
 
3886
   clean_up_after_endstop_or_probe_move();
3892
   clean_up_after_endstop_or_probe_move();
3887
 
3893
 

+ 3
- 3
Marlin/least_squares_fit.cpp View File

52
   lsf->x2bar += sq(x);
52
   lsf->x2bar += sq(x);
53
   lsf->y2bar += sq(y);
53
   lsf->y2bar += sq(y);
54
   lsf->z2bar += sq(z);
54
   lsf->z2bar += sq(z);
55
-  lsf->xybar += sq(x);
56
-  lsf->xzbar += sq(x);
57
-  lsf->yzbar += sq(y);
55
+  lsf->xybar += x*y;
56
+  lsf->xzbar += x*z;
57
+  lsf->yzbar += y*z;
58
   lsf->max_absx = max(fabs(x), lsf->max_absx);
58
   lsf->max_absx = max(fabs(x), lsf->max_absx);
59
   lsf->max_absy = max(fabs(y), lsf->max_absy);
59
   lsf->max_absy = max(fabs(y), lsf->max_absy);
60
   lsf->n++;
60
   lsf->n++;

Loading…
Cancel
Save