Add loose soft endstop state, apply to UBL fine-tune (#19681)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
f5139f8bf4
commit
193c0a52d9
@@ -48,16 +48,12 @@
|
||||
float z_offset_backup, calculated_z_offset;
|
||||
|
||||
TERN_(HAS_LEVELING, bool leveling_was_active);
|
||||
TERN_(HAS_SOFTWARE_ENDSTOPS, bool store_soft_endstops_enabled);
|
||||
|
||||
void prepare_for_calibration() {
|
||||
z_offset_backup = probe.offset.z;
|
||||
|
||||
// Disable soft endstops for free Z movement
|
||||
#if HAS_SOFTWARE_ENDSTOPS
|
||||
store_soft_endstops_enabled = soft_endstops_enabled;
|
||||
soft_endstops_enabled = false;
|
||||
#endif
|
||||
SET_SOFT_ENDSTOP_LOOSE(true);
|
||||
|
||||
// Disable leveling for raw planner motion
|
||||
#if HAS_LEVELING
|
||||
@@ -68,7 +64,7 @@ void prepare_for_calibration() {
|
||||
|
||||
void set_offset_and_go_back(const float &z) {
|
||||
probe.offset.z = z;
|
||||
TERN_(HAS_SOFTWARE_ENDSTOPS, soft_endstops_enabled = store_soft_endstops_enabled);
|
||||
SET_SOFT_ENDSTOP_LOOSE(false);
|
||||
TERN_(HAS_LEVELING, set_bed_leveling_enabled(leveling_was_active));
|
||||
ui.goto_previous_screen_no_defer();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user