Scott Lahteine пре 7 година
родитељ
комит
4857a3ba48
4 измењених фајлова са 14 додато и 14 уклоњено
  1. 2
    2
      Marlin/Marlin_main.cpp
  2. 2
    2
      Marlin/mesh_bed_leveling.h
  3. 8
    8
      Marlin/planner.cpp
  4. 2
    2
      Marlin/ultralcd.cpp

+ 2
- 2
Marlin/Marlin_main.cpp Прегледај датотеку

@@ -6081,7 +6081,7 @@ inline void gcode_M17() {
6081 6081
       stepper.synchronize();
6082 6082
     }
6083 6083
 
6084
-    #if ENABLED(ULTIPANEL) && defined(ADVANCED_PAUSE_EXTRUDE_LENGTH) && ADVANCED_PAUSE_EXTRUDE_LENGTH > 0
6084
+    #if ENABLED(ULTIPANEL) && ADVANCED_PAUSE_EXTRUDE_LENGTH > 0
6085 6085
 
6086 6086
       float extrude_length = initial_extrude_length;
6087 6087
 
@@ -7675,7 +7675,7 @@ inline void gcode_M18_M84() {
7675 7675
       if (parser.seen('X')) disable_X();
7676 7676
       if (parser.seen('Y')) disable_Y();
7677 7677
       if (parser.seen('Z')) disable_Z();
7678
-      #if E0_ENABLE_PIN != X_ENABLE_PIN && E1_ENABLE_PIN != Y_ENABLE_PIN // Only enable on boards that have seperate ENABLE_PINS
7678
+      #if E0_ENABLE_PIN != X_ENABLE_PIN && E1_ENABLE_PIN != Y_ENABLE_PIN // Only enable on boards that have separate ENABLE_PINS
7679 7679
         if (parser.seen('E')) disable_e_steppers();
7680 7680
       #endif
7681 7681
     }

+ 2
- 2
Marlin/mesh_bed_leveling.h Прегледај датотеку

@@ -94,8 +94,8 @@
94 94
     }
95 95
 
96 96
     static float calc_z0(const float &a0, const float &a1, const float &z1, const float &a2, const float &z2) {
97
-      const float delta_z = (z2 - z1) / (a2 - a1);
98
-      const float delta_a = a0 - a1;
97
+      const float delta_z = (z2 - z1) / (a2 - a1),
98
+                  delta_a = a0 - a1;
99 99
       return z1 + delta_a * delta_z;
100 100
     }
101 101
 

+ 8
- 8
Marlin/planner.cpp Прегледај датотеку

@@ -534,10 +534,10 @@ void Planner::check_axes_activity() {
534 534
       if (!ubl.state.active) return;
535 535
       #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
536 536
         // if z_fade_height enabled (nonzero) and raw_z above it, no leveling required
537
-        if ((planner.z_fade_height) && (planner.z_fade_height <= RAW_Z_POSITION(lz))) return;
537
+        if (planner.z_fade_height && planner.z_fade_height <= RAW_Z_POSITION(lz)) return;
538 538
         lz += ubl.state.z_offset + ubl.get_z_correction(lx, ly) * ubl.fade_scaling_factor_for_z(lz);
539 539
       #else // no fade
540
-        lz += ubl.state.z_offset + ubl.get_z_correction(lx,ly);
540
+        lz += ubl.state.z_offset + ubl.get_z_correction(lx, ly);
541 541
       #endif // FADE
542 542
     #endif // UBL
543 543
 
@@ -598,10 +598,10 @@ void Planner::check_axes_activity() {
598 598
 
599 599
       if (ubl.state.active) {
600 600
 
601
-        const float z_physical = RAW_Z_POSITION(logical[Z_AXIS]);
602
-        const float z_ublmesh  = ubl.get_z_correction(logical[X_AXIS], logical[Y_AXIS]);
603
-        const float z_virtual  = z_physical - ubl.state.z_offset - z_ublmesh;
604
-              float z_logical  = LOGICAL_Z_POSITION(z_virtual);
601
+        const float z_physical = RAW_Z_POSITION(logical[Z_AXIS]),
602
+                    z_correct = ubl.get_z_correction(logical[X_AXIS], logical[Y_AXIS]),
603
+                    z_virtual = z_physical - ubl.state.z_offset - z_correct;
604
+              float z_logical = LOGICAL_Z_POSITION(z_virtual);
605 605
 
606 606
         #if ENABLED(ENABLE_LEVELING_FADE_HEIGHT)
607 607
 
@@ -614,10 +614,10 @@ void Planner::check_axes_activity() {
614 614
           //    so L=(P-O-M)/(1-M/H) for L<H
615 615
 
616 616
           if (planner.z_fade_height) {
617
-            if (z_logical < planner.z_fade_height )
618
-              z_logical = z_logical / (1.0 - (z_ublmesh * planner.inverse_z_fade_height));
619 617
             if (z_logical >= planner.z_fade_height)
620 618
               z_logical = LOGICAL_Z_POSITION(z_physical - ubl.state.z_offset);
619
+            else
620
+              z_logical /= 1.0 - z_correct * planner.inverse_z_fade_height;
621 621
           }
622 622
 
623 623
         #endif // ENABLE_LEVELING_FADE_HEIGHT

+ 2
- 2
Marlin/ultralcd.cpp Прегледај датотеку

@@ -1018,8 +1018,8 @@ void kill_screen(const char* lcd_msg) {
1018 1018
 
1019 1019
   #if ENABLED(AUTO_BED_LEVELING_UBL)
1020 1020
 
1021
-    float mesh_edit_value, mesh_edit_accumulator; // We round mesh_edit_value to 2.5 decimal places.  So we keep a
1022
-                                                  // seperate value that doesn't lose precision.
1021
+    float mesh_edit_value, mesh_edit_accumulator; // We round mesh_edit_value to 2.5 decimal places. So we keep a
1022
+                                                  // separate value that doesn't lose precision.
1023 1023
     static int ubl_encoderPosition = 0;
1024 1024
 
1025 1025
     static void _lcd_mesh_fine_tune(const char* msg) {

Loading…
Откажи
Сачувај