Fix broken G29 W I J

This commit is contained in:
Scott Lahteine 2018-02-01 03:19:30 -06:00
parent b0f148f7db
commit b78cccad0f

View File

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