Pārlūkot izejas kodu

Optimize "Dismiss" string

Scott Lahteine 4 gadus atpakaļ
vecāks
revīzija
073e4443e8

+ 1
- 1
Marlin/src/MarlinCore.cpp Parādīt failu

@@ -345,7 +345,7 @@ void disable_all_steppers() {
345 345
 
346 346
   void event_probe_recover() {
347 347
     #if ENABLED(HOST_PROMPT_SUPPORT)
348
-      host_prompt_do(PROMPT_INFO, PSTR("G29 Retrying"), PSTR("Dismiss"));
348
+      host_prompt_do(PROMPT_INFO, PSTR("G29 Retrying"), DISMISS_STR);
349 349
     #endif
350 350
     #ifdef ACTION_ON_G29_RECOVER
351 351
       host_action(PSTR(ACTION_ON_G29_RECOVER));

+ 2
- 1
Marlin/src/feature/host_actions.cpp Parādīt failu

@@ -64,7 +64,8 @@ void host_action(const char * const pstr, const bool eol) {
64 64
 
65 65
 #if ENABLED(HOST_PROMPT_SUPPORT)
66 66
 
67
-  const char CONTINUE_STR[] PROGMEM = "Continue";
67
+  const char CONTINUE_STR[] PROGMEM = "Continue",
68
+             DISMISS_STR[] PROGMEM = "Dismiss";
68 69
 
69 70
   #if HAS_RESUME_CONTINUE
70 71
     extern bool wait_for_user;

+ 1
- 1
Marlin/src/feature/host_actions.h Parādīt failu

@@ -46,7 +46,7 @@ void host_action(const char * const pstr, const bool eol=true);
46 46
 
47 47
 #if ENABLED(HOST_PROMPT_SUPPORT)
48 48
 
49
-  extern const char CONTINUE_STR[];
49
+  extern const char CONTINUE_STR[], DISMISS_STR[];
50 50
 
51 51
   enum PromptReason : uint8_t {
52 52
     PROMPT_NOT_DEFINED,

+ 2
- 2
Marlin/src/feature/pause.cpp Parādīt failu

@@ -396,7 +396,7 @@ bool pause_print(const float &retract, const xyz_pos_t &park_point, const float
396 396
   #endif
397 397
 
398 398
   #if ENABLED(HOST_PROMPT_SUPPORT)
399
-    host_prompt_open(PROMPT_INFO, PSTR("Pause"), PSTR("Dismiss"));
399
+    host_prompt_open(PROMPT_INFO, PSTR("Pause"), DISMISS_STR);
400 400
   #endif
401 401
 
402 402
   if (!DEBUGGING(DRYRUN) && unload_length && thermalManager.targetTooColdToExtrude(active_extruder)) {
@@ -667,7 +667,7 @@ void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_le
667 667
   --did_pause_print;
668 668
 
669 669
   #if ENABLED(HOST_PROMPT_SUPPORT)
670
-    host_prompt_open(PROMPT_INFO, PSTR("Resuming"), PSTR("Dismiss"));
670
+    host_prompt_open(PROMPT_INFO, PSTR("Resuming"), DISMISS_STR);
671 671
   #endif
672 672
 
673 673
   #if ENABLED(SDSUPPORT)

+ 1
- 1
Marlin/src/gcode/sdcard/M24_M25.cpp Parādīt failu

@@ -74,7 +74,7 @@ void GcodeSuite::M24() {
74 74
       host_action_resume();
75 75
     #endif
76 76
     #if ENABLED(HOST_PROMPT_SUPPORT)
77
-      host_prompt_open(PROMPT_INFO, PSTR("Resuming SD"), PSTR("Dismiss"));
77
+      host_prompt_open(PROMPT_INFO, PSTR("Resuming SD"), DISMISS_STR);
78 78
     #endif
79 79
   #endif
80 80
 

+ 1
- 1
Marlin/src/lcd/ultralcd.cpp Parādīt failu

@@ -1504,7 +1504,7 @@ void MarlinUI::update() {
1504 1504
       host_action_cancel();
1505 1505
     #endif
1506 1506
     #if ENABLED(HOST_PROMPT_SUPPORT)
1507
-      host_prompt_open(PROMPT_INFO, PSTR("UI Aborted"), PSTR("Dismiss"));
1507
+      host_prompt_open(PROMPT_INFO, PSTR("UI Aborted"), DISMISS_STR);
1508 1508
     #endif
1509 1509
     print_job_timer.stop();
1510 1510
     set_status_P(GET_TEXT(MSG_PRINT_ABORTED));

Notiek ielāde…
Atcelt
Saglabāt