48
48
float z_offset_backup, calculated_z_offset;
49
49
50
50
TERN_ (HAS_LEVELING, bool leveling_was_active);
51
+ TERN_ (HAS_SOFTWARE_ENDSTOPS, bool store_soft_endstops_enabled);
51
52
52
53
void prepare_for_calibration () {
53
54
z_offset_backup = probe.offset .z ;
54
55
55
56
// Disable soft endstops for free Z movement
56
- SET_SOFT_ENDSTOP_LOOSE (true );
57
+ #if HAS_SOFTWARE_ENDSTOPS
58
+ store_soft_endstops_enabled = soft_endstops_enabled;
59
+ soft_endstops_enabled = false ;
60
+ #endif
57
61
58
62
// Disable leveling for raw planner motion
59
63
#if HAS_LEVELING
@@ -64,7 +68,7 @@ void prepare_for_calibration() {
64
68
65
69
void set_offset_and_go_back (const float &z) {
66
70
probe.offset .z = z;
67
- SET_SOFT_ENDSTOP_LOOSE ( false );
71
+ TERN_ (HAS_SOFTWARE_ENDSTOPS, soft_endstops_enabled = store_soft_endstops_enabled );
68
72
TERN_ (HAS_LEVELING, set_bed_leveling_enabled (leveling_was_active));
69
73
ui.goto_previous_screen_no_defer ();
70
74
}
@@ -90,7 +94,7 @@ void probe_offset_wizard_menu() {
90
94
if ((SHORT_MANUAL_Z_MOVE) > 0 .0f && (SHORT_MANUAL_Z_MOVE) < 0 .1f ) {
91
95
extern const char NUL_STR[];
92
96
SUBMENU_P (NUL_STR, []{ _goto_manual_move_z (float (SHORT_MANUAL_Z_MOVE)); });
93
- MENU_ITEM_ADDON_START (0 + ENABLED (HAS_MARLINUI_HD44780 ));
97
+ MENU_ITEM_ADDON_START (0 + ENABLED (HAS_CHARACTER_LCD ));
94
98
char tmp[20 ], numstr[10 ];
95
99
// Determine digits needed right of decimal
96
100
const uint8_t digs = !UNEAR_ZERO ((SHORT_MANUAL_Z_MOVE) * 1000 - int ((SHORT_MANUAL_Z_MOVE) * 1000 )) ? 4 :
0 commit comments