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,7 +260,8 @@ void GcodeSuite::G29() {
260 260
 
261 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 265
         if (!leveling_is_valid()) {
265 266
           SERIAL_ERROR_START();
266 267
           SERIAL_ERRORLNPGM("No bilinear grid");
@@ -298,10 +299,14 @@ void GcodeSuite::G29() {
298 299
         return;
299 300
       } // parser.seen('W')
300 301
 
302
+    #else
303
+
304
+      constexpr bool seen_w = false;
305
+
301 306
     #endif
302 307
 
303 308
     // Jettison bed leveling data
304
-    if (parser.seen('J')) {
309
+    if (!seen_w && parser.seen('J')) {
305 310
       reset_bed_level();
306 311
       return;
307 312
     }

Loading…
Cancel
Save