|
@@ -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
|
}
|