41
41
42
42
void _goto_manual_move_z (const_float_t );
43
43
44
- // Global storage
44
+ // Global storage - TODO: Keep wizard/process data in a 'ui.scratch' union.
45
45
float z_offset_backup, calculated_z_offset, z_offset_ref;
46
46
47
+ // "Done" - Set the offset, re-enable leveling, go back to the previous screen.
47
48
void set_offset_and_go_back (const_float_t z) {
48
49
probe.offset .z = z;
49
50
SET_SOFT_ENDSTOP_LOOSE (false );
50
51
TERN_ (HAS_LEVELING, set_bed_leveling_enabled (menu_leveling_was_active));
51
52
ui.goto_previous_screen_no_defer ();
52
53
}
53
54
55
+ /* *
56
+ * @fn probe_offset_wizard_menu
57
+ * @brief Display a menu to Move Z, Cancel, or signal Done
58
+ */
54
59
void probe_offset_wizard_menu () {
55
60
START_MENU ();
56
61
calculated_z_offset = probe.offset .z + current_position.z - z_offset_ref;
@@ -88,6 +93,16 @@ void probe_offset_wizard_menu() {
88
93
END_MENU ();
89
94
}
90
95
96
+ /* *
97
+ * @fn prepare_for_probe_offset_wizard
98
+ * @brief Prepare the Probe Offset Wizard to do user interaction.
99
+ * @description
100
+ * 1. Probe a defined point (or the center) for an initial Probe Reference Z (relative to the homed Z0).
101
+ * (When homing with the probe, this Z0 is suspect until 'M851 Z' is properly tuned.
102
+ * When homing with a Z endstop Z0 is suspect until M206 is properly tuned.)
103
+ * 2. Stow the probe and move the nozzle over the probed point.
104
+ * 3. Go to the probe_offset_wizard_menu() screen for Z position adjustment to acquire Z0.
105
+ */
91
106
void prepare_for_probe_offset_wizard () {
92
107
#if defined(PROBE_OFFSET_WIZARD_XY_POS) || !HOMING_Z_WITH_PROBE
93
108
if (ui.should_draw ()) MenuItem_static::draw (1 , GET_TEXT_F (MSG_PROBE_WIZARD_PROBING));
@@ -126,6 +141,8 @@ void prepare_for_probe_offset_wizard() {
126
141
ui.defer_status_screen ();
127
142
}
128
143
144
+ // Set up the wizard, initiate homing with "Homing XYZ" message.
145
+ // When homing is completed go to prepare_for_probe_offset_wizard().
129
146
void goto_probe_offset_wizard () {
130
147
ui.defer_status_screen ();
131
148
set_all_unhomed ();
@@ -146,6 +163,7 @@ void goto_probe_offset_wizard() {
146
163
// Home all axes
147
164
queue.inject_P (G28_STR);
148
165
166
+ // Show "Homing XYZ" display until homing completes
149
167
ui.goto_screen ([]{
150
168
_lcd_draw_homing ();
151
169
if (all_axes_homed ()) {
0 commit comments