Show lcd_babystep_zoffset screen if DOUBLECLICK_FOR_Z_BABYSTEPPING is enabled and HAS_BED_PROBE is defined
This commit is contained in:
parent
3a40e637cd
commit
8dd0492e68
|
@ -51,8 +51,12 @@ int lcd_preheat_hotend_temp[2], lcd_preheat_bed_temp[2], lcd_preheat_fan_speed[2
|
|||
|
||||
#if ENABLED(BABYSTEPPING)
|
||||
long babysteps_done = 0;
|
||||
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
|
||||
static void lcd_babystep_zoffset();
|
||||
#else
|
||||
static void lcd_babystep_z();
|
||||
#endif
|
||||
#endif
|
||||
|
||||
uint8_t lcd_status_message_level;
|
||||
char lcd_status_message[3 * (LCD_WIDTH) + 1] = WELCOME_MSG; // worst case is kana with up to 3*LCD_WIDTH+1
|
||||
|
@ -431,7 +435,13 @@ uint16_t max_display_update_time = 0;
|
|||
doubleclick_expire_ms = millis() + DOUBLECLICK_MAX_INTERVAL;
|
||||
}
|
||||
else if (screen == lcd_status_screen && currentScreen == lcd_main_menu && PENDING(millis(), doubleclick_expire_ms))
|
||||
screen = lcd_babystep_z;
|
||||
screen =
|
||||
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
|
||||
lcd_babystep_zoffset
|
||||
#else
|
||||
lcd_babystep_z
|
||||
#endif
|
||||
;
|
||||
#endif
|
||||
|
||||
currentScreen = screen;
|
||||
|
@ -851,7 +861,7 @@ void kill_screen(const char* lcd_msg) {
|
|||
void lcd_babystep_y() { lcd_goto_screen(_lcd_babystep_y); babysteps_done = 0; defer_return_to_status = true; }
|
||||
#endif
|
||||
|
||||
#if HAS_BED_PROBE
|
||||
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
|
||||
|
||||
void lcd_babystep_zoffset() {
|
||||
if (lcd_clicked) { defer_return_to_status = false; return lcd_goto_previous_menu(); }
|
||||
|
@ -876,12 +886,12 @@ void kill_screen(const char* lcd_msg) {
|
|||
lcd_implementation_drawedit(PSTR(MSG_ZPROBE_ZOFFSET), ftostr43sign(zprobe_zoffset));
|
||||
}
|
||||
|
||||
#else // !HAS_BED_PROBE
|
||||
#else // !BABYSTEP_ZPROBE_OFFSET
|
||||
|
||||
void _lcd_babystep_z() { _lcd_babystep(Z_AXIS, PSTR(MSG_BABYSTEPPING_Z)); }
|
||||
void lcd_babystep_z() { lcd_goto_screen(_lcd_babystep_z); babysteps_done = 0; defer_return_to_status = true; }
|
||||
|
||||
#endif // HAS_BED_PROBE
|
||||
#endif // !BABYSTEP_ZPROBE_OFFSET
|
||||
|
||||
#endif // BABYSTEPPING
|
||||
|
||||
|
@ -1087,7 +1097,9 @@ void kill_screen(const char* lcd_msg) {
|
|||
MENU_ITEM(submenu, MSG_BABYSTEP_X, lcd_babystep_x);
|
||||
MENU_ITEM(submenu, MSG_BABYSTEP_Y, lcd_babystep_y);
|
||||
#endif
|
||||
#if DISABLED(BABYSTEP_ZPROBE_OFFSET)
|
||||
#if ENABLED(BABYSTEP_ZPROBE_OFFSET)
|
||||
MENU_ITEM(submenu, MSG_ZPROBE_ZOFFSET, lcd_babystep_zoffset);
|
||||
#else
|
||||
MENU_ITEM(submenu, MSG_BABYSTEP_Z, lcd_babystep_z);
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue