Use planner.leveling_active for all leveling systems

This commit is contained in:
Scott Lahteine
2017-10-13 17:21:25 -05:00
parent 32c607ffe2
commit 3e3911fb81
21 changed files with 143 additions and 180 deletions

View File

@@ -157,7 +157,7 @@ void GcodeSuite::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 = LEVELING_IS_ACTIVE();
const bool ubl_state_at_entry = planner.leveling_active;
#endif
set_bed_leveling_enabled(false);
#endif

View File

@@ -119,7 +119,7 @@ void GcodeSuite::M48() {
// Disable bed level correction in M48 because we want the raw data when we probe
#if HAS_LEVELING
const bool was_enabled = LEVELING_IS_ACTIVE();
const bool was_enabled = planner.leveling_active;
set_bed_leveling_enabled(false);
#endif