|
@@ -36,6 +36,7 @@
|
36
|
36
|
|
37
|
37
|
#include "menu_item.h"
|
38
|
38
|
#include "menu_addon.h"
|
|
39
|
+#include "../../gcode/queue.h"
|
39
|
40
|
#include "../../module/motion.h"
|
40
|
41
|
#include "../../module/planner.h"
|
41
|
42
|
#include "../../module/probe.h"
|
|
@@ -120,22 +121,32 @@ void probe_offset_wizard_menu() {
|
120
|
121
|
END_MENU();
|
121
|
122
|
}
|
122
|
123
|
|
123
|
|
-void goto_probe_offset_wizard() {
|
124
|
|
- ui.defer_status_screen();
|
125
|
|
-
|
126
|
|
- prepare_for_calibration();
|
|
124
|
+#ifdef PROBE_OFFSET_WIZARD_XY_POS
|
|
125
|
+
|
|
126
|
+ #define HAS_PROBE_OFFSET_WIZARD_XY_POS 1
|
|
127
|
+
|
|
128
|
+ inline void goto_probe_offset_wizard() {
|
|
129
|
+ if (ui.wait_for_move) return;
|
|
130
|
+ constexpr xy_pos_t wizard_pos = PROBE_OFFSET_WIZARD_XY_POS;
|
|
131
|
+ current_position = wizard_pos;
|
|
132
|
+ ui.wait_for_move = true;
|
|
133
|
+ line_to_current_position(MMM_TO_MMS(HOMING_FEEDRATE_XY)); // Could invoke idle()
|
|
134
|
+ ui.wait_for_move = false;
|
|
135
|
+ ui.synchronize();
|
|
136
|
+ prepare_for_calibration();
|
|
137
|
+ probe.offset.z = PROBE_OFFSET_START;
|
|
138
|
+ ui.goto_screen(probe_offset_wizard_menu);
|
|
139
|
+ ui.defer_status_screen();
|
|
140
|
+ }
|
127
|
141
|
|
128
|
|
- probe.offset.z = PROBE_OFFSET_START;
|
|
142
|
+#endif
|
129
|
143
|
|
130
|
|
- set_all_unhomed();
|
|
144
|
+void home_and_goto_probe_offset_wizard() {
|
131
|
145
|
queue.inject_P(G28_STR);
|
132
|
|
-
|
133
|
146
|
ui.goto_screen([]{
|
134
|
147
|
_lcd_draw_homing();
|
135
|
|
- if (all_axes_homed()) {
|
136
|
|
- ui.goto_screen(probe_offset_wizard_menu);
|
137
|
|
- ui.defer_status_screen();
|
138
|
|
- }
|
|
148
|
+ if (all_axes_homed())
|
|
149
|
+ ui.goto_screen(TERN(HAS_PROBE_OFFSET_WIZARD_XY_POS, goto_probe_offset_wizard, probe_offset_wizard_menu));
|
139
|
150
|
});
|
140
|
151
|
}
|
141
|
152
|
|