Sfoglia il codice sorgente

Add ExtUI::onStatusChanged_P (#17543)

Desuuuu 5 anni fa
parent
commit
2824e67d95
Nessun account collegato all'indirizzo email del committer

+ 1
- 1
Marlin/src/feature/pause.cpp Vedi File

536
         host_prompt_do(PROMPT_INFO, GET_TEXT(MSG_REHEATING));
536
         host_prompt_do(PROMPT_INFO, GET_TEXT(MSG_REHEATING));
537
       #endif
537
       #endif
538
       #if ENABLED(EXTENSIBLE_UI)
538
       #if ENABLED(EXTENSIBLE_UI)
539
-        ExtUI::onStatusChanged(GET_TEXT(MSG_REHEATING));
539
+        ExtUI::onStatusChanged_P(GET_TEXT(MSG_REHEATING));
540
       #endif
540
       #endif
541
 
541
 
542
       // Re-enable the heaters if they timed out
542
       // Re-enable the heaters if they timed out

+ 6
- 0
Marlin/src/lcd/extui/ui_api.cpp Vedi File

1071
     onUserConfirmRequired(msg);
1071
     onUserConfirmRequired(msg);
1072
   }
1072
   }
1073
 
1073
 
1074
+  void onStatusChanged_P(PGM_P const pstr) {
1075
+    char msg[strlen_P(pstr) + 1];
1076
+    strcpy_P(msg, pstr);
1077
+    onStatusChanged(msg);
1078
+  }
1079
+
1074
   FileList::FileList() { refresh(); }
1080
   FileList::FileList() { refresh(); }
1075
 
1081
 
1076
   void FileList::refresh() { num_files = 0xFFFF; }
1082
   void FileList::refresh() { num_files = 0xFFFF; }

+ 1
- 0
Marlin/src/lcd/extui/ui_api.h Vedi File

339
   void onUserConfirmRequired(const char * const msg);
339
   void onUserConfirmRequired(const char * const msg);
340
   void onUserConfirmRequired_P(PGM_P const pstr);
340
   void onUserConfirmRequired_P(PGM_P const pstr);
341
   void onStatusChanged(const char * const msg);
341
   void onStatusChanged(const char * const msg);
342
+  void onStatusChanged_P(PGM_P const pstr);
342
   void onFactoryReset();
343
   void onFactoryReset();
343
   void onStoreSettings(char *);
344
   void onStoreSettings(char *);
344
   void onLoadSettings(const char *);
345
   void onLoadSettings(const char *);

Loading…
Annulla
Salva