From d4de811d0f5c79ee256eba345c67cb9a26823916 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 23 Oct 2023 18:54:11 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20No=20GET=5FTEXT=20with=20DGUS=5F?= =?UTF-8?q?TFT?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to #26164 --- .../src/lcd/extui/anycubic_vyper/dgus_tft.cpp | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp b/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp index b1889281af56..4726cba3786a 100644 --- a/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp +++ b/Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp @@ -276,6 +276,9 @@ namespace Anycubic { return stringLength; } + #undef GET_TEXT + #define GET_TEXT(MSG) Language_en::MSG + void DgusTFT::printerKilled(FSTR_P error_p, FSTR_P component_p) { // copy string in FLASH to RAM for strcmp_P @@ -293,9 +296,9 @@ namespace Anycubic { DEBUG_ECHOLNPGM("printerKilled()\nerror: ", error, "\ncomponent: ", component); #endif - if (strcmp_P(error, Language_en::MSG_ERR_HEATING_FAILED) == 0) { + if (strcmp_P(error, GET_TEXT(MSG_ERR_HEATING_FAILED)) == 0) { - if (strcmp_P(component, Language_en::MSG_BED) == 0) { + if (strcmp_P(component, GET_TEXT(MSG_BED)) == 0) { changePageOfTFT(PAGE_CHS_ABNORMAL_BED_HEATER); SERIAL_ECHOLNPGM("Check Bed heater"); } @@ -305,9 +308,9 @@ namespace Anycubic { } } - else if (strcmp_P(error, Language_en::MSG_ERR_MINTEMP) == 0) { + else if (strcmp_P(error, GET_TEXT(MSG_ERR_MINTEMP)) == 0) { - if (strcmp_P(component, Language_en::MSG_BED) == 0) { + if (strcmp_P(component, GET_TEXT(MSG_BED)) == 0) { changePageOfTFT(PAGE_CHS_ABNORMAL_BED_NTC); SERIAL_ECHOLNPGM("Check Bed thermistor"); } @@ -317,9 +320,9 @@ namespace Anycubic { } } - else if (strcmp_P(error, Language_en::MSG_ERR_MAXTEMP) == 0) { + else if (strcmp_P(error, GET_TEXT(MSG_ERR_MAXTEMP)) == 0) { - if (strcmp_P(component, Language_en::MSG_BED) == 0) { + if (strcmp_P(component, GET_TEXT(MSG_BED)) == 0) { changePageOfTFT(PAGE_CHS_ABNORMAL_BED_NTC); SERIAL_ECHOLNPGM("Check Bed thermistor"); } @@ -329,9 +332,9 @@ namespace Anycubic { } } - else if (strcmp_P(error, Language_en::MSG_ERR_THERMAL_RUNAWAY) == 0) { + else if (strcmp_P(error, GET_TEXT(MSG_ERR_THERMAL_RUNAWAY)) == 0) { - if (strcmp_P(component, Language_en::MSG_BED) == 0) { + if (strcmp_P(component, GET_TEXT(MSG_BED)) == 0) { changePageOfTFT(PAGE_CHS_ABNORMAL_BED_HEATER); SERIAL_ECHOLNPGM("Check Bed thermal runaway"); } @@ -341,7 +344,7 @@ namespace Anycubic { } } - else if (strcmp_P(error, Language_en::MSG_KILL_HOMING_FAILED) == 0) { + else if (strcmp_P(error, GET_TEXT(MSG_KILL_HOMING_FAILED)) == 0) { if (strcmp_P(component, PSTR("X")) == 0) { changePageOfTFT(PAGE_CHS_ABNORMAL_X_ENDSTOP);