|
@ -417,21 +417,21 @@ uint16_t max_display_update_time = 0; |
|
|
* General function to go directly to a screen |
|
|
* General function to go directly to a screen |
|
|
*/ |
|
|
*/ |
|
|
void lcd_goto_screen(screenFunc_t screen, const uint32_t encoder = 0) { |
|
|
void lcd_goto_screen(screenFunc_t screen, const uint32_t encoder = 0) { |
|
|
#ifdef DOUBLE_CLICK_JUMPS_TO_Z_BABYSTEPPING |
|
|
#ifdef DOUBLE_CLICK_JUMPS_TO_Z_BABYSTEPPING |
|
|
#if ENABLED(BABYSTEPPING) |
|
|
#if ENABLED(BABYSTEPPING) |
|
|
if (currentScreen==lcd_status_screen && screen==lcd_main_menu) // We are in leaving the status screen to goto the main_menu
|
|
|
if (currentScreen==lcd_status_screen && screen==lcd_main_menu) // We are in leaving the status screen to goto the main_menu
|
|
|
status_screen_click_time = millis(); // screen. Mark the time so we know how quick the user is
|
|
|
status_screen_click_time = millis(); // screen. Mark the time so we know how quick the user is
|
|
|
// pressing buttons.
|
|
|
// pressing buttons.
|
|
|
if (currentScreen==lcd_main_menu) { |
|
|
if (currentScreen==lcd_main_menu) { |
|
|
if ( screen==lcd_status_screen && status_screen_click_time+DOUBLE_CLICK_TIME_WINDOW>millis() ) { |
|
|
if ( screen==lcd_status_screen && status_screen_click_time+DOUBLE_CLICK_TIME_WINDOW>millis() ) { |
|
|
lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; |
|
|
lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; |
|
|
status_screen_click_time = 0; |
|
|
status_screen_click_time = 0; |
|
|
lcd_babystep_z(); |
|
|
lcd_babystep_z(); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
#endif |
|
|
#endif |
|
|
#endif |
|
|
#endif |
|
|
if (currentScreen != screen) { |
|
|
if (currentScreen != screen) { |
|
|
currentScreen = screen; |
|
|
currentScreen = screen; |
|
|
encoderPosition = encoder; |
|
|
encoderPosition = encoder; |
|
|