@@ -69,12 +69,7 @@ bool DGUSScreenHandler::leveling_active = false;
69
69
millis_t DGUSScreenHandler::status_expire = 0 ;
70
70
millis_t DGUSScreenHandler::eeprom_save = 0 ;
71
71
72
- const char DGUS_MSG_HOMING_REQUIRED[] PROGMEM = " Homing required" ,
73
- DGUS_MSG_BUSY[] PROGMEM = " Busy" ,
74
- DGUS_MSG_UNDEF[] PROGMEM = " -" ,
75
- DGUS_MSG_HOMING[] PROGMEM = " Homing..." ,
76
- DGUS_MSG_FW_OUTDATED[] PROGMEM = " DWIN GUI/OS update required" ,
77
- DGUS_MSG_ABL_REQUIRED[] PROGMEM = " Auto bed leveling required" ;
72
+ const char DGUS_MSG_UNDEF[] PROGMEM = " -" ;
78
73
79
74
const char DGUS_CMD_HOME[] PROGMEM = " G28" ,
80
75
DGUS_CMD_EEPROM_SAVE[] PROGMEM = " M500" ;
@@ -159,25 +154,25 @@ void DGUSScreenHandler::Loop() {
159
154
}
160
155
161
156
void DGUSScreenHandler::PrinterKilled (FSTR_P const error, FSTR_P const component) {
162
- SetMessageLinePGM ( FTOP ( error) , 1 );
163
- SetMessageLinePGM ( FTOP ( component) , 2 );
157
+ SetMessageLine ( error, 1 );
158
+ SetMessageLine ( component, 2 );
164
159
SetMessageLinePGM (NUL_STR, 3 );
165
- SetMessageLinePGM ( GET_TEXT (MSG_PLEASE_RESET), 4 );
160
+ SetMessageLine ( GET_TEXT_F (MSG_PLEASE_RESET), 4 );
166
161
167
162
dgus_display.PlaySound (3 , 1 , 200 );
168
163
169
164
MoveToScreen (DGUS_Screen::KILL, true );
170
165
}
171
166
172
167
void DGUSScreenHandler::UserConfirmRequired (const char * const msg) {
173
- dgus_screen_handler. SetMessageLinePGM (NUL_STR, 1 );
174
- dgus_screen_handler. SetMessageLine (msg, 2 );
175
- dgus_screen_handler. SetMessageLinePGM (NUL_STR, 3 );
176
- dgus_screen_handler. SetMessageLinePGM (NUL_STR, 4 );
168
+ SetMessageLinePGM (NUL_STR, 1 );
169
+ SetMessageLine (msg, 2 );
170
+ SetMessageLinePGM (NUL_STR, 3 );
171
+ SetMessageLinePGM (NUL_STR, 4 );
177
172
178
173
dgus_display.PlaySound (3 );
179
174
180
- dgus_screen_handler. ShowWaitScreen (current_screen, true );
175
+ ShowWaitScreen (current_screen, true );
181
176
}
182
177
183
178
void DGUSScreenHandler::SettingsReset () {
@@ -347,7 +342,7 @@ void DGUSScreenHandler::FilamentRunout(const ExtUI::extruder_t extruder) {
347
342
348
343
#endif // HAS_PID_HEATING
349
344
350
- void DGUSScreenHandler::SetMessageLine (const char * msg, uint8_t line) {
345
+ void DGUSScreenHandler::SetMessageLine (const char * const msg, const uint8_t line) {
351
346
switch (line) {
352
347
default : return ;
353
348
case 1 :
@@ -365,7 +360,7 @@ void DGUSScreenHandler::SetMessageLine(const char* msg, uint8_t line) {
365
360
}
366
361
}
367
362
368
- void DGUSScreenHandler::SetMessageLinePGM (PGM_P msg, uint8_t line) {
363
+ void DGUSScreenHandler::SetMessageLinePGM (PGM_P const msg, const uint8_t line) {
369
364
switch (line) {
370
365
default : return ;
371
366
case 1 :
@@ -395,7 +390,7 @@ void DGUSScreenHandler::SetStatusMessage(FSTR_P const fmsg, const millis_t durat
395
390
status_expire = (duration > 0 ? ExtUI::safe_millis () + duration : 0 );
396
391
}
397
392
398
- void DGUSScreenHandler::ShowWaitScreen (DGUS_Screen return_screen, bool has_continue) {
393
+ void DGUSScreenHandler::ShowWaitScreen (const DGUS_Screen return_screen, const bool has_continue/* =false */ ) {
399
394
if (return_screen != DGUS_Screen::WAIT) {
400
395
wait_return_screen = return_screen;
401
396
}
@@ -404,6 +399,14 @@ void DGUSScreenHandler::ShowWaitScreen(DGUS_Screen return_screen, bool has_conti
404
399
TriggerScreenChange (DGUS_Screen::WAIT);
405
400
}
406
401
402
+ void DGUSScreenHandler::ShowWaitScreen (FSTR_P const msg, const DGUS_Screen return_screen, const bool has_continue/* =false*/ ) {
403
+ SetMessageLinePGM (NUL_STR, 1 );
404
+ SetMessageLine (msg, 2 );
405
+ SetMessageLinePGM (NUL_STR, 3 );
406
+ SetMessageLinePGM (NUL_STR, 4 );
407
+ ShowWaitScreen (return_screen, has_continue);
408
+ }
409
+
407
410
DGUS_Screen DGUSScreenHandler::GetCurrentScreen () {
408
411
return current_screen;
409
412
}
0 commit comments