Merge pull request #9434 from thinkyhead/bf1_fix_G29_W_I_J_Z

[1.1.x] Fix broken G29 W I J
This commit is contained in:
Scott Lahteine 2018-02-01 21:53:10 -06:00 committed by GitHub
commit ec9a5b7157
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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