From 52718f3385fd663fc573c551b2dfb8123141a591 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 25 Jul 2021 03:58:16 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Add=20DWIN=5FStatusChanged=5FP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/dwin/e3v2/dwin.cpp | 6 ++++++ Marlin/src/lcd/dwin/e3v2/dwin.h | 1 + 2 files changed, 7 insertions(+) diff --git a/Marlin/src/lcd/dwin/e3v2/dwin.cpp b/Marlin/src/lcd/dwin/e3v2/dwin.cpp index 114590a04373..38017b64d697 100644 --- a/Marlin/src/lcd/dwin/e3v2/dwin.cpp +++ b/Marlin/src/lcd/dwin/e3v2/dwin.cpp @@ -4128,6 +4128,12 @@ void DWIN_StatusChanged(const char *text) { DWIN_UpdateLCD(); } +void DWIN_StatusChanged_P(PGM_P const pstr) { + char str[strlen_P((const char*)pstr) + 1]; + strcpy_P(str, (const char*)pstr); + DWIN_StatusChanged(str); +} + // GUI extension void DWIN_Draw_Checkbox(uint16_t color, uint16_t bcolor, uint16_t x, uint16_t y, bool mode=false) { DWIN_Draw_String(false,true,font8x16,Select_Color,bcolor,x+4,y,F(mode ? "x" : " ")); diff --git a/Marlin/src/lcd/dwin/e3v2/dwin.h b/Marlin/src/lcd/dwin/e3v2/dwin.h index 0272748cd5d5..4b3460aae5c5 100644 --- a/Marlin/src/lcd/dwin/e3v2/dwin.h +++ b/Marlin/src/lcd/dwin/e3v2/dwin.h @@ -404,6 +404,7 @@ void DWIN_Update(); void EachMomentUpdate(); void DWIN_HandleScreen(); void DWIN_StatusChanged(const char *text); +void DWIN_StatusChanged_P(PGM_P const pstr); void DWIN_Draw_Checkbox(uint16_t color, uint16_t bcolor, uint16_t x, uint16_t y, bool mode /* = false*/); inline void DWIN_StartHoming() { HMI_flag.home_flag = true; }