Browse Source

Fix G28 leveling state, UBL compile (#20499)

vanilla_fb_2.0.x
Tanguy Pruvot 4 years ago
committed by GitHub
parent
commit
c559fc8227
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      Marlin/src/gcode/calibrate/G28.cpp
  2. 1
      Marlin/src/inc/Conditionals_LCD.h
  3. 2
      Marlin/src/inc/SanityCheck.h

7
Marlin/src/gcode/calibrate/G28.cpp

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

1
Marlin/src/inc/Conditionals_LCD.h

@ -886,6 +886,7 @@
#if !HAS_LEVELING #if !HAS_LEVELING
#undef PROBE_MANUALLY #undef PROBE_MANUALLY
#undef RESTORE_LEVELING_AFTER_G28 #undef RESTORE_LEVELING_AFTER_G28
#undef ENABLE_LEVELING_AFTER_G28
#endif #endif
#ifdef GRID_MAX_POINTS_X #ifdef GRID_MAX_POINTS_X

2
Marlin/src/inc/SanityCheck.h

@ -1455,8 +1455,6 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#error "AUTO_BED_LEVELING_UBL requires EEPROM_SETTINGS." #error "AUTO_BED_LEVELING_UBL requires EEPROM_SETTINGS."
#elif !WITHIN(GRID_MAX_POINTS_X, 3, 15) || !WITHIN(GRID_MAX_POINTS_Y, 3, 15) #elif !WITHIN(GRID_MAX_POINTS_X, 3, 15) || !WITHIN(GRID_MAX_POINTS_Y, 3, 15)
#error "GRID_MAX_POINTS_[XY] must be a whole number between 3 and 15." #error "GRID_MAX_POINTS_[XY] must be a whole number between 3 and 15."
#elif !defined(RESTORE_LEVELING_AFTER_G28) && !defined(ENABLE_LEVELING_AFTER_G28)
#error "AUTO_BED_LEVELING_UBL used to enable RESTORE_LEVELING_AFTER_G28. To keep this behavior enable RESTORE_LEVELING_AFTER_G28. Otherwise define it as 'false'."
#endif #endif
#elif HAS_ABL_NOT_UBL #elif HAS_ABL_NOT_UBL

Loading…
Cancel
Save