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
 void watchdog_clear_timeout_flag() { WDT_ClrTimeOutFlag(); }
68
 void watchdog_clear_timeout_flag() { WDT_ClrTimeOutFlag(); }
69
 
69
 
70
 #endif // USE_WATCHDOG
70
 #endif // USE_WATCHDOG
71
-
72
 #endif // TARGET_LPC1768
71
 #endif // TARGET_LPC1768

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

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

Loading…
Cancel
Save