Fix Tramming Wizard behavior (#20796)

This commit is contained in:
zeleps
2021-01-17 07:08:48 +02:00
committed by GitHub
parent fb41413b76
commit 1b19eed195
4 changed files with 14 additions and 6 deletions

View File

@ -241,7 +241,7 @@ void GcodeSuite::G28() {
// Disable the leveling matrix before homing
#if HAS_LEVELING
IF_ENABLED(RESTORE_LEVELING_AFTER_G28, const bool leveling_restore_state = planner.leveling_active);
const bool leveling_restore_state = parser.boolval('L', TERN(RESTORE_LEVELING_AFTER_G28, planner.leveling_active, ENABLED(ENABLE_LEVELING_AFTER_G28)));
IF_ENABLED(PROBE_MANUALLY, g29_in_progress = false); // Cancel the active G29 session
set_bed_leveling_enabled(false);
#endif
@ -440,8 +440,7 @@ void GcodeSuite::G28() {
do_blocking_move_to_z(delta_clip_start_height);
#endif
IF_ENABLED(RESTORE_LEVELING_AFTER_G28, set_bed_leveling_enabled(leveling_restore_state));
IF_ENABLED(ENABLE_LEVELING_AFTER_G28, set_bed_leveling_enabled(true));
TERN_(HAS_LEVELING, set_bed_leveling_enabled(leveling_restore_state));
restore_feedrate_and_scaling();