|
@@ -408,7 +408,7 @@ uint16_t max_display_update_time = 0;
|
408
|
408
|
bool screen_changed;
|
409
|
409
|
|
410
|
410
|
// LCD and menu clicks
|
411
|
|
- bool lcd_clicked, wait_for_unclick, defer_return_to_status, no_reentrance;
|
|
411
|
+ bool lcd_clicked, wait_for_unclick, defer_return_to_status;
|
412
|
412
|
|
413
|
413
|
// Variables used when editing values.
|
414
|
414
|
const char* editLabel;
|
|
@@ -460,16 +460,17 @@ uint16_t max_display_update_time = 0;
|
460
|
460
|
extern uint8_t commands_in_queue;
|
461
|
461
|
|
462
|
462
|
inline void lcd_synchronize() {
|
|
463
|
+ static bool no_reentry = false;
|
463
|
464
|
lcd_implementation_drawmenu_static(LCD_HEIGHT >= 4 ? 1 : 0, PSTR(MSG_MOVING));
|
464
|
|
- if (no_reentrance) return;
|
465
|
|
- no_reentrance = true;
|
|
465
|
+ if (no_reentry) return;
|
|
466
|
+ no_reentry = true;
|
466
|
467
|
screenFunc_t old_screen = currentScreen;
|
467
|
468
|
lcd_goto_screen(lcd_synchronize);
|
468
|
469
|
while (commands_in_queue) {
|
469
|
470
|
idle();
|
470
|
471
|
stepper.synchronize();
|
471
|
472
|
}
|
472
|
|
- no_reentrance = false;
|
|
473
|
+ no_reentry = false;
|
473
|
474
|
lcd_goto_screen(old_screen);
|
474
|
475
|
}
|
475
|
476
|
|
|
@@ -1365,7 +1366,6 @@ void kill_screen(const char* lcd_msg) {
|
1365
|
1366
|
|
1366
|
1367
|
// Utility to go to the next mesh point
|
1367
|
1368
|
inline void _manual_probe_goto_xy(float x, float y) {
|
1368
|
|
- if (no_reentrance) return;
|
1369
|
1369
|
#if MANUAL_PROBE_HEIGHT > 0
|
1370
|
1370
|
current_position[Z_AXIS] = LOGICAL_Z_POSITION(Z_MIN_POS) + MANUAL_PROBE_HEIGHT;
|
1371
|
1371
|
line_to_current(Z_AXIS);
|
|
@@ -1409,8 +1409,6 @@ void kill_screen(const char* lcd_msg) {
|
1409
|
1409
|
void _lcd_level_bed_get_z() {
|
1410
|
1410
|
ENCODER_DIRECTION_NORMAL();
|
1411
|
1411
|
|
1412
|
|
- if (no_reentrance) goto KeepDrawing;
|
1413
|
|
-
|
1414
|
1412
|
// Encoder wheel adjusts the Z position
|
1415
|
1413
|
if (encoderPosition) {
|
1416
|
1414
|
refresh_cmd_timeout();
|
|
@@ -1492,8 +1490,6 @@ void kill_screen(const char* lcd_msg) {
|
1492
|
1490
|
}
|
1493
|
1491
|
}
|
1494
|
1492
|
|
1495
|
|
- KeepDrawing:
|
1496
|
|
-
|
1497
|
1493
|
// Update on first display, then only on updates to Z position
|
1498
|
1494
|
// Show message above on clicks instead
|
1499
|
1495
|
if (lcdDrawUpdate) {
|
|
@@ -1745,8 +1741,6 @@ void kill_screen(const char* lcd_msg) {
|
1745
|
1741
|
// Move directly to the tower position with uninterpolated moves
|
1746
|
1742
|
// If we used interpolated moves it would cause this to become re-entrant
|
1747
|
1743
|
void _goto_tower_pos(const float &a) {
|
1748
|
|
- if (no_reentrance) return;
|
1749
|
|
-
|
1750
|
1744
|
current_position[Z_AXIS] = max(Z_HOMING_HEIGHT, Z_CLEARANCE_BETWEEN_PROBES) + (DELTA_PRINTABLE_RADIUS) / 5;
|
1751
|
1745
|
line_to_current(Z_AXIS);
|
1752
|
1746
|
|
|
@@ -1981,11 +1975,9 @@ void kill_screen(const char* lcd_msg) {
|
1981
|
1975
|
#if ENABLED(DELTA)
|
1982
|
1976
|
#define _MOVE_XY_ALLOWED (current_position[Z_AXIS] <= delta_clip_start_height)
|
1983
|
1977
|
void lcd_lower_z_to_clip_height() {
|
1984
|
|
- if (!no_reentrance) {
|
1985
|
|
- current_position[Z_AXIS] = delta_clip_start_height;
|
1986
|
|
- line_to_current(Z_AXIS);
|
1987
|
|
- lcd_synchronize();
|
1988
|
|
- }
|
|
1978
|
+ current_position[Z_AXIS] = delta_clip_start_height;
|
|
1979
|
+ line_to_current(Z_AXIS);
|
|
1980
|
+ lcd_synchronize();
|
1989
|
1981
|
}
|
1990
|
1982
|
#else
|
1991
|
1983
|
#define _MOVE_XY_ALLOWED true
|