From 03a725067526cb1646e1f9126b0b644d0f252985 Mon Sep 17 00:00:00 2001 From: sarusani Date: Thu, 21 Mar 2024 12:20:05 +0100 Subject: [PATCH] Add Eject Option To Filament Load Message --- Firmware/messages.cpp | 1 + Firmware/messages.h | 1 + Firmware/ultralcd.cpp | 12 ++++++------ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Firmware/messages.cpp b/Firmware/messages.cpp index c6b95762a3..9736d8b391 100644 --- a/Firmware/messages.cpp +++ b/Firmware/messages.cpp @@ -18,6 +18,7 @@ const char MSG_BED_HEATING[] PROGMEM_I1 = ISTR("Bed Heating"); ////MSG_BED_HEATI const char MSG_BED_LEVELING_FAILED_POINT_LOW[] PROGMEM_I1 = ISTR("Bed leveling failed. Sensor didn't trigger. Debris on nozzle? Waiting for reset."); ////MSG_BED_LEVELING_FAILED_POINT_LOW c=20 r=6 const char MSG_BED_SKEW_OFFSET_DETECTION_FITTING_FAILED[] PROGMEM_I1 = ISTR("XYZ calibration failed. Please consult the manual."); ////MSG_BED_SKEW_OFFSET_DETECTION_FITTING_FAILED c=20 r=8 const char MSG_BELT_STATUS[] PROGMEM_I1 = ISTR("Belt status");////MSG_BELT_STATUS c=18 +const char MSG_EJECT[] PROGMEM_I1 = ISTR("Eject"); ////MSG_EJECT c=8 const char MSG_CANCEL[] PROGMEM_I1 = ISTR(">Cancel");////MSG_CANCEL c=10 const char MSG_CALIBRATE_Z_AUTO[] PROGMEM_I1 = ISTR("Calibrating Z"); ////MSG_CALIBRATE_Z_AUTO c=20 r=2 const char MSG_CARD_MENU[] PROGMEM_I1 = ISTR("Print from SD"); ////MSG_CARD_MENU c=18 diff --git a/Firmware/messages.h b/Firmware/messages.h index 3c2732f041..26edfb8528 100644 --- a/Firmware/messages.h +++ b/Firmware/messages.h @@ -21,6 +21,7 @@ extern const char MSG_BED_HEATING[]; extern const char MSG_BED_LEVELING_FAILED_POINT_LOW[]; extern const char MSG_BED_SKEW_OFFSET_DETECTION_FITTING_FAILED[]; extern const char MSG_BELT_STATUS[]; +extern const char MSG_EJECT[]; extern const char MSG_CANCEL[]; extern const char MSG_CALIBRATE_Z_AUTO[]; extern const char MSG_CARD_MENU[]; diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index 63edc35d13..0fceb4325d 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -2258,12 +2258,12 @@ void show_preheat_nozzle_warning() void lcd_load_filament_color_check() { - uint8_t clean = lcd_show_fullscreen_message_yes_no_and_wait_P(_T(MSG_FILAMENT_CLEAN), false, LCD_LEFT_BUTTON_CHOICE); - while (clean == LCD_MIDDLE_BUTTON_CHOICE) { - load_filament_final_feed(); - st_synchronize(); - clean = lcd_show_fullscreen_message_yes_no_and_wait_P(_T(MSG_FILAMENT_CLEAN), false, LCD_LEFT_BUTTON_CHOICE); - } + uint8_t clean = lcd_show_multiscreen_message_with_choices_and_wait_P(_T(MSG_FILAMENT_CLEAN), false, LCD_LEFT_BUTTON_CHOICE, _T(MSG_YES), _T(MSG_NO), _T(MSG_EJECT), 10); + while (clean == LCD_MIDDLE_BUTTON_CHOICE) { + load_filament_final_feed(); + st_synchronize(); + clean = lcd_show_multiscreen_message_with_choices_and_wait_P(_T(MSG_FILAMENT_CLEAN), false, LCD_LEFT_BUTTON_CHOICE, _T(MSG_YES), _T(MSG_NO), _T(MSG_EJECT), 10); + } } #ifdef FILAMENT_SENSOR