🎨 Apply F() to some ExtUI functions

This commit is contained in:
Scott Lahteine
2021-09-25 22:11:48 -05:00
parent 008bf1bcae
commit 12b5d997a2
37 changed files with 277 additions and 278 deletions

View File

@@ -110,12 +110,12 @@ void NextionTFT::StatusChange(const char * const msg) {
SEND_VALasTXT("tmppage.M117", msg);
}
void NextionTFT::SendtoTFT(PGM_P str) { // A helper to print PROGMEM string to the panel
void NextionTFT::SendtoTFT(FSTR_P fstr) { // A helper to print PROGMEM string to the panel
#if NEXDEBUG(N_SOME)
DEBUG_ECHOPGM_P(str);
DEBUG_ECHOF(fstr);
#endif
while (const char c = pgm_read_byte(str++))
LCD_SERIAL.write(c);
PGM_P str = FTOP(fstr);
while (const char c = pgm_read_byte(str++)) LCD_SERIAL.write(c);
}
bool NextionTFT::ReadTFTCommand() {
@@ -522,7 +522,7 @@ void NextionTFT::PanelAction(uint8_t req) {
case 66: // Refresh SD
if (!isPrinting()) {
injectCommands_P(PSTR("M21"));
injectCommands(F("M21"));
filenavigator.reset();
}
break;
@@ -546,8 +546,8 @@ void NextionTFT::PanelAction(uint8_t req) {
#if ENABLED(FILAMENT_LOAD_UNLOAD_GCODES)
if (canMove(getActiveTool())) {
switch (nextion_command[4]) {
case 'L': injectCommands_P(PSTR("M701")); break;
case 'U': injectCommands_P(PSTR("M702")); break;
case 'L': injectCommands(F("M701")); break;
case 'U': injectCommands(F("M702")); break;
}
}
else {