Merge pull request #9774 from thinkyhead/bf1_g28_restore_leveling

[1.1.x] Add RESTORE_LEVELING_AFTER_G28 option
This commit is contained in:
Scott Lahteine 2018-02-23 13:43:03 -06:00 committed by GitHub
commit 1c1d444b0c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
55 changed files with 320 additions and 6 deletions

View file

@ -3968,8 +3968,8 @@ inline void gcode_G28(const bool always_home_all) {
// Disable the leveling matrix before homing
#if HAS_LEVELING
#if ENABLED(AUTO_BED_LEVELING_UBL)
const bool ubl_state_at_entry = planner.leveling_active;
#if ENABLED(RESTORE_LEVELING_AFTER_G28)
const bool leveling_state_at_entry = planner.leveling_active;
#endif
set_bed_leveling_enabled(false);
#endif
@ -4104,8 +4104,8 @@ inline void gcode_G28(const bool always_home_all) {
do_blocking_move_to_z(delta_clip_start_height);
#endif
#if ENABLED(AUTO_BED_LEVELING_UBL)
set_bed_leveling_enabled(ubl_state_at_entry);
#if ENABLED(RESTORE_LEVELING_AFTER_G28)
set_bed_leveling_enabled(leveling_state_at_entry);
#endif
clean_up_after_endstop_or_probe_move();