Fix DELTA_CALIBRATION_MENU recursive call (#16656)
This commit is contained in:
parent
838a420e27
commit
95d5a0c480
@ -247,7 +247,7 @@ void reset_bed_level() {
|
||||
current_position = pos;
|
||||
|
||||
#if ENABLED(LCD_BED_LEVELING)
|
||||
ui.wait_for_bl_move = false;
|
||||
ui.wait_for_move = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -508,7 +508,7 @@ G29_TYPE GcodeSuite::G29() {
|
||||
set_bed_leveling_enabled(abl_should_enable);
|
||||
g29_in_progress = false;
|
||||
#if ENABLED(LCD_BED_LEVELING)
|
||||
ui.wait_for_bl_move = false;
|
||||
ui.wait_for_move = false;
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -810,7 +810,7 @@ G29_TYPE GcodeSuite::G29() {
|
||||
#if ENABLED(PROBE_MANUALLY)
|
||||
g29_in_progress = false;
|
||||
#if ENABLED(LCD_BED_LEVELING)
|
||||
ui.wait_for_bl_move = false;
|
||||
ui.wait_for_move = false;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@ -88,7 +88,7 @@ void GcodeSuite::G29() {
|
||||
case MeshStart:
|
||||
mbl.reset();
|
||||
mbl_probe_index = 0;
|
||||
if (!ui.wait_for_bl_move) {
|
||||
if (!ui.wait_for_move) {
|
||||
queue.inject_P(PSTR("G28\nG29 S2"));
|
||||
return;
|
||||
}
|
||||
@ -148,7 +148,7 @@ void GcodeSuite::G29() {
|
||||
#endif
|
||||
|
||||
#if ENABLED(LCD_BED_LEVELING)
|
||||
ui.wait_for_bl_move = false;
|
||||
ui.wait_for_move = false;
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
|
@ -56,8 +56,6 @@
|
||||
#endif
|
||||
);
|
||||
|
||||
bool MarlinUI::wait_for_bl_move; // = false
|
||||
|
||||
//
|
||||
// Bed leveling is done. Wait for G29 to complete.
|
||||
// A flag is used so that this can release control
|
||||
@ -70,7 +68,7 @@
|
||||
// ** This blocks the command queue! **
|
||||
//
|
||||
void _lcd_level_bed_done() {
|
||||
if (!ui.wait_for_bl_move) {
|
||||
if (!ui.wait_for_move) {
|
||||
#if MANUAL_PROBE_HEIGHT > 0 && DISABLED(MESH_BED_LEVELING)
|
||||
// Display "Done" screen and wait for moves to complete
|
||||
line_to_z(MANUAL_PROBE_HEIGHT);
|
||||
@ -103,7 +101,7 @@
|
||||
//
|
||||
// The last G29 records the point and enables bed leveling
|
||||
//
|
||||
ui.wait_for_bl_move = true;
|
||||
ui.wait_for_move = true;
|
||||
ui.goto_screen(_lcd_level_bed_done);
|
||||
#if ENABLED(MESH_BED_LEVELING)
|
||||
queue.inject_P(PSTR("G29 S2"));
|
||||
@ -146,7 +144,7 @@
|
||||
MenuEditItemBase::draw_edit_screen(GET_TEXT(MSG_LEVEL_BED_NEXT_POINT), msg);
|
||||
}
|
||||
ui.refresh(LCDVIEW_CALL_NO_REDRAW);
|
||||
if (!ui.wait_for_bl_move) ui.goto_screen(_lcd_level_bed_get_z);
|
||||
if (!ui.wait_for_move) ui.goto_screen(_lcd_level_bed_get_z);
|
||||
}
|
||||
|
||||
//
|
||||
@ -156,7 +154,7 @@
|
||||
ui.goto_screen(_lcd_level_bed_moving);
|
||||
|
||||
// G29 Records Z, moves, and signals when it pauses
|
||||
ui.wait_for_bl_move = true;
|
||||
ui.wait_for_move = true;
|
||||
#if ENABLED(MESH_BED_LEVELING)
|
||||
queue.inject_P(manual_probe_index ? PSTR("G29 S2") : PSTR("G29 S1"));
|
||||
#elif ENABLED(PROBE_MANUALLY)
|
||||
|
@ -41,10 +41,14 @@
|
||||
#endif
|
||||
|
||||
void _man_probe_pt(const xy_pos_t &xy) {
|
||||
do_blocking_move_to_xy_z(xy, Z_CLEARANCE_BETWEEN_PROBES);
|
||||
ui.synchronize();
|
||||
move_menu_scale = _MAX(PROBE_MANUALLY_STEP, MIN_STEPS_PER_SEGMENT / float(DEFAULT_XYZ_STEPS_PER_UNIT));
|
||||
ui.goto_screen(lcd_move_z);
|
||||
if (!ui.wait_for_move) {
|
||||
ui.wait_for_move = true;
|
||||
do_blocking_move_to_xy_z(xy, Z_CLEARANCE_BETWEEN_PROBES);
|
||||
ui.wait_for_move = false;
|
||||
ui.synchronize();
|
||||
move_menu_scale = _MAX(PROBE_MANUALLY_STEP, MIN_STEPS_PER_SEGMENT / float(DEFAULT_XYZ_STEPS_PER_UNIT));
|
||||
ui.goto_screen(lcd_move_z);
|
||||
}
|
||||
}
|
||||
|
||||
#if ENABLED(DELTA_AUTO_CALIBRATION)
|
||||
|
@ -45,6 +45,10 @@ MarlinUI ui;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if LCD_HAS_WAIT_FOR_MOVE
|
||||
bool MarlinUI::wait_for_move; // = false
|
||||
#endif
|
||||
|
||||
#if HAS_SPI_LCD
|
||||
#if ENABLED(STATUS_MESSAGE_SCROLLING)
|
||||
uint8_t MarlinUI::status_scroll_offset; // = 0
|
||||
|
@ -532,10 +532,12 @@ public:
|
||||
|
||||
#endif
|
||||
|
||||
#if ENABLED(LCD_BED_LEVELING) && EITHER(PROBE_MANUALLY, MESH_BED_LEVELING)
|
||||
static bool wait_for_bl_move;
|
||||
#define LCD_HAS_WAIT_FOR_MOVE EITHER(DELTA_CALIBRATION_MENU, DELTA_AUTO_CALIBRATION) || (ENABLED(LCD_BED_LEVELING) && EITHER(PROBE_MANUALLY, MESH_BED_LEVELING))
|
||||
|
||||
#if LCD_HAS_WAIT_FOR_MOVE
|
||||
static bool wait_for_move;
|
||||
#else
|
||||
static constexpr bool wait_for_bl_move = false;
|
||||
static constexpr bool wait_for_move = false;
|
||||
#endif
|
||||
|
||||
#if HAS_LCD_MENU && EITHER(AUTO_BED_LEVELING_UBL, G26_MESH_VALIDATION)
|
||||
|
Loading…
Reference in New Issue
Block a user