Browse Source

Fix broken G29 W I J

Scott Lahteine 6 years ago
parent
commit
34160806c0
1 changed files with 7 additions and 2 deletions
  1. 7
    2
      Marlin/src/gcode/bedlevel/abl/G29.cpp

+ 7
- 2
Marlin/src/gcode/bedlevel/abl/G29.cpp View File

260
 
260
 
261
     #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
261
     #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
262
 
262
 
263
-      if (parser.seen('W')) {
263
+      const bool seen_w = parser.seen('W');
264
+      if (seen_w) {
264
         if (!leveling_is_valid()) {
265
         if (!leveling_is_valid()) {
265
           SERIAL_ERROR_START();
266
           SERIAL_ERROR_START();
266
           SERIAL_ERRORLNPGM("No bilinear grid");
267
           SERIAL_ERRORLNPGM("No bilinear grid");
298
         return;
299
         return;
299
       } // parser.seen('W')
300
       } // parser.seen('W')
300
 
301
 
302
+    #else
303
+
304
+      constexpr bool seen_w = false;
305
+
301
     #endif
306
     #endif
302
 
307
 
303
     // Jettison bed leveling data
308
     // Jettison bed leveling data
304
-    if (parser.seen('J')) {
309
+    if (!seen_w && parser.seen('J')) {
305
       reset_bed_level();
310
       reset_bed_level();
306
       return;
311
       return;
307
     }
312
     }

Loading…
Cancel
Save