Fix broken G29 W I J

This commit is contained in:
Scott Lahteine 2018-02-01 03:17:42 -06:00
parent f5cfdf6efe
commit 34160806c0

View file

@ -260,7 +260,8 @@ void GcodeSuite::G29() {
#if ENABLED(AUTO_BED_LEVELING_BILINEAR) #if ENABLED(AUTO_BED_LEVELING_BILINEAR)
if (parser.seen('W')) { const bool seen_w = parser.seen('W');
if (seen_w) {
if (!leveling_is_valid()) { if (!leveling_is_valid()) {
SERIAL_ERROR_START(); SERIAL_ERROR_START();
SERIAL_ERRORLNPGM("No bilinear grid"); SERIAL_ERRORLNPGM("No bilinear grid");
@ -298,10 +299,14 @@ void GcodeSuite::G29() {
return; return;
} // parser.seen('W') } // parser.seen('W')
#else
constexpr bool seen_w = false;
#endif #endif
// Jettison bed leveling data // Jettison bed leveling data
if (parser.seen('J')) { if (!seen_w && parser.seen('J')) {
reset_bed_level(); reset_bed_level();
return; return;
} }