Sfoglia il codice sorgente

🎨 Add DWIN_StatusChanged_P

Scott Lahteine 4 anni fa
parent
commit
52718f3385
2 ha cambiato i file con 7 aggiunte e 0 eliminazioni
  1. 6
    0
      Marlin/src/lcd/dwin/e3v2/dwin.cpp
  2. 1
    0
      Marlin/src/lcd/dwin/e3v2/dwin.h

+ 6
- 0
Marlin/src/lcd/dwin/e3v2/dwin.cpp Vedi File

@@ -4128,6 +4128,12 @@ void DWIN_StatusChanged(const char *text) {
4128 4128
   DWIN_UpdateLCD();
4129 4129
 }
4130 4130
 
4131
+void DWIN_StatusChanged_P(PGM_P const pstr) {
4132
+  char str[strlen_P((const char*)pstr) + 1];
4133
+  strcpy_P(str, (const char*)pstr);
4134
+  DWIN_StatusChanged(str);
4135
+}
4136
+
4131 4137
 // GUI extension
4132 4138
 void DWIN_Draw_Checkbox(uint16_t color, uint16_t bcolor, uint16_t x, uint16_t y, bool mode=false) {
4133 4139
   DWIN_Draw_String(false,true,font8x16,Select_Color,bcolor,x+4,y,F(mode ? "x" : " "));

+ 1
- 0
Marlin/src/lcd/dwin/e3v2/dwin.h Vedi File

@@ -404,6 +404,7 @@ void DWIN_Update();
404 404
 void EachMomentUpdate();
405 405
 void DWIN_HandleScreen();
406 406
 void DWIN_StatusChanged(const char *text);
407
+void DWIN_StatusChanged_P(PGM_P const pstr);
407 408
 void DWIN_Draw_Checkbox(uint16_t color, uint16_t bcolor, uint16_t x, uint16_t y, bool mode /* = false*/);
408 409
 
409 410
 inline void DWIN_StartHoming() { HMI_flag.home_flag = true; }

Loading…
Annulla
Salva