🎨 Apply F() to kill / sendinfoscreen

This commit is contained in:
Scott Lahteine
2021-09-28 20:15:52 -05:00
parent 492d70424d
commit 3d102a77ca
52 changed files with 149 additions and 123 deletions

View File

@ -37,7 +37,7 @@ namespace ExtUI {
void onStartup() { nextion.Startup(); }
void onIdle() { nextion.IdleLoop(); }
void onPrinterKilled(PGM_P const error, PGM_P const component) { nextion.PrinterKilled(error,component); }
void onPrinterKilled(FSTR_P const error, FSTR_P const component) { nextion.PrinterKilled(error, component); }
void onMediaInserted() {}
void onMediaError() {}
void onMediaRemoved() {}

View File

@ -84,12 +84,12 @@ void NextionTFT::IdleLoop() {
UpdateOnChange();
}
void NextionTFT::PrinterKilled(PGM_P error, PGM_P component) {
void NextionTFT::PrinterKilled(FSTR_P const error, FSTR_P const component) {
SEND_TXT_END("page error");
SEND_TXT("t3", "Error");
SEND_TXT_P("t4", component);
SEND_TXT_P("t5", error);
SEND_TXT("t6", "Need reset");
SEND_TXT_F("t3", F("Error"));
SEND_TXT_F("t4", component);
SEND_TXT_F("t5", error);
SEND_TXT_F("t6", F("Need reset"));
}
void NextionTFT::PrintFinished() {

View File

@ -56,8 +56,8 @@
#define SEND_TEMP(x,y,t,z) (nextion.SendtoTFT(F(x)), nextion.SendtoTFT(F(".txt=\"")), LCD_SERIAL.print(y), nextion.SendtoTFT(F(t)), LCD_SERIAL.print(z), nextion.SendtoTFT(F("\"\xFF\xFF\xFF")))
#define SEND_VAL(x,y) (nextion.SendtoTFT(F(x)), nextion.SendtoTFT(F(".val=")), LCD_SERIAL.print(y), nextion.SendtoTFT(F("\xFF\xFF\xFF")))
#define SEND_TXT(x,y) (nextion.SendtoTFT(F(x)), nextion.SendtoTFT(F(".txt=\"")), nextion.SendtoTFT(F(y)), nextion.SendtoTFT(F("\"\xFF\xFF\xFF")))
#define SEND_TXT_P(x,y) (nextion.SendtoTFT(F(x)), nextion.SendtoTFT(F(".txt=\"")), nextion.SendtoTFT(y), nextion.SendtoTFT(F("\"\xFF\xFF\xFF")))
#define SEND_TXT(x,y) (nextion.SendtoTFT(F(x)), nextion.SendtoTFT(F(".txt=\"")), nextion.SendtoTFT(F(y)), nextion.SendtoTFT(F("\"\xFF\xFF\xFF")))
#define SEND_TXT_F(x,y) (nextion.SendtoTFT(F(x)), nextion.SendtoTFT(F(".txt=\"")), nextion.SendtoTFT(y), nextion.SendtoTFT(F("\"\xFF\xFF\xFF")))
#define SEND_VALasTXT(x,y) (nextion.SendtoTFT(F(x)), nextion.SendtoTFT(F(".txt=\"")), LCD_SERIAL.print(y), nextion.SendtoTFT(F("\"\xFF\xFF\xFF")))
#define SEND_TXT_END(x) (nextion.SendtoTFT(F(x)), nextion.SendtoTFT(F("\xFF\xFF\xFF")))
#define SEND_PCO2(x,y,z) (nextion.SendtoTFT(F(x)), LCD_SERIAL.print(y), nextion.SendtoTFT(F(".pco=")), nextion.SendtoTFT(F(z)), nextion.SendtoTFT(F("\xFF\xFF\xFF")))