Skip to content

Commit 477d7ae

Browse files
committed
Add multiscreen message with Cont.|Cancel
Remove `Continue?` from some mesages to save "translation space" and replace multiscreen from `Yes|No` to `Cont.|Cancel` Remove `Print canceled.` from check messages to save again "translation sapce" and after confirming the message the Status Line shows that it has been stopped. fix rebase issue
1 parent ee4d8bb commit 477d7ae

19 files changed

+377
-622
lines changed

Firmware/messages.cpp

+12-13
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const char MSG_BED_LEVELING_FAILED_POINT_LOW[] PROGMEM_I1 = ISTR("Bed leveling f
1919
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
2020
const char MSG_BELT_STATUS[] PROGMEM_I1 = ISTR("Belt status");////MSG_BELT_STATUS c=18
2121
const char MSG_EJECT[] PROGMEM_I1 = ISTR("Eject"); ////MSG_EJECT c=9
22-
const char MSG_CANCEL[] PROGMEM_I1 = ISTR(">Cancel");////MSG_CANCEL c=10
22+
const char MSG_CANCEL[] PROGMEM_I1 = ISTR(">Cancel");////MSG_CANCEL c=9
2323
const char MSG_CALIBRATE_Z_AUTO[] PROGMEM_I1 = ISTR("Calibrating Z"); ////MSG_CALIBRATE_Z_AUTO c=20 r=2
2424
const char MSG_CARD_MENU[] PROGMEM_I1 = ISTR("Print from SD"); ////MSG_CARD_MENU c=18
2525
const char MSG_CHECKING_X[] PROGMEM_I1 = ISTR("Checking X axis"); ////MSG_CHECKING_X c=20
@@ -149,16 +149,15 @@ const char MSG_NONE[] PROGMEM_I1 = ISTR("None"); ////MSG_NONE c=8
149149
const char MSG_WARN[] PROGMEM_I1 = ISTR("Warn"); ////MSG_WARN c=8
150150
const char MSG_STRICT[] PROGMEM_I1 = ISTR("Strict"); ////MSG_STRICT c=8
151151
const char MSG_MODEL[] PROGMEM_I1 = ISTR("Model"); ////MSG_MODEL c=8
152-
const char MSG_GCODE_DIFF_PRINTER_CONTINUE[] PROGMEM_I1 = ISTR("G-code sliced for a different printer type. Continue?"); ////MSG_GCODE_DIFF_PRINTER_CONTINUE c=20 r=3
153-
const char MSG_GCODE_DIFF_PRINTER_CANCELLED[] PROGMEM_I1 =ISTR("G-code sliced for a different printer type. Please re-slice the model again. Print cancelled."); ////MSG_GCODE_DIFF_PRINTER_CANCELLED c=20 r=8
154-
const char MSG_GCODE_NEWER_FIRMWARE_CONTINUE[] PROGMEM_I1 = ISTR("G-code sliced for a newer firmware. Continue?"); ////MSG_GCODE_NEWER_FIRMWARE_CONTINUE c=20 r=3
155-
const char MSG_GCODE_NEWER_FIRMWARE_CANCELLED[] PROGMEM_I1 = ISTR("G-code sliced for a newer firmware. Please update the firmware. Print cancelled."); ////MSG_GCODE_NEWER_FIRMWARE_CANCELLED c=20 r=8
156-
const char MSG_GCODE_DIFF_CONTINUE[] PROGMEM_I1 = ISTR("G-code sliced for a different level. Continue?"); ////MSG_GCODE_DIFF_CONTINUE c=20 r=3
157-
const char MSG_GCODE_DIFF_CANCELLED[] PROGMEM_I1 = ISTR("G-code sliced for a different level. Please re-slice the model again. Print cancelled."); ////MSG_GCODE_DIFF_CANCELLED c=20 r=8
158-
const char MSG_MISSING_FILAMENT_CONTINUE[] PROGMEM_I1 = ISTR("There is no filament loaded. Continue?"); ////MSG_MISSING_FILAMENT_CONTINUE c=20 r=3
159-
const char MSG_MISSING_FILAMENT_CANCELLED[] PROGMEM_I1 = ISTR("There is no filament loaded. Print cancelled."); ////MSG_MISSING_FILAMENT_CANCELLED c=20 r=8
160-
const char MSG_NOZZLE_DIFFERS_CONTINUE[] PROGMEM_I1 = ISTR("Nozzle diameter differs from the G-code. Continue?"); ////MSG_NOZZLE_DIFFERS_CONTINUE c=20 r=3
161-
const char MSG_NOZZLE_DIFFERS_CANCELLED[] PROGMEM_I1 = ISTR("Nozzle diameter differs from the G-code. Please check the value in settings. Print cancelled."); ////MSG_NOZZLE_DIFFERS_CANCELLED c=20 r=8
152+
const char MSG_GCODE_DIFF_PRINTER_CONTINUE[] PROGMEM_I1 = ISTR("G-code sliced for a different printer type."); ////MSG_GCODE_DIFF_PRINTER_CONTINUE c=20 r=3
153+
const char MSG_GCODE_DIFF_PRINTER_CANCELLED[] PROGMEM_I1 =ISTR("G-code sliced for a different printer type. Please re-slice the model again."); ////MSG_GCODE_DIFF_PRINTER_CANCELLED c=20 r=8
154+
const char MSG_GCODE_NEWER_FIRMWARE_CONTINUE[] PROGMEM_I1 = ISTR("G-code sliced for a newer firmware."); ////MSG_GCODE_NEWER_FIRMWARE_CONTINUE c=20 r=3
155+
const char MSG_GCODE_NEWER_FIRMWARE_CANCELLED[] PROGMEM_I1 = ISTR("G-code sliced for a newer firmware. Please update the firmware."); ////MSG_GCODE_NEWER_FIRMWARE_CANCELLED c=20 r=8
156+
const char MSG_GCODE_DIFF_CONTINUE[] PROGMEM_I1 = ISTR("G-code sliced for a different level."); ////MSG_GCODE_DIFF_CONTINUE c=20 r=3
157+
const char MSG_GCODE_DIFF_CANCELLED[] PROGMEM_I1 = ISTR("G-code sliced for a different level. Please re-slice the model again."); ////MSG_GCODE_DIFF_CANCELLED c=20 r=8
158+
const char MSG_MISSING_FILAMENT[] PROGMEM_I1 = ISTR("There is no filament loaded."); ////MSG_MISSING_FILAMENT c=20 r=3
159+
const char MSG_NOZZLE_DIFFERS_CONTINUE[] PROGMEM_I1 = ISTR("Nozzle diameter differs from the G-code."); ////MSG_NOZZLE_DIFFERS_CONTINUE c=20 r=3
160+
const char MSG_NOZZLE_DIFFERS_CANCELLED[] PROGMEM_I1 = ISTR("Nozzle diameter differs from the G-code. Please check the value in settings."); ////MSG_NOZZLE_DIFFERS_CANCELLED c=20 r=8
162161
const char MSG_NOZZLE_DIAMETER[] PROGMEM_I1 = ISTR("Nozzle d."); ////MSG_NOZZLE_DIAMETER c=10
163162
const char MSG_MMU_MODE[] PROGMEM_I1 = ISTR("MMU Mode"); ////MSG_MMU_MODE c=8
164163
const char MSG_SD_CARD[] PROGMEM_I1 = ISTR("SD card"); ////MSG_SD_CARD c=8
@@ -295,7 +294,7 @@ extern const char MSG_MODE_CHANGE_IN_PROGRESS [] PROGMEM_I1 = ISTR("Mode change
295294
extern const char MSG_COPY_SEL_LANG [] PROGMEM_I1 = ISTR("Copy selected language?"); ////MSG_COPY_SEL_LANG c=20 r=3
296295
extern const char MSG_SHEET_OFFSET [] PROGMEM_I1 = ISTR("Sheet %.7s\nZ offset: %+1.3fmm\n%cContinue\n%cReset"); ////MSG_SHEET_OFFSET c=20 r=4
297296
extern const char MSG_PLEASE_LOAD_PLA [] PROGMEM_I1 = ISTR("Please load filament first."); ////MSG_PLEASE_LOAD_PLA c=20 r=4
298-
extern const char MSG_WIZARD_RERUN [] PROGMEM_I1 = ISTR("Running Wizard will delete current calibration results and start from the beginning. Continue?"); ////MSG_WIZARD_RERUN c=20 r=7
297+
extern const char MSG_WIZARD_RERUN [] PROGMEM_I1 = ISTR("Running Wizard will delete current calibration results and start from the beginning."); ////MSG_WIZARD_RERUN c=20 r=7
299298
extern const char MSG_MMU_INSERT_FILAMENT_FIRST_TUBE [] PROGMEM_I1 = ISTR("Please insert filament into the first tube of the MMU, then press the knob to load it."); ////MSG_MMU_INSERT_FILAMENT_FIRST_TUBE c=20 r=6
300299
extern const char MSG_WIZARD_LOAD_FILAMENT [] PROGMEM_I1 = ISTR("Please insert filament into the extruder, then press the knob to load it."); ////MSG_WIZARD_LOAD_FILAMENT c=20 r=6
301300
extern const char MSG_WIZARD_V2_CAL [] PROGMEM_I1 = ISTR("Now I will calibrate distance between tip of the nozzle and heatbed surface."); ////MSG_WIZARD_V2_CAL c=20 r=8
@@ -372,7 +371,7 @@ extern const char MSG_SELFTEST_CHECK_HOTEND [] PROGMEM_I1 = ISTR("Checking hoten
372371
extern const char MSG_SELFTEST_CHECK_ALLCORRECT [] PROGMEM_I1 = ISTR("All correct"); ////MSG_SELFTEST_CHECK_ALLCORRECT c=20
373372
extern const char MSG_CALIBRATING_HOME [] PROGMEM_I1 = ISTR("Calibrating home"); ////MSG_CALIBRATING_HOME c=20
374373
extern const char MSG_CHECKING_FILE [] PROGMEM_I1 = ISTR("Checking file"); ////MSG_CHECKING_FILE c=17
375-
extern const char MSG_FILE_INCOMPLETE [] PROGMEM_I1 = ISTR("File incomplete. Continue anyway?"); ////MSG_FILE_INCOMPLETE c=20 r=3
374+
extern const char MSG_FILE_INCOMPLETE [] PROGMEM_I1 = ISTR("File incomplete."); ////MSG_FILE_INCOMPLETE c=20 r=3
376375
extern const char MSG_SD_REMOVED [] PROGMEM_I1 = ISTR("Card removed"); ////MSG_SD_REMOVED c=20
377376
extern const char MSG_NEW_FIRMWARE_AVAILABLE [] PROGMEM_I1 = ISTR("New firmware version available:"); ////MSG_NEW_FIRMWARE_AVAILABLE c=20 r=2
378377
extern const char MSG_NEW_FIRMWARE_PLEASE_UPGRADE [] PROGMEM_I1 = ISTR("Please upgrade."); ////MSG_NEW_FIRMWARE_PLEASE_UPGRADE c=20

Firmware/messages.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,7 @@ extern const char MSG_GCODE_NEWER_FIRMWARE_CONTINUE[];
157157
extern const char MSG_GCODE_NEWER_FIRMWARE_CANCELLED[];
158158
extern const char MSG_GCODE_DIFF_CONTINUE[];
159159
extern const char MSG_GCODE_DIFF_CANCELLED[];
160-
extern const char MSG_MISSING_FILAMENT_CONTINUE[];
161-
extern const char MSG_MISSING_FILAMENT_CANCELLED[];
160+
extern const char MSG_MISSING_FILAMENT[];
162161
extern const char MSG_NOZZLE_DIFFERS_CONTINUE[];
163162
extern const char MSG_NOZZLE_DIFFERS_CANCELLED[];
164163
extern const char MSG_NOZZLE_DIAMETER[];

Firmware/ultralcd.cpp

+16-4
Original file line numberDiff line numberDiff line change
@@ -1981,7 +1981,8 @@ void mFilamentItem(uint16_t nTemp, uint16_t nTempBed)
19811981
lcd_draw_update = 1;
19821982

19831983
lcd_clear();
1984-
lcd_puts_at_P(0, 3, _T(MSG_CANCEL));
1984+
lcd_puts_at_P(0,3, PSTR(">"));
1985+
lcd_puts_at_P(1, 3, _T(MSG_CANCEL));
19851986

19861987
lcd_set_cursor(0, 1);
19871988
switch (eFilamentAction)
@@ -3057,6 +3058,17 @@ uint8_t lcd_show_multiscreen_message_yes_no_and_wait_P(const char *msg, bool all
30573058
{
30583059
return lcd_show_multiscreen_message_with_choices_and_wait_P(msg, allow_timeouting, default_selection, _T(MSG_YES), _T(MSG_NO), nullptr, 10);
30593060
}
3061+
//! @brief Show multiple screen message with yes and no possible choices and wait with possible timeout
3062+
//! @param msg Message to show. If NULL, do not clear the screen and handle choice selection only.
3063+
//! @param allow_timeouting if true, allows time outing of the screen
3064+
//! @param default_selection if 0, 'Yes' choice is selected by default, otherwise 'No' choice is preselected
3065+
//! @retval 0 cont choice selected by user
3066+
//! @retval 1 cancel choice selected by user
3067+
//! @retval 0xFF button timeout (only possible if allow_timeouting is true)
3068+
uint8_t lcd_show_multiscreen_message_cont_cancel_and_wait_P(const char *msg, bool allow_timeouting, uint8_t default_selection) //currently just max. n*4 + 3 lines supported (set in language header files)
3069+
{
3070+
return lcd_show_multiscreen_message_with_choices_and_wait_P(msg, allow_timeouting, default_selection, _T(MSG_CONTINUE_SHORT), _T(MSG_CANCEL), nullptr, 10);
3071+
}
30603072
//! @brief Show a two-choice prompt on the last line of the LCD
30613073
//! @param selected Show first choice as selected if true, the second otherwise
30623074
//! @param first_choice text caption of first possible choice
@@ -3632,7 +3644,7 @@ void lcd_v2_calibration() {
36323644
if (MMU2::mmu2.Enabled()) {
36333645
const uint8_t filament = choose_menu_P(
36343646
_T(MSG_SELECT_FILAMENT),
3635-
MSG_FILAMENT,(_T(MSG_CANCEL)+1)); //Hack to reuse MSG but strip 1st char off
3647+
MSG_FILAMENT,_T(MSG_CANCEL));
36363648
if (filament < MMU_FILAMENT_COUNT) {
36373649
lay1cal_filament = filament;
36383650
} else {
@@ -3675,7 +3687,7 @@ void lcd_wizard() {
36753687
bool result = true;
36763688
if (calibration_status_get(CALIBRATION_WIZARD_STEPS)) {
36773689
// calibration already performed: ask before clearing the previous status
3678-
result = !lcd_show_multiscreen_message_yes_no_and_wait_P(_T(MSG_WIZARD_RERUN), false);
3690+
result = !lcd_show_multiscreen_message_cont_cancel_and_wait_P(_T(MSG_WIZARD_RERUN), false);
36793691
}
36803692
if (result) {
36813693
calibration_status_clear(CALIBRATION_WIZARD_STEPS);
@@ -7128,7 +7140,7 @@ static void menu_action_sdfile(const char* filename)
71287140
}
71297141

71307142
if (!check_file(selected_filename)) {
7131-
result = !lcd_show_multiscreen_message_yes_no_and_wait_P(_T(MSG_FILE_INCOMPLETE), false);
7143+
result = !lcd_show_multiscreen_message_cont_cancel_and_wait_P(_T(MSG_FILE_INCOMPLETE), false);
71327144
lcd_update_enable(true);
71337145
}
71347146
if (result) {

Firmware/ultralcd.h

+1
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ extern uint8_t lcd_show_multiscreen_message_with_choices_and_wait_P(
9898
const char * const first_choice, const char * const second_choice, const char * const third_choice = nullptr,
9999
uint8_t second_col = 7);
100100
extern uint8_t lcd_show_multiscreen_message_yes_no_and_wait_P(const char *msg, bool allow_timeouting = true, uint8_t default_selection = LCD_MIDDLE_BUTTON_CHOICE);
101+
extern uint8_t lcd_show_multiscreen_message_cont_cancel_and_wait_P(const char *msg, bool allow_timeouting = true, uint8_t default_selection = LCD_MIDDLE_BUTTON_CHOICE);
101102
// Ask the user to move the Z axis up to the end stoppers and let
102103
// the user confirm that it has been done.
103104

Firmware/util.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ void fCheckModeInit() {
268268
static void render_M862_warnings(const char* warning, const char* strict, uint8_t check)
269269
{
270270
if (check == 1) { // Warning, stop print if user selects 'No'
271-
if (lcd_show_multiscreen_message_yes_no_and_wait_P(warning, true, LCD_LEFT_BUTTON_CHOICE) == LCD_MIDDLE_BUTTON_CHOICE) {
271+
if (lcd_show_multiscreen_message_cont_cancel_and_wait_P(warning, true, LCD_LEFT_BUTTON_CHOICE) == LCD_MIDDLE_BUTTON_CHOICE) {
272272
lcd_print_stop();
273273
}
274274
} else if (check == 2) { // Strict, always stop print
@@ -385,8 +385,8 @@ bool filament_presence_check() {
385385
}
386386

387387
render_M862_warnings(
388-
_T(MSG_MISSING_FILAMENT_CONTINUE)
389-
,_T(MSG_MISSING_FILAMENT_CANCELLED)
388+
_T(MSG_MISSING_FILAMENT)
389+
,_T(MSG_MISSING_FILAMENT) //Identical messages
390390
,(uint8_t)oCheckFilament
391391
);
392392

lang/po/Firmware.pot

+14-27
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ msgstr ""
2323
msgid "%s level expected"
2424
msgstr ""
2525

26-
#. MSG_CANCEL c=10
26+
#. MSG_CANCEL c=9
2727
#: ../../Firmware/messages.cpp:22 ../../Firmware/ultralcd.cpp:1986
2828
#: ../../Firmware/ultralcd.cpp:3623
29-
msgid ">Cancel"
29+
msgid "Cancel"
3030
msgstr ""
3131

3232
#. MSG_BABYSTEPPING_Z c=13
@@ -727,7 +727,7 @@ msgstr ""
727727

728728
#. MSG_FILE_INCOMPLETE c=20 r=3
729729
#: ../../Firmware/messages.cpp:375 ../../Firmware/ultralcd.cpp:7119
730-
msgid "File incomplete. Continue anyway?"
730+
msgid "File incomplete."
731731
msgstr ""
732732

733733
#. MSG_FINISHING_MOVEMENTS c=20
@@ -778,40 +778,34 @@ msgstr ""
778778

779779
#. MSG_GCODE_DIFF_CONTINUE c=20 r=3
780780
#: ../../Firmware/messages.cpp:156 ../../Firmware/util.cpp:417
781-
msgid "G-code sliced for a different level. Continue?"
781+
msgid "G-code sliced for a different level."
782782
msgstr ""
783783

784784
#. MSG_GCODE_DIFF_CANCELLED c=20 r=8
785785
#: ../../Firmware/messages.cpp:157 ../../Firmware/util.cpp:418
786-
msgid ""
787-
"G-code sliced for a different level. Please re-slice the model again. Print "
788-
"cancelled."
786+
msgid "G-code sliced for a different level. Please re-slice the model again."
789787
msgstr ""
790788

791789
#. MSG_GCODE_DIFF_PRINTER_CONTINUE c=20 r=3
792790
#: ../../Firmware/messages.cpp:152 ../../Firmware/util.cpp:319
793791
#: ../../Firmware/util.cpp:436
794-
msgid "G-code sliced for a different printer type. Continue?"
792+
msgid "G-code sliced for a different printer type."
795793
msgstr ""
796794

797795
#. MSG_GCODE_DIFF_PRINTER_CANCELLED c=20 r=8
798796
#: ../../Firmware/messages.cpp:153 ../../Firmware/util.cpp:320
799797
#: ../../Firmware/util.cpp:437
800-
msgid ""
801-
"G-code sliced for a different printer type. Please re-slice the model again."
802-
" Print cancelled."
798+
msgid "G-code sliced for a different printer type. Please re-slice the model again."
803799
msgstr ""
804800

805801
#. MSG_GCODE_NEWER_FIRMWARE_CONTINUE c=20 r=3
806802
#: ../../Firmware/messages.cpp:154 ../../Firmware/util.cpp:369
807-
msgid "G-code sliced for a newer firmware. Continue?"
803+
msgid "G-code sliced for a newer firmware."
808804
msgstr ""
809805

810806
#. MSG_GCODE_NEWER_FIRMWARE_CANCELLED c=20 r=8
811807
#: ../../Firmware/messages.cpp:155 ../../Firmware/util.cpp:370
812-
msgid ""
813-
"G-code sliced for a newer firmware. Please update the firmware. Print "
814-
"cancelled."
808+
msgid "G-code sliced for a newer firmware. Please update the firmware."
815809
msgstr ""
816810

817811
#. MSG_HW_SETUP c=18
@@ -1373,14 +1367,12 @@ msgstr ""
13731367

13741368
#. MSG_NOZZLE_DIFFERS_CONTINUE c=20 r=3
13751369
#: ../../Firmware/messages.cpp:160 ../../Firmware/util.cpp:296
1376-
msgid "Nozzle diameter differs from the G-code. Continue?"
1370+
msgid "Nozzle diameter differs from the G-code."
13771371
msgstr ""
13781372

13791373
#. MSG_NOZZLE_DIFFERS_CANCELLED c=20 r=8
13801374
#: ../../Firmware/messages.cpp:161 ../../Firmware/util.cpp:297
1381-
msgid ""
1382-
"Nozzle diameter differs from the G-code. Please check the value in settings."
1383-
" Print cancelled."
1375+
msgid "Nozzle diameter differs from the G-code. Please check the value in settings."
13841376
msgstr ""
13851377

13861378
#. MSG_NOZZLE_CNG_COOLDOWN c=20 r=3
@@ -1828,7 +1820,7 @@ msgstr ""
18281820
#: ../../Firmware/messages.cpp:298 ../../Firmware/ultralcd.cpp:3666
18291821
msgid ""
18301822
"Running Wizard will delete current calibration results and start from the "
1831-
"beginning. Continue?"
1823+
"beginning."
18321824
msgstr ""
18331825

18341826
#. MSG_SD_CARD c=8
@@ -2175,14 +2167,9 @@ msgid ""
21752167
"chapter)."
21762168
msgstr ""
21772169

2178-
#. MSG_MISSING_FILAMENT_CONTINUE c=20 r=3
2170+
#. MSG_MISSING_FILAMENT c=20 r=3
21792171
#: ../../Firmware/messages.cpp:158 ../../Firmware/util.cpp:388
2180-
msgid "There is no filament loaded. Continue?"
2181-
msgstr ""
2182-
2183-
#. MSG_MISSING_FILAMENT_CANCELLED c=20 r=8
2184-
#: ../../Firmware/messages.cpp:159 ../../Firmware/util.cpp:389
2185-
msgid "There is no filament loaded. Print cancelled."
2172+
msgid "There is no filament loaded."
21862173
msgstr ""
21872174

21882175
#. MSG_FOLLOW_Z_CALIBRATION_FLOW c=20 r=8

0 commit comments

Comments
 (0)