Skip to content

Commit

Permalink
🩹 No GET_TEXT with DGUS_TFT
Browse files Browse the repository at this point in the history
Followup to #26164
  • Loading branch information
thinkyhead committed Oct 23, 2023
1 parent fd62c42 commit 30d492f
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions Marlin/src/lcd/extui/anycubic_vyper/dgus_tft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,8 @@ namespace Anycubic {
return stringLength;
}

#define GET_TEXT(M) Language_en::M

void DgusTFT::printerKilled(FSTR_P error_p, FSTR_P component_p) {

// copy string in FLASH to RAM for strcmp_P
Expand All @@ -293,9 +295,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");
}
Expand All @@ -305,9 +307,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");
}
Expand All @@ -317,9 +319,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");
}
Expand All @@ -329,9 +331,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");
}
Expand All @@ -341,7 +343,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);
Expand Down

0 comments on commit 30d492f

Please sign in to comment.