Browse Source

Extra debugging for leveling on/off

Scott Lahteine 5 years ago
parent
commit
b7a67f6f74

+ 0
- 1
Marlin/src/HAL/HAL_LPC1768/watchdog.cpp View File

@@ -68,5 +68,4 @@ bool watchdog_timed_out() { return TEST(WDT_ReadTimeOutFlag(), 0); }
68 68
 void watchdog_clear_timeout_flag() { WDT_ClrTimeOutFlag(); }
69 69
 
70 70
 #endif // USE_WATCHDOG
71
-
72 71
 #endif // TARGET_LPC1768

+ 7
- 3
Marlin/src/feature/bedlevel/bedlevel.cpp View File

@@ -86,14 +86,18 @@ void set_bed_leveling_enabled(const bool enable/*=true*/) {
86 86
     #endif
87 87
 
88 88
     if (planner.leveling_active) {      // leveling from on to off
89
+      if (DEBUGGING(LEVELING)) DEBUG_POS("Leveling ON", current_position);
89 90
       // change unleveled current_position to physical current_position without moving steppers.
90 91
       planner.apply_leveling(current_position);
91 92
       planner.leveling_active = false;  // disable only AFTER calling apply_leveling
93
+      if (DEBUGGING(LEVELING)) DEBUG_POS("...Now OFF", current_position);
92 94
     }
93 95
     else {                              // leveling from off to on
96
+      if (DEBUGGING(LEVELING)) DEBUG_POS("Leveling OFF", current_position);
94 97
       planner.leveling_active = true;   // enable BEFORE calling unapply_leveling, otherwise ignored
95 98
       // change physical current_position to unleveled current_position without moving steppers.
96 99
       planner.unapply_leveling(current_position);
100
+      if (DEBUGGING(LEVELING)) DEBUG_POS("...Now ON", current_position);
97 101
     }
98 102
 
99 103
     sync_plan_position();
@@ -180,7 +184,7 @@ void reset_bed_level() {
180 184
     #endif
181 185
     for (uint8_t y = 0; y < sy; y++) {
182 186
       #ifdef SCAD_MESH_OUTPUT
183
-        SERIAL_ECHOPGM(" [");           // open sub-array
187
+        SERIAL_ECHOPGM(" [");             // open sub-array
184 188
       #else
185 189
         if (y < 10) SERIAL_CHAR(' ');
186 190
         SERIAL_ECHO(int(y));
@@ -207,13 +211,13 @@ void reset_bed_level() {
207 211
         #endif
208 212
       }
209 213
       #ifdef SCAD_MESH_OUTPUT
210
-        SERIAL_CHAR(' ', ']');                    // close sub-array
214
+        SERIAL_CHAR(' ', ']');            // close sub-array
211 215
         if (y < sy - 1) SERIAL_CHAR(',');
212 216
       #endif
213 217
       SERIAL_EOL();
214 218
     }
215 219
     #ifdef SCAD_MESH_OUTPUT
216
-      SERIAL_ECHOPGM("];");                       // close 2D array
220
+      SERIAL_ECHOPGM("];");               // close 2D array
217 221
     #endif
218 222
     SERIAL_EOL();
219 223
   }

Loading…
Cancel
Save