diff --git a/Marlin/src/feature/mmu/mmu2.cpp b/Marlin/src/feature/mmu/mmu2.cpp index 14f2623e14..363e4d5505 100644 --- a/Marlin/src/feature/mmu/mmu2.cpp +++ b/Marlin/src/feature/mmu/mmu2.cpp @@ -961,7 +961,7 @@ bool MMU2::eject_filament(const uint8_t index, const bool recover) { LCD_MESSAGE(MSG_MMU2_EJECT_RECOVER); BUZZ(200, 404); TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, F("MMU2 Eject Recover"), FPSTR(CONTINUE_STR))); - TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(PSTR("MMU2 Eject Recover"))); + TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(F("MMU2 Eject Recover"))); TERN_(HAS_RESUME_CONTINUE, wait_for_user_response()); BUZZ(200, 404); BUZZ(200, 404); diff --git a/Marlin/src/feature/pause.cpp b/Marlin/src/feature/pause.cpp index 9b7404d852..8a35a87eeb 100644 --- a/Marlin/src/feature/pause.cpp +++ b/Marlin/src/feature/pause.cpp @@ -194,7 +194,7 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load KEEPALIVE_STATE(PAUSED_FOR_USER); wait_for_user = true; // LCD click or M108 will clear this - TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(PSTR("Load Filament"))); + TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(F("Load Filament"))); #if ENABLED(HOST_PROMPT_SUPPORT) const char tool = '0' + TERN0(MULTI_FILAMENT_SENSOR, active_extruder); @@ -252,7 +252,7 @@ bool load_filament(const_float_t slow_load_length/*=0*/, const_float_t fast_load if (show_lcd) ui.pause_show_message(PAUSE_MESSAGE_PURGE); - TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_PURGE))); + TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENT_CHANGE_PURGE))); TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, GET_TEXT_F(MSG_FILAMENT_CHANGE_PURGE), FPSTR(CONTINUE_STR))); TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_Popup_Confirm(ICON_BLTouch, GET_TEXT(MSG_FILAMENT_CHANGE_PURGE), CONTINUE_STR)); wait_for_user = true; // A click or M108 breaks the purge_length loop @@ -513,7 +513,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep // Wait for filament insert by user and press button KEEPALIVE_STATE(PAUSED_FOR_USER); TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, GET_TEXT_F(MSG_NOZZLE_PARKED), FPSTR(CONTINUE_STR))); - TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_NOZZLE_PARKED))); + TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_NOZZLE_PARKED))); wait_for_user = true; // LCD click or M108 will clear this while (wait_for_user) { impatient_beep(max_beep_count); @@ -530,13 +530,13 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, GET_TEXT_F(MSG_HEATER_TIMEOUT), GET_TEXT_F(MSG_REHEAT))); - TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_HEATER_TIMEOUT))); + TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_HEATER_TIMEOUT))); TERN_(HAS_RESUME_CONTINUE, wait_for_user_response(0, true)); // Wait for LCD click or M108 TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_INFO, GET_TEXT_F(MSG_REHEATING))); - TERN_(EXTENSIBLE_UI, ExtUI::onStatusChanged_P(GET_TEXT(MSG_REHEATING))); + TERN_(EXTENSIBLE_UI, ExtUI::onStatusChanged(GET_TEXT_F(MSG_REHEATING))); TERN_(DWIN_CREALITY_LCD_ENHANCED, LCD_MESSAGE(MSG_REHEATING)); @@ -555,7 +555,7 @@ void wait_for_confirmation(const bool is_reload/*=false*/, const int8_t max_beep HOTEND_LOOP() thermalManager.heater_idle[e].start(nozzle_timeout); TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, GET_TEXT_F(MSG_REHEATDONE), FPSTR(CONTINUE_STR))); - TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_REHEATDONE))); + TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_REHEATDONE))); TERN_(DWIN_CREALITY_LCD_ENHANCED, LCD_MESSAGE(MSG_REHEATDONE)); IF_DISABLED(PAUSE_REHEAT_FAST_RESUME, wait_for_user = true); diff --git a/Marlin/src/gcode/config/M43.cpp b/Marlin/src/gcode/config/M43.cpp index ca9f5405ce..82089b7d97 100644 --- a/Marlin/src/gcode/config/M43.cpp +++ b/Marlin/src/gcode/config/M43.cpp @@ -345,7 +345,7 @@ void GcodeSuite::M43() { KEEPALIVE_STATE(PAUSED_FOR_USER); wait_for_user = true; TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, F("M43 Wait Called"), FPSTR(CONTINUE_STR))); - TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(PSTR("M43 Wait Called"))); + TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(F("M43 Wait Called"))); #endif for (;;) { diff --git a/Marlin/src/gcode/lcd/M0_M1.cpp b/Marlin/src/gcode/lcd/M0_M1.cpp index 952b24a2d1..17481f0198 100644 --- a/Marlin/src/gcode/lcd/M0_M1.cpp +++ b/Marlin/src/gcode/lcd/M0_M1.cpp @@ -69,7 +69,7 @@ void GcodeSuite::M0_M1() { if (parser.string_arg) ExtUI::onUserConfirmRequired(parser.string_arg); // Can this take an SRAM string?? else - ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_USERWAIT)); + ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_USERWAIT)); #elif ENABLED(DWIN_CREALITY_LCD_ENHANCED) if (parser.string_arg) DWIN_Popup_Confirm(ICON_BLTouch, parser.string_arg, GET_TEXT_F(MSG_USERWAIT)); diff --git a/Marlin/src/gcode/sd/M1001.cpp b/Marlin/src/gcode/sd/M1001.cpp index a9b7e42939..bd1a18734d 100644 --- a/Marlin/src/gcode/sd/M1001.cpp +++ b/Marlin/src/gcode/sd/M1001.cpp @@ -95,7 +95,7 @@ void GcodeSuite::M1001() { #if HAS_LEDS_OFF_FLAG if (long_print) { printerEventLEDs.onPrintCompleted(); - TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_PRINT_DONE))); + TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_PRINT_DONE))); TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, GET_TEXT_F(MSG_PRINT_DONE), FPSTR(CONTINUE_STR))); TERN_(HAS_RESUME_CONTINUE, wait_for_user_response(SEC_TO_MS(TERN(HAS_LCD_MENU, PE_LEDS_COMPLETED_TIME, 30)))); printerEventLEDs.onResumeAfterWait(); diff --git a/Marlin/src/lcd/extui/anycubic_chiron/FileNavigator.cpp b/Marlin/src/lcd/extui/anycubic_chiron/FileNavigator.cpp index 1339c39f3f..f49b17acc1 100644 --- a/Marlin/src/lcd/extui/anycubic_chiron/FileNavigator.cpp +++ b/Marlin/src/lcd/extui/anycubic_chiron/FileNavigator.cpp @@ -157,7 +157,7 @@ void FileNavigator::skiptofileindex(uint16_t skip) { // The new panel ignores entries that don't end in .GCO or .gcode so add and pad them. if (paneltype == AC_panel_new) { TFTSer.println("<<.GCO"); - Chiron.SendtoTFTLN(PSTR(".. .gcode")); + Chiron.SendtoTFTLN(F(".. .gcode")); } else { TFTSer.println("<<"); diff --git a/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp b/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp index e7b3941928..483da200e8 100644 --- a/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp +++ b/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp @@ -99,7 +99,7 @@ void ChironTFT::Startup() { // Enable leveling and Disable end stops during print // as Z home places nozzle above the bed so we need to allow it past the end stops - injectCommands_P(AC_cmnd_enable_leveling); + injectCommands(AC_cmnd_enable_leveling); // Startup tunes are defined in Tunes.h PlayTune(BEEPER_PIN, TERN(AC_DEFAULT_STARTUP_TUNE, Anycubic_PowerOn, GB_PowerOn), 1); @@ -244,7 +244,7 @@ void ChironTFT::StatusChange(const char * const msg) { // If probing completes ok save the mesh and park // Ignore the custom machine name if (strcmp_P(msg + strlen(CUSTOM_MACHINE_NAME), MARLIN_msg_ready) == 0) { - injectCommands_P(PSTR("M500\nG27")); + injectCommands(F("M500\nG27")); SendtoTFTLN(AC_msg_probing_complete); printer_state = AC_printer_idle; msg_matched = true; @@ -252,7 +252,7 @@ void ChironTFT::StatusChange(const char * const msg) { // If probing fails don't save the mesh raise the probe above the bad point if (strcmp_P(msg, MARLIN_msg_probing_failed) == 0) { PlayTune(BEEPER_PIN, BeepBeepBeeep, 1); - injectCommands_P(PSTR("G1 Z50 F500")); + injectCommands(F("G1 Z50 F500")); SendtoTFTLN(AC_msg_probing_complete); printer_state = AC_printer_idle; msg_matched = true; @@ -315,19 +315,20 @@ void ChironTFT::PrintComplete() { setSoftEndstopState(true); // enable endstops } -void ChironTFT::SendtoTFT(PGM_P str) { // A helper to print PROGMEM string to the panel +void ChironTFT::SendtoTFT(FSTR_P const fstr) { // A helper to print PROGMEM string to the panel #if ACDEBUG(AC_SOME) - SERIAL_ECHOPGM_P(str); + SERIAL_ECHOF(fstr); #endif + PGM_P str = FTOP(fstr); while (const char c = pgm_read_byte(str++)) TFTSer.write(c); } -void ChironTFT::SendtoTFTLN(PGM_P str = nullptr) { - if (str) { +void ChironTFT::SendtoTFTLN(FSTR_P const fstr) { + if (fstr) { #if ACDEBUG(AC_SOME) SERIAL_ECHOPGM("> "); #endif - SendtoTFT(str); + SendtoTFT(fstr); #if ACDEBUG(AC_SOME) SERIAL_EOL(); #endif @@ -426,9 +427,9 @@ void ChironTFT::SendFileList(int8_t startindex) { #if ACDEBUG(AC_INFO) SERIAL_ECHOLNPGM("## SendFileList ## ", startindex); #endif - SendtoTFTLN(PSTR("FN ")); + SendtoTFTLN(F("FN ")); filenavigator.getFiles(startindex, panel_type, 4); - SendtoTFTLN(PSTR("END")); + SendtoTFTLN(F("END")); } void ChironTFT::SelectFile() { @@ -512,55 +513,55 @@ void ChironTFT::PanelInfo(uint8_t req) { // information requests A0-A8 and A33 switch (req) { case 0: // A0 Get HOTEND Temp - SendtoTFT(PSTR("A0V ")); + SendtoTFT(F("A0V ")); TFTSer.println(getActualTemp_celsius(E0)); break; case 1: // A1 Get HOTEND Target Temp - SendtoTFT(PSTR("A1V ")); + SendtoTFT(F("A1V ")); TFTSer.println(getTargetTemp_celsius(E0)); break; case 2: // A2 Get BED Temp - SendtoTFT(PSTR("A2V ")); + SendtoTFT(F("A2V ")); TFTSer.println(getActualTemp_celsius(BED)); break; case 3: // A3 Get BED Target Temp - SendtoTFT(PSTR("A3V ")); + SendtoTFT(F("A3V ")); TFTSer.println(getTargetTemp_celsius(BED)); break; case 4: // A4 Get FAN Speed - SendtoTFT(PSTR("A4V ")); + SendtoTFT(F("A4V ")); TFTSer.println(getActualFan_percent(FAN0)); break; case 5: // A5 Get Current Coordinates - SendtoTFT(PSTR("A5V X: ")); + SendtoTFT(F("A5V X: ")); TFTSer.print(getAxisPosition_mm(X)); - SendtoTFT(PSTR(" Y: ")); + SendtoTFT(F(" Y: ")); TFTSer.print(getAxisPosition_mm(Y)); - SendtoTFT(PSTR(" Z: ")); + SendtoTFT(F(" Z: ")); TFTSer.println(getAxisPosition_mm(Z)); break; case 6: // A6 Get printing progress if (isPrintingFromMedia()) { - SendtoTFT(PSTR("A6V ")); + SendtoTFT(F("A6V ")); TFTSer.println(ui8tostr2(getProgress_percent())); } else - SendtoTFTLN(PSTR("A6V ---")); + SendtoTFTLN(F("A6V ---")); break; case 7: { // A7 Get Printing Time uint32_t time = getProgress_seconds_elapsed() / 60; - SendtoTFT(PSTR("A7V ")); + SendtoTFT(F("A7V ")); TFTSer.print(ui8tostr2(time / 60)); - SendtoTFT(PSTR(" H ")); + SendtoTFT(F(" H ")); TFTSer.print(ui8tostr2(time % 60)); - SendtoTFT(PSTR(" M")); + SendtoTFT(F(" M")); #if ACDEBUG(AC_ALL) SERIAL_ECHOLNPGM("Print time ", ui8tostr2(time / 60), ":", ui8tostr2(time % 60)); #endif @@ -575,9 +576,9 @@ void ChironTFT::PanelInfo(uint8_t req) { break; case 33: // A33 Get firmware info - SendtoTFT(PSTR("J33 ")); + SendtoTFT(F("J33 ")); // If there is an error recorded, show that instead of the FW version - if (!GetLastError()) SendtoTFTLN(PSTR(SHORT_BUILD_VERSION)); + if (!GetLastError()) SendtoTFTLN(F(SHORT_BUILD_VERSION)); break; } } @@ -608,7 +609,7 @@ void ChironTFT::PanelAction(uint8_t req) { } else { if (printer_state == AC_printer_resuming_from_power_outage) - injectCommands_P(PSTR("M1000 C")); // Cancel recovery + injectCommands(F("M1000 C")); // Cancel recovery SendtoTFTLN(AC_msg_stop); printer_state = AC_printer_idle; } @@ -625,7 +626,7 @@ void ChironTFT::PanelAction(uint8_t req) { case 14: { // A14 Start Printing // Allows printer to restart the job if we don't want to recover if (printer_state == AC_printer_resuming_from_power_outage) { - injectCommands_P(PSTR("M1000 C")); // Cancel recovery + injectCommands(F("M1000 C")); // Cancel recovery printer_state = AC_printer_idle; } #if ACDebugLevel >= 1 @@ -638,8 +639,8 @@ void ChironTFT::PanelAction(uint8_t req) { case 15: // A15 Resuming from outage if (printer_state == AC_printer_resuming_from_power_outage) { // Need to home here to restore the Z position - injectCommands_P(AC_cmnd_power_loss_recovery); - injectCommands_P(PSTR("M1000")); // home and start recovery + injectCommands(AC_cmnd_power_loss_recovery); + injectCommands(F("M1000")); // home and start recovery } break; @@ -675,7 +676,7 @@ void ChironTFT::PanelAction(uint8_t req) { if (panel_command[4] == 'S') setFeedrate_percent(atoi(&panel_command[5])); else { - SendtoTFT(PSTR("A20V ")); + SendtoTFT(F("A20V ")); TFTSer.println(getFeedrate_percent()); } break; @@ -683,9 +684,9 @@ void ChironTFT::PanelAction(uint8_t req) { case 21: // A21 Home Axis A21 X if (!isPrinting()) { switch ((char)panel_command[4]) { - case 'X': injectCommands_P(PSTR("G28X")); break; - case 'Y': injectCommands_P(PSTR("G28Y")); break; - case 'Z': injectCommands_P(PSTR("G28Z")); break; + case 'X': injectCommands(F("G28X")); break; + case 'Y': injectCommands(F("G28Y")); break; + case 'Z': injectCommands(F("G28Z")); break; case 'C': injectCommands_P(G28_STR); break; } } @@ -771,7 +772,7 @@ void ChironTFT::PanelProcess(uint8_t req) { pos.y = atoi(&panel_command[FindToken('Y')+1]); pos_z = getMeshPoint(pos); - SendtoTFT(PSTR("A29V ")); + SendtoTFT(F("A29V ")); TFTSer.println(pos_z * 100); if (!isPrinting()) { setSoftEndstopState(true); // disable endstops @@ -809,7 +810,7 @@ void ChironTFT::PanelProcess(uint8_t req) { SendtoTFTLN(AC_msg_start_probing); - injectCommands_P(PSTR("G28\nG29")); + injectCommands(F("G28\nG29")); printer_state = AC_printer_probing; } } @@ -823,7 +824,7 @@ void ChironTFT::PanelProcess(uint8_t req) { if (FindToken('C') != -1) { // Restore and apply original offsets if (!isPrinting()) { - injectCommands_P(PSTR("M501\nM420 S1")); + injectCommands(F("M501\nM420 S1")); selectedmeshpoint.x = selectedmeshpoint.y = 99; SERIAL_ECHOLNF(AC_msg_mesh_changes_abandoned); } @@ -832,14 +833,14 @@ void ChironTFT::PanelProcess(uint8_t req) { else if (FindToken('D') != -1) { // Save Z Offset tables and restore leveling state if (!isPrinting()) { setAxisPosition_mm(1.0,Z); // Lift nozzle before any further movements are made - injectCommands_P(PSTR("M500")); + injectCommands(F("M500")); SERIAL_ECHOLNF(AC_msg_mesh_changes_saved); selectedmeshpoint.x = selectedmeshpoint.y = 99; } } else if (FindToken('G') != -1) { // Get current offset - SendtoTFT(PSTR("A31V ")); + SendtoTFT(F("A31V ")); // When printing use the live z Offset position // we will use babystepping to move the print head if (isPrinting()) @@ -874,7 +875,7 @@ void ChironTFT::PanelProcess(uint8_t req) { babystepAxis_steps(steps, Z); live_Zoffset += Zshift; } - SendtoTFT(PSTR("A31V ")); + SendtoTFT(F("A31V ")); TFTSer.println(live_Zoffset); } else { @@ -892,7 +893,7 @@ void ChironTFT::PanelProcess(uint8_t req) { #endif setZOffset_mm(currZOffset + Zshift); - SendtoTFT(PSTR("A31V ")); + SendtoTFT(F("A31V ")); TFTSer.println(getZOffset_mm()); if (isAxisPositionKnown(Z)) { @@ -911,7 +912,7 @@ void ChironTFT::PanelProcess(uint8_t req) { case 32: { // A32 clean leveling beep flag // Ignore request if printing //if (isPrinting()) break; - //injectCommands_P(PSTR("M500\nM420 S1\nG1 Z10 F240\nG1 X0 Y0 F6000")); + //injectCommands(F("M500\nM420 S1\nG1 Z10 F240\nG1 X0 Y0 F6000")); //TFTSer.println(); } break; @@ -919,7 +920,7 @@ void ChironTFT::PanelProcess(uint8_t req) { case 34: { // A34 Adjust single mesh point A34 C/S X1 Y1 V123 if (panel_command[3] == 'C') { // Restore original offsets - injectCommands_P(PSTR("M501\nM420 S1")); + injectCommands(F("M501\nM420 S1")); selectedmeshpoint.x = selectedmeshpoint.y = 99; //printer_state = AC_printer_idle; } diff --git a/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.h b/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.h index 7eb0049993..a80763e372 100644 --- a/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.h +++ b/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.h @@ -59,16 +59,16 @@ class ChironTFT { public: static void Startup(); static void IdleLoop(); - static void PrinterKilled(PGM_P,PGM_P); + static void PrinterKilled(PGM_P, PGM_P); static void MediaEvent(media_event_t); static void TimerEvent(timer_event_t); static void FilamentRunout(); - static void ConfirmationRequest(const char * const ); - static void StatusChange(const char * const ); + static void ConfirmationRequest(const char * const); + static void StatusChange(const char * const); static void PowerLossRecovery(); static void PrintComplete(); - static void SendtoTFT(PGM_P); - static void SendtoTFTLN(PGM_P); + static void SendtoTFT(FSTR_P const); + static void SendtoTFTLN(FSTR_P const); private: static void DetectPanelType(); static bool ReadTFTCommand(); diff --git a/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft_defs.h b/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft_defs.h index d9157fc4e6..0fd7770cdd 100644 --- a/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft_defs.h +++ b/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft_defs.h @@ -57,46 +57,46 @@ #define AC_LOWEST_MESHPOINT_VAL -10 // The lowest value you can set for a single mesh point offset // TFT panel commands -#define AC_msg_sd_card_inserted PSTR("J00") -#define AC_msg_sd_card_removed PSTR("J01") -#define AC_msg_no_sd_card PSTR("J02") -#define AC_msg_usb_connected PSTR("J03") -#define AC_msg_print_from_sd_card PSTR("J04") -#define AC_msg_pause PSTR("J05") -#define AC_msg_nozzle_heating PSTR("J06") -#define AC_msg_nozzle_heating_done PSTR("J07") -#define AC_msg_bed_heating PSTR("J08") -#define AC_msg_bed_heating_done PSTR("J09") -#define AC_msg_nozzle_temp_abnormal PSTR("J10") -#define AC_msg_kill_lcd PSTR("J11") -#define AC_msg_ready PSTR("J12") -#define AC_msg_low_nozzle_temp PSTR("J13") -#define AC_msg_print_complete PSTR("J14") -#define AC_msg_filament_out_alert PSTR("J15") -#define AC_msg_stop PSTR("J16") -#define AC_msg_main_board_has_reset PSTR("J17") -#define AC_msg_paused PSTR("J18") -#define AC_msg_j19_unknown PSTR("J19") -#define AC_msg_sd_file_open_success PSTR("J20") -#define AC_msg_sd_file_open_failed PSTR("J21") -#define AC_msg_level_monitor_finished PSTR("J22") -#define AC_msg_filament_out_block PSTR("J23") -#define AC_msg_probing_not_allowed PSTR("J24") -#define AC_msg_probing_complete PSTR("J25") -#define AC_msg_start_probing PSTR("J26") -#define AC_msg_version PSTR("J27") -#define AC_msg_mesh_changes_abandoned PSTR("Mesh changes abandoned, previous mesh restored.") -#define AC_msg_mesh_changes_saved PSTR("Mesh changes saved.") -#define AC_msg_old_panel_detected PSTR("Standard TFT panel detected!") -#define AC_msg_new_panel_detected PSTR("New TFT panel detected!") -#define AC_msg_powerloss_recovery PSTR("Resuming from power outage! select the same SD file then press resume") +#define AC_msg_sd_card_inserted F("J00") +#define AC_msg_sd_card_removed F("J01") +#define AC_msg_no_sd_card F("J02") +#define AC_msg_usb_connected F("J03") +#define AC_msg_print_from_sd_card F("J04") +#define AC_msg_pause F("J05") +#define AC_msg_nozzle_heating F("J06") +#define AC_msg_nozzle_heating_done F("J07") +#define AC_msg_bed_heating F("J08") +#define AC_msg_bed_heating_done F("J09") +#define AC_msg_nozzle_temp_abnormal F("J10") +#define AC_msg_kill_lcd F("J11") +#define AC_msg_ready F("J12") +#define AC_msg_low_nozzle_temp F("J13") +#define AC_msg_print_complete F("J14") +#define AC_msg_filament_out_alert F("J15") +#define AC_msg_stop F("J16") +#define AC_msg_main_board_has_reset F("J17") +#define AC_msg_paused F("J18") +#define AC_msg_j19_unknown F("J19") +#define AC_msg_sd_file_open_success F("J20") +#define AC_msg_sd_file_open_failed F("J21") +#define AC_msg_level_monitor_finished F("J22") +#define AC_msg_filament_out_block F("J23") +#define AC_msg_probing_not_allowed F("J24") +#define AC_msg_probing_complete F("J25") +#define AC_msg_start_probing F("J26") +#define AC_msg_version F("J27") +#define AC_msg_mesh_changes_abandoned F("Mesh changes abandoned, previous mesh restored.") +#define AC_msg_mesh_changes_saved F("Mesh changes saved.") +#define AC_msg_old_panel_detected F("Standard TFT panel detected!") +#define AC_msg_new_panel_detected F("New TFT panel detected!") +#define AC_msg_powerloss_recovery F("Resuming from power outage! select the same SD file then press resume") // Error messages must not contain spaces -#define AC_msg_error_bed_temp PSTR("Abnormal_bed_temp") -#define AC_msg_error_hotend_temp PSTR("Abnormal_hotend_temp") -#define AC_msg_error_sd_card PSTR("SD_card_error") -#define AC_msg_filament_out PSTR("Filament_runout") -#define AC_msg_power_loss PSTR("Power_failure") -#define AC_msg_eeprom_version PSTR("EEPROM_ver_wrong") +#define AC_msg_error_bed_temp F("Abnormal_bed_temp") +#define AC_msg_error_hotend_temp F("Abnormal_hotend_temp") +#define AC_msg_error_sd_card F("SD_card_error") +#define AC_msg_filament_out F("Filament_runout") +#define AC_msg_power_loss F("Power_failure") +#define AC_msg_eeprom_version F("EEPROM_ver_wrong") #define MARLIN_msg_start_probing PSTR("Probing Point 1/25") #define MARLIN_msg_probing_failed PSTR("Probing Failed") @@ -113,16 +113,16 @@ #define MARLIN_msg_filament_purging PSTR("Filament Purging...") #define MARLIN_msg_special_pause PSTR("PB") -#define AC_cmnd_auto_unload_filament PSTR("M701") // Use Marlin unload routine -#define AC_cmnd_auto_load_filament PSTR("M702 M0 PB") // Use Marlin load routing then pause for user to clean nozzle +#define AC_cmnd_auto_unload_filament F("M701") // Use Marlin unload routine +#define AC_cmnd_auto_load_filament F("M702 M0 PB") // Use Marlin load routing then pause for user to clean nozzle -#define AC_cmnd_manual_load_filament PSTR("M83\nG1 E50 F700\nM82") // replace the manual panel commands with something a little faster -#define AC_cmnd_manual_unload_filament PSTR("M83\nG1 E-50 F1200\nM82") -#define AC_cmnd_enable_leveling PSTR("M420SV") -#define AC_cmnd_power_loss_recovery PSTR("G28XYR5\nG28Z") // Lift, home X and Y then home Z when in 'safe' position +#define AC_cmnd_manual_load_filament F("M83\nG1 E50 F700\nM82") // replace the manual panel commands with something a little faster +#define AC_cmnd_manual_unload_filament F("M83\nG1 E-50 F1200\nM82") +#define AC_cmnd_enable_leveling F("M420SV") +#define AC_cmnd_power_loss_recovery F("G28XYR5\nG28Z") // Lift, home X and Y then home Z when in 'safe' position -#define AC_Test_for_OldPanel PSTR("SIZE") // An old panel will respond with 'SXY 480 320' a new panel wont respond. -#define AC_Test_for_NewPanel PSTR("J200") // A new panel will respond with '[0]=0 [1]=0' to '[19]=0 ' an old panel wont respond +#define AC_Test_for_OldPanel F("SIZE") // An old panel will respond with 'SXY 480 320' a new panel wont respond. +#define AC_Test_for_NewPanel F("J200") // A new panel will respond with '[0]=0 [1]=0' to '[19]=0 ' an old panel wont respond namespace Anycubic { enum heater_state_t : uint8_t { diff --git a/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp b/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp index e07e377dfc..5bbcfd0b5e 100644 --- a/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp +++ b/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp @@ -104,7 +104,7 @@ void AnycubicTFTClass::OnSetup() { SelectedFile[0] = 0; #if ENABLED(STARTUP_CHIME) - injectCommands_P(PSTR("M300 P250 S554\nM300 P250 S554\nM300 P250 S740\nM300 P250 S554\nM300 P250 S740\nM300 P250 S554\nM300 P500 S831")); + injectCommands(F("M300 P250 S554\nM300 P250 S554\nM300 P250 S740\nM300 P250 S554\nM300 P250 S740\nM300 P250 S554\nM300 P500 S831")); #endif #if ENABLED(ANYCUBIC_LCD_DEBUG) SERIAL_ECHOLNPGM("TFT Serial Debug: Finished startup"); @@ -122,7 +122,7 @@ void AnycubicTFTClass::OnCommandScan() { #endif mediaPrintingState = AMPRINTSTATE_NOT_PRINTING; mediaPauseState = AMPAUSESTATE_NOT_PAUSED; - injectCommands_P(PSTR("M84\nM27")); // disable stepper motors and force report of SD status + injectCommands(F("M84\nM27")); // disable stepper motors and force report of SD status delay_ms(200); // tell printer to release resources of print to indicate it is done SENDLINE_DBG_PGM("J14", "TFT Serial Debug: SD Print Stopped... J14"); @@ -249,48 +249,48 @@ void AnycubicTFTClass::HandleSpecialMenu() { switch (SelectedDirectory[2]) { case '1': // "<01ZUp0.1>" SERIAL_ECHOLNPGM("Special Menu: Z Up 0.1"); - injectCommands_P(PSTR("G91\nG1 Z+0.1\nG90")); + injectCommands(F("G91\nG1 Z+0.1\nG90")); break; case '2': // "<02ZUp0.02>" SERIAL_ECHOLNPGM("Special Menu: Z Up 0.02"); - injectCommands_P(PSTR("G91\nG1 Z+0.02\nG90")); + injectCommands(F("G91\nG1 Z+0.02\nG90")); break; case '3': // "<03ZDn0.02>" SERIAL_ECHOLNPGM("Special Menu: Z Down 0.02"); - injectCommands_P(PSTR("G91\nG1 Z-0.02\nG90")); + injectCommands(F("G91\nG1 Z-0.02\nG90")); break; case '4': // "<04ZDn0.1>" SERIAL_ECHOLNPGM("Special Menu: Z Down 0.1"); - injectCommands_P(PSTR("G91\nG1 Z-0.1\nG90")); + injectCommands(F("G91\nG1 Z-0.1\nG90")); break; case '5': // "<05PrehtBed>" SERIAL_ECHOLNPGM("Special Menu: Preheat Bed"); - injectCommands_P(PSTR("M140 S65")); + injectCommands(F("M140 S65")); break; case '6': // "<06SMeshLvl>" SERIAL_ECHOLNPGM("Special Menu: Start Mesh Leveling"); - injectCommands_P(PSTR("G29S1")); + injectCommands(F("G29S1")); break; case '7': // "<07MeshNPnt>" SERIAL_ECHOLNPGM("Special Menu: Next Mesh Point"); - injectCommands_P(PSTR("G29S2")); + injectCommands(F("G29S2")); break; case '8': // "<08HtEndPID>" SERIAL_ECHOLNPGM("Special Menu: Auto Tune Hotend PID"); // need to dwell for half a second to give the fan a chance to start before the pid tuning starts - injectCommands_P(PSTR("M106 S204\nG4 P500\nM303 E0 S215 C15 U1")); + injectCommands(F("M106 S204\nG4 P500\nM303 E0 S215 C15 U1")); break; case '9': // "<09HtBedPID>" SERIAL_ECHOLNPGM("Special Menu: Auto Tune Hotbed Pid"); - injectCommands_P(PSTR("M303 E-1 S65 C6 U1")); + injectCommands(F("M303 E-1 S65 C6 U1")); break; default: @@ -302,12 +302,12 @@ void AnycubicTFTClass::HandleSpecialMenu() { switch (SelectedDirectory[2]) { case '0': // "<10FWDeflts>" SERIAL_ECHOLNPGM("Special Menu: Load FW Defaults"); - injectCommands_P(PSTR("M502\nM300 P105 S1661\nM300 P210 S1108")); + injectCommands(F("M502\nM300 P105 S1661\nM300 P210 S1108")); break; case '1': // "<11SvEEPROM>" SERIAL_ECHOLNPGM("Special Menu: Save EEPROM"); - injectCommands_P(PSTR("M500\nM300 P105 S1108\nM300 P210 S1661")); + injectCommands(F("M500\nM300 P105 S1108\nM300 P210 S1661")); break; default: @@ -319,38 +319,38 @@ void AnycubicTFTClass::HandleSpecialMenu() { switch (SelectedDirectory[2]) { case '1': // "<01PrehtBed>" SERIAL_ECHOLNPGM("Special Menu: Preheat Bed"); - injectCommands_P(PSTR("M140 S65")); + injectCommands(F("M140 S65")); break; case '2': // "<02ABL>" SERIAL_ECHOLNPGM("Special Menu: Auto Bed Leveling"); - injectCommands_P(PSTR("G29N")); + injectCommands(F("G29N")); break; case '3': // "<03HtendPID>" SERIAL_ECHOLNPGM("Special Menu: Auto Tune Hotend PID"); // need to dwell for half a second to give the fan a chance to start before the pid tuning starts - injectCommands_P(PSTR("M106 S204\nG4 P500\nM303 E0 S215 C15 U1")); + injectCommands(F("M106 S204\nG4 P500\nM303 E0 S215 C15 U1")); break; case '4': // "<04HtbedPID>" SERIAL_ECHOLNPGM("Special Menu: Auto Tune Hotbed Pid"); - injectCommands_P(PSTR("M303 E-1 S65 C6 U1")); + injectCommands(F("M303 E-1 S65 C6 U1")); break; case '5': // "<05FWDeflts>" SERIAL_ECHOLNPGM("Special Menu: Load FW Defaults"); - injectCommands_P(PSTR("M502\nM300 P105 S1661\nM300 P210 S1108")); + injectCommands(F("M502\nM300 P105 S1661\nM300 P210 S1108")); break; case '6': // "<06SvEEPROM>" SERIAL_ECHOLNPGM("Special Menu: Save EEPROM"); - injectCommands_P(PSTR("M500\nM300 P105 S1108\nM300 P210 S1661")); + injectCommands(F("M500\nM300 P105 S1108\nM300 P210 S1661")); break; case '7': // <07SendM108> SERIAL_ECHOLNPGM("Special Menu: Send User Confirmation"); - injectCommands_P(PSTR("M108")); + injectCommands(F("M108")); break; default: @@ -705,7 +705,7 @@ void AnycubicTFTClass::GetCommandFromTFT() { } else if (CodeSeen('C') && !isPrinting()) { if (getAxisPosition_mm(Z) < 10) - injectCommands_P(PSTR("G1 Z10")); // RASE Z AXIS + injectCommands(F("G1 Z10")); // RASE Z AXIS tempvalue = constrain(CodeValue(), 0, 275); setTargetTemp_celsius(tempvalue, (extruder_t)E0); } @@ -756,11 +756,11 @@ void AnycubicTFTClass::GetCommandFromTFT() { if (!isPrinting() && !isPrintingFromMediaPaused()) { if (CodeSeen('X') || CodeSeen('Y') || CodeSeen('Z')) { if (CodeSeen('X')) - injectCommands_P(PSTR("G28X")); + injectCommands(F("G28X")); if (CodeSeen('Y')) - injectCommands_P(PSTR("G28Y")); + injectCommands(F("G28Y")); if (CodeSeen('Z')) - injectCommands_P(PSTR("G28Z")); + injectCommands(F("G28Z")); } else if (CodeSeen('C')) { injectCommands_P(G28_STR); @@ -831,7 +831,7 @@ void AnycubicTFTClass::GetCommandFromTFT() { case 23: // A23 preheat pla if (!isPrinting()) { if (getAxisPosition_mm(Z) < 10) - injectCommands_P(PSTR("G1 Z10")); // RASE Z AXIS + injectCommands(F("G1 Z10")); // RASE Z AXIS setTargetTemp_celsius(PREHEAT_1_TEMP_BED, (heater_t)BED); setTargetTemp_celsius(PREHEAT_1_TEMP_HOTEND, (extruder_t)E0); @@ -842,7 +842,7 @@ void AnycubicTFTClass::GetCommandFromTFT() { case 24:// A24 preheat abs if (!isPrinting()) { if (getAxisPosition_mm(Z) < 10) - injectCommands_P(PSTR("G1 Z10")); // RASE Z AXIS + injectCommands(F("G1 Z10")); // RASE Z AXIS setTargetTemp_celsius(PREHEAT_2_TEMP_BED, (heater_t)BED); setTargetTemp_celsius(PREHEAT_2_TEMP_HOTEND, (extruder_t)E0); @@ -933,7 +933,7 @@ void AnycubicTFTClass::DoFilamentRunoutCheck() { if (READ(FIL_RUNOUT1_PIN)) { if (mediaPrintingState == AMPRINTSTATE_PRINTING || mediaPrintingState == AMPRINTSTATE_PAUSED || mediaPrintingState == AMPRINTSTATE_PAUSE_REQUESTED) { // play tone to indicate filament is out - injectCommands_P(PSTR("\nM300 P200 S1567\nM300 P200 S1174\nM300 P200 S1567\nM300 P200 S1174\nM300 P2000 S1567")); + injectCommands(F("\nM300 P200 S1567\nM300 P200 S1174\nM300 P200 S1567\nM300 P200 S1174\nM300 P2000 S1567")); // tell the user that the filament has run out and wait SENDLINE_DBG_PGM("J23", "TFT Serial Debug: Blocking filament prompt... J23"); @@ -969,7 +969,7 @@ void AnycubicTFTClass::PausePrint() { SENDLINE_DBG_PGM("J05", "TFT Serial Debug: SD print pause started... J05"); // J05 printing pause // for some reason pausing the print doesn't retract the extruder so force a manual one here - injectCommands_P(PSTR("G91\nG1 E-2 F1800\nG90")); + injectCommands(F("G91\nG1 E-2 F1800\nG90")); pausePrint(); } #endif @@ -1018,7 +1018,7 @@ void AnycubicTFTClass::StopPrint() { SENDLINE_DBG_PGM("J16", "TFT Serial Debug: SD print stop called... J16"); // for some reason stopping the print doesn't retract the extruder so force a manual one here - injectCommands_P(PSTR("G91\nG1 E-2 F1800\nG90")); + injectCommands(F("G91\nG1 E-2 F1800\nG90")); stopPrint(); #endif } diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.cpp b/Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.cpp index f7d8da69fc..58c7baa0b6 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.cpp +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSRxHandler.cpp @@ -52,26 +52,26 @@ void DGUSRxHandler::ScreenChange(DGUS_VP &vp, void *data_ptr) { #endif if (!ExtUI::isMediaInserted()) { - dgus_screen_handler.SetStatusMessagePGM(GET_TEXT(MSG_NO_MEDIA)); + dgus_screen_handler.SetStatusMessage(GET_TEXT_F(MSG_NO_MEDIA)); return; } card.cdroot(); #else - dgus_screen_handler.SetStatusMessagePGM(GET_TEXT(MSG_NO_MEDIA)); + dgus_screen_handler.SetStatusMessage(GET_TEXT_F(MSG_NO_MEDIA)); return; #endif } if (vp.addr == DGUS_Addr::SCREENCHANGE_Idle && (ExtUI::isPrinting() || ExtUI::isPrintingPaused())) { - dgus_screen_handler.SetStatusMessagePGM(PSTR("Impossible while printing")); + dgus_screen_handler.SetStatusMessage(F("Impossible while printing")); return; } if (vp.addr == DGUS_Addr::SCREENCHANGE_Printing && (!ExtUI::isPrinting() && !ExtUI::isPrintingPaused())) { - dgus_screen_handler.SetStatusMessagePGM(PSTR("Impossible while idle")); + dgus_screen_handler.SetStatusMessage(F("Impossible while idle")); return; } @@ -139,7 +139,7 @@ void DGUSRxHandler::ScreenChange(DGUS_VP &vp, void *data_ptr) { UNUSED(data_ptr); if (dgus_screen_handler.filelist_selected < 0) { - dgus_screen_handler.SetStatusMessagePGM(PSTR("No file selected")); + dgus_screen_handler.SetStatusMessage(F("No file selected")); return; } @@ -149,7 +149,7 @@ void DGUSRxHandler::ScreenChange(DGUS_VP &vp, void *data_ptr) { } if (!dgus_screen_handler.IsPrinterIdle()) { - dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_BUSY)); return; } @@ -207,7 +207,7 @@ void DGUSRxHandler::PrintResume(DGUS_VP &vp, void *data_ptr) { } if (!dgus_screen_handler.IsPrinterIdle()) { - dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_BUSY)); return; } @@ -364,7 +364,7 @@ void DGUSRxHandler::TempCool(DGUS_VP &vp, void *data_ptr) { #endif } - dgus_screen_handler.SetStatusMessagePGM(PSTR("Cooling...")); + dgus_screen_handler.SetStatusMessage(F("Cooling...")); dgus_screen_handler.TriggerFullUpdate(); } @@ -390,12 +390,12 @@ void DGUSRxHandler::ZOffset(DGUS_VP &vp, void *data_ptr) { UNUSED(vp); if (!ExtUI::isAxisPositionKnown(ExtUI::Z)) { - dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_HOMING_REQUIRED); + dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_HOMING_REQUIRED)); return; } if (!dgus_screen_handler.IsPrinterIdle()) { - dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_BUSY)); return; } @@ -414,12 +414,12 @@ void DGUSRxHandler::ZOffsetStep(DGUS_VP &vp, void *data_ptr) { UNUSED(vp); if (!ExtUI::isAxisPositionKnown(ExtUI::Z)) { - dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_HOMING_REQUIRED); + dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_HOMING_REQUIRED)); return; } if (!dgus_screen_handler.IsPrinterIdle()) { - dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_BUSY)); return; } @@ -456,12 +456,12 @@ void DGUSRxHandler::MoveToPoint(DGUS_VP &vp, void *data_ptr) { UNUSED(vp); if (!ExtUI::isPositionKnown()) { - dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_HOMING_REQUIRED); + dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_HOMING_REQUIRED)); return; } if (!dgus_screen_handler.IsPrinterIdle()) { - dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_BUSY)); return; } @@ -506,17 +506,17 @@ void DGUSRxHandler::Probe(DGUS_VP &vp, void *data_ptr) { UNUSED(data_ptr); #if ENABLED(MESH_BED_LEVELING) - dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_ABL_REQUIRED); + dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_ABL_REQUIRED)); return; #endif if (!ExtUI::isPositionKnown()) { - dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_HOMING_REQUIRED); + dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_HOMING_REQUIRED)); return; } if (!dgus_screen_handler.IsPrinterIdle()) { - dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_BUSY)); return; } @@ -535,7 +535,7 @@ void DGUSRxHandler::DisableABL(DGUS_VP &vp, void *data_ptr) { UNUSED(data_ptr); if (!dgus_screen_handler.IsPrinterIdle()) { - dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_BUSY)); return; } @@ -576,7 +576,7 @@ void DGUSRxHandler::FilamentMove(DGUS_VP &vp, void *data_ptr) { UNUSED(vp); if (!dgus_screen_handler.IsPrinterIdle()) { - dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_BUSY)); return; } @@ -600,7 +600,7 @@ void DGUSRxHandler::FilamentMove(DGUS_VP &vp, void *data_ptr) { } if (ExtUI::getActualTemp_celsius(extruder) < (float)EXTRUDE_MINTEMP) { - dgus_screen_handler.SetStatusMessagePGM(PSTR("Temperature too low")); + dgus_screen_handler.SetStatusMessage(F("Temperature too low")); return; } @@ -620,7 +620,7 @@ void DGUSRxHandler::Home(DGUS_VP &vp, void *data_ptr) { UNUSED(vp); if (!dgus_screen_handler.IsPrinterIdle()) { - dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_BUSY)); return; } @@ -664,7 +664,7 @@ void DGUSRxHandler::Move(DGUS_VP &vp, void *data_ptr) { } if (!ExtUI::isAxisPositionKnown(axis)) { - dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_HOMING_REQUIRED); + dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_HOMING_REQUIRED)); return; } @@ -720,7 +720,7 @@ void DGUSRxHandler::MoveStep(DGUS_VP &vp, void *data_ptr) { } if (!ExtUI::isAxisPositionKnown(axis)) { - dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_HOMING_REQUIRED); + dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_HOMING_REQUIRED)); return; } @@ -757,7 +757,7 @@ void DGUSRxHandler::GcodeExecute(DGUS_VP &vp, void *data_ptr) { } if (!dgus_screen_handler.IsPrinterIdle()) { - dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_BUSY)); return; } @@ -780,7 +780,7 @@ void DGUSRxHandler::ResetEEPROM(DGUS_VP &vp, void *data_ptr) { } if (!dgus_screen_handler.IsPrinterIdle()) { - dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_BUSY)); return; } @@ -798,7 +798,7 @@ void DGUSRxHandler::SettingsExtra(DGUS_VP &vp, void *data_ptr) { case DGUS_Data::Extra::BUTTON1: #if ENABLED(BLTOUCH) if (!dgus_screen_handler.IsPrinterIdle()) { - dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_BUSY)); return; } @@ -844,7 +844,7 @@ void DGUSRxHandler::PIDSetTemp(DGUS_VP &vp, void *data_ptr) { UNUSED(vp); if (!dgus_screen_handler.IsPrinterIdle()) { - dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_BUSY)); return; } @@ -875,7 +875,7 @@ void DGUSRxHandler::PIDRun(DGUS_VP &vp, void *data_ptr) { UNUSED(data_ptr); if (!dgus_screen_handler.IsPrinterIdle()) { - dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_BUSY)); return; } @@ -889,7 +889,7 @@ void DGUSRxHandler::PIDRun(DGUS_VP &vp, void *data_ptr) { heater = H_BED; break; #else - dgus_screen_handler.SetStatusMessagePGM(PSTR("Bed PID disabled")); + dgus_screen_handler.SetStatusMessage(F("Bed PID disabled")); return; #endif case DGUS_Data::Heater::H0: @@ -897,7 +897,7 @@ void DGUSRxHandler::PIDRun(DGUS_VP &vp, void *data_ptr) { heater = H_E0; break; #else - dgus_screen_handler.SetStatusMessagePGM(PSTR("PID disabled")); + dgus_screen_handler.SetStatusMessage(F("PID disabled")); return; #endif #if HOTENDS > 1 @@ -906,7 +906,7 @@ void DGUSRxHandler::PIDRun(DGUS_VP &vp, void *data_ptr) { heater = H_E1; break; #else - dgus_screen_handler.SetStatusMessagePGM(PSTR("PID disabled")); + dgus_screen_handler.SetStatusMessage(F("PID disabled")); return; #endif #endif @@ -936,7 +936,7 @@ void DGUSRxHandler::PIDRun(DGUS_VP &vp, void *data_ptr) { } if (!dgus_screen_handler.IsPrinterIdle()) { - dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_BUSY)); return; } @@ -955,12 +955,12 @@ void DGUSRxHandler::PIDRun(DGUS_VP &vp, void *data_ptr) { } if (!dgus_screen_handler.IsPrinterIdle()) { - dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_BUSY)); return; } if (!recovery.valid()) { - dgus_screen_handler.SetStatusMessagePGM(PSTR("Invalid recovery data")); + dgus_screen_handler.SetStatusMessage(F("Invalid recovery data")); return; } diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp index 6316f1194b..b2189f1c82 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.cpp @@ -135,20 +135,17 @@ void DGUSScreenHandler::Loop() { return; } - if (current_screen == DGUS_Screen::LEVELING_PROBING - && IsPrinterIdle()) { + if (current_screen == DGUS_Screen::LEVELING_PROBING && IsPrinterIdle()) { dgus_display.PlaySound(3); - SetStatusMessagePGM(ExtUI::getMeshValid() ? - PSTR("Probing successful") - : PSTR("Probing failed")); + SetStatusMessage(ExtUI::getMeshValid() ? F("Probing successful") : F("Probing failed")); MoveToScreen(DGUS_Screen::LEVELING_AUTOMATIC); return; } if (status_expire > 0 && ELAPSED(ms, status_expire)) { - SetStatusMessagePGM(NUL_STR, 0); + SetStatusMessage(FPSTR(NUL_STR), 0); return; } @@ -194,7 +191,7 @@ void DGUSScreenHandler::SettingsReset() { Ready(); } - SetStatusMessagePGM(PSTR("EEPROM reset")); + SetStatusMessage(F("EEPROM reset")); } void DGUSScreenHandler::StoreSettings(char *buff) { @@ -229,13 +226,13 @@ void DGUSScreenHandler::LoadSettings(const char *buff) { void DGUSScreenHandler::ConfigurationStoreWritten(bool success) { if (!success) { - SetStatusMessagePGM(PSTR("EEPROM write failed")); + SetStatusMessage(F("EEPROM write failed")); } } void DGUSScreenHandler::ConfigurationStoreRead(bool success) { if (!success) { - SetStatusMessagePGM(PSTR("EEPROM read failed")); + SetStatusMessage(F("EEPROM read failed")); } else if (!settings_ready) { settings_ready = true; @@ -324,7 +321,7 @@ void DGUSScreenHandler::FilamentRunout(const ExtUI::extruder_t extruder) { } void DGUSScreenHandler::SDCardError() { - SetStatusMessagePGM(GET_TEXT(MSG_MEDIA_READ_ERROR)); + SetStatusMessage(GET_TEXT_F(MSG_MEDIA_READ_ERROR)); if (current_screen == DGUS_Screen::PRINT) { TriggerScreenChange(DGUS_Screen::HOME); @@ -346,19 +343,19 @@ void DGUSScreenHandler::FilamentRunout(const ExtUI::extruder_t extruder) { void DGUSScreenHandler::PidTuning(const ExtUI::result_t rst) { switch (rst) { case ExtUI::PID_STARTED: - SetStatusMessagePGM(GET_TEXT(MSG_PID_AUTOTUNE)); + SetStatusMessage(GET_TEXT_F(MSG_PID_AUTOTUNE)); break; case ExtUI::PID_BAD_EXTRUDER_NUM: - SetStatusMessagePGM(GET_TEXT(MSG_PID_BAD_EXTRUDER_NUM)); + SetStatusMessage(GET_TEXT_F(MSG_PID_BAD_EXTRUDER_NUM)); break; case ExtUI::PID_TEMP_TOO_HIGH: - SetStatusMessagePGM(GET_TEXT(MSG_PID_TEMP_TOO_HIGH)); + SetStatusMessage(GET_TEXT_F(MSG_PID_TEMP_TOO_HIGH)); break; case ExtUI::PID_TUNING_TIMEOUT: - SetStatusMessagePGM(GET_TEXT(MSG_PID_TIMEOUT)); + SetStatusMessage(GET_TEXT_F(MSG_PID_TIMEOUT)); break; case ExtUI::PID_DONE: - SetStatusMessagePGM(GET_TEXT(MSG_PID_AUTOTUNE_DONE)); + SetStatusMessage(GET_TEXT_F(MSG_PID_AUTOTUNE_DONE)); break; default: return; @@ -411,8 +408,8 @@ void DGUSScreenHandler::SetStatusMessage(const char* msg, const millis_t duratio status_expire = (duration > 0 ? ExtUI::safe_millis() + duration : 0); } -void DGUSScreenHandler::SetStatusMessagePGM(PGM_P msg, const millis_t duration) { - dgus_display.WriteStringPGM((uint16_t)DGUS_Addr::MESSAGE_Status, msg, DGUS_STATUS_LEN, false, true); +void DGUSScreenHandler::SetStatusMessage(FSTR_P const fmsg, const millis_t duration) { + dgus_display.WriteStringPGM((uint16_t)DGUS_Addr::MESSAGE_Status, FTOP(msg), DGUS_STATUS_LEN, false, true); status_expire = (duration > 0 ? ExtUI::safe_millis() + duration : 0); } diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.h b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.h index 402d8d3d38..ea1289dd67 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.h +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSScreenHandler.h @@ -73,7 +73,7 @@ public: static void SetMessageLinePGM(PGM_P msg, uint8_t line); static void SetStatusMessage(const char* msg, const millis_t duration = DGUS_STATUS_EXPIRATION_MS); - static void SetStatusMessagePGM(PGM_P msg, const millis_t duration = DGUS_STATUS_EXPIRATION_MS); + static void SetStatusMessage(FSTR_P const msg, const millis_t duration = DGUS_STATUS_EXPIRATION_MS); static void ShowWaitScreen(DGUS_Screen return_screen, bool has_continue = false); diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.cpp b/Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.cpp index e93eb766ce..6ab2b004e5 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.cpp +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSSetupHandler.cpp @@ -68,7 +68,7 @@ bool DGUSSetupHandler::LevelingMenu() { ExtUI::setLevelingActive(dgus_screen_handler.leveling_active); if (!dgus_screen_handler.IsPrinterIdle()) { - dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_BUSY)); return false; } @@ -99,7 +99,7 @@ bool DGUSSetupHandler::LevelingManual() { } if (!dgus_screen_handler.IsPrinterIdle()) { - dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_BUSY)); return false; } @@ -118,7 +118,7 @@ bool DGUSSetupHandler::LevelingOffset() { dgus_screen_handler.offset_steps = DGUS_Data::StepSize::MMP1; if (!dgus_screen_handler.IsPrinterIdle()) { - dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_BUSY)); return false; } @@ -175,7 +175,7 @@ bool DGUSSetupHandler::Move() { dgus_screen_handler.move_steps = DGUS_Data::StepSize::MM10; if (!dgus_screen_handler.IsPrinterIdle()) { - dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_BUSY); + dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_BUSY)); return false; } @@ -186,7 +186,7 @@ bool DGUSSetupHandler::Gcode() { ZERO(dgus_screen_handler.gcode); if (dgus_display.gui_version < 0x30 || dgus_display.os_version < 0x21) { - dgus_screen_handler.SetStatusMessagePGM(DGUS_MSG_FW_OUTDATED); + dgus_screen_handler.SetStatusMessage(FPSTR(DGUS_MSG_FW_OUTDATED)); return false; } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/status_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/status_screen.cpp index cdc303a89e..6e4668eb36 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/status_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/bioprinter/status_screen.cpp @@ -52,7 +52,7 @@ bool StatusScreen::jog_xy; bool StatusScreen::fine_motion; void StatusScreen::unlockMotors() { - injectCommands_P(PSTR("M84 XY")); + injectCommands(F("M84 XY")); jog_xy = false; } @@ -305,7 +305,7 @@ bool StatusScreen::onTouchEnd(uint8_t tag) { case 12: if (!jog_xy) { jog_xy = true; - injectCommands_P(PSTR("M17")); + injectCommands(F("M17")); } jog({ 0, 0, 0 }); break; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp index 3636b5da6c..5ea9eed037 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/leveling_menu.cpp @@ -81,7 +81,7 @@ bool LevelingMenu::onTouchEnd(uint8_t tag) { case 2: BedMeshViewScreen::doProbe(); break; case 3: BedMeshViewScreen::show(); break; case 4: BedMeshEditScreen::show(); break; - case 5: injectCommands_P(PSTR("M280 P0 S60")); break; + case 5: injectCommands(F("M280 P0 S60")); break; case 6: SpinnerDialogBox::enqueueAndWait(F("M280 P0 S90\nG4 P100\nM280 P0 S120")); break; default: return false; } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/main_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/main_menu.cpp index 3fe17b72d5..2d404aff6c 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/main_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/main_menu.cpp @@ -86,7 +86,7 @@ bool MainMenu::onTouchEnd(uint8_t tag) { case 6: GOTO_SCREEN(FeedratePercentScreen); break; case 7: GOTO_SCREEN(FlowPercentScreen); break; case 8: GOTO_SCREEN(AdvancedSettingsMenu); break; - case 9: injectCommands_P(PSTR("M84")); break; + case 9: injectCommands(F("M84")); break; #if HAS_LEVELING case 10: GOTO_SCREEN(LevelingMenu); break; #endif diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_menu.cpp index 424e0afa76..b5ce108106 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/cocoa_press/preheat_menu.cpp @@ -74,37 +74,37 @@ bool PreheatMenu::onTouchEnd(uint8_t tag) { case 1: GOTO_PREVIOUS(); break; case 2: #ifdef COCOA_PRESS_PREHEAT_DARK_CHOCOLATE_INT_SCRIPT - injectCommands_P(PSTR(COCOA_PRESS_PREHEAT_DARK_CHOCOLATE_INT_SCRIPT)); + injectCommands(F(COCOA_PRESS_PREHEAT_DARK_CHOCOLATE_INT_SCRIPT)); #endif GOTO_SCREEN(PreheatTimerScreen); break; case 3: #ifdef COCOA_PRESS_PREHEAT_MILK_CHOCOLATE_INT_SCRIPT - injectCommands_P(PSTR(COCOA_PRESS_PREHEAT_MILK_CHOCOLATE_INT_SCRIPT)); + injectCommands(F(COCOA_PRESS_PREHEAT_MILK_CHOCOLATE_INT_SCRIPT)); #endif GOTO_SCREEN(PreheatTimerScreen); break; case 4: #ifdef COCOA_PRESS_PREHEAT_WHITE_CHOCOLATE_INT_SCRIPT - injectCommands_P(PSTR(COCOA_PRESS_PREHEAT_WHITE_CHOCOLATE_INT_SCRIPT)); + injectCommands(F(COCOA_PRESS_PREHEAT_WHITE_CHOCOLATE_INT_SCRIPT)); #endif GOTO_SCREEN(PreheatTimerScreen); break; case 5: #ifdef COCOA_PRESS_PREHEAT_DARK_CHOCOLATE_EXT_SCRIPT - injectCommands_P(PSTR(COCOA_PRESS_PREHEAT_DARK_CHOCOLATE_EXT_SCRIPT)); + injectCommands(F(COCOA_PRESS_PREHEAT_DARK_CHOCOLATE_EXT_SCRIPT)); #endif GOTO_SCREEN(PreheatTimerScreen); break; case 6: #ifdef COCOA_PRESS_PREHEAT_MILK_CHOCOLATE_EXT_SCRIPT - injectCommands_P(PSTR(COCOA_PRESS_PREHEAT_MILK_CHOCOLATE_EXT_SCRIPT)); + injectCommands(F(COCOA_PRESS_PREHEAT_MILK_CHOCOLATE_EXT_SCRIPT)); #endif GOTO_SCREEN(PreheatTimerScreen); break; case 7: #ifdef COCOA_PRESS_PREHEAT_WHITE_CHOCOLATE_EXT_SCRIPT - injectCommands_P(PSTR(COCOA_PRESS_PREHEAT_WHITE_CHOCOLATE_EXT_SCRIPT)); + injectCommands(F(COCOA_PRESS_PREHEAT_WHITE_CHOCOLATE_EXT_SCRIPT)); #endif GOTO_SCREEN(PreheatTimerScreen); break; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_edit_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_edit_screen.cpp index c7d0cc3f73..37eb29a99d 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_edit_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_edit_screen.cpp @@ -174,11 +174,11 @@ bool BedMeshEditScreen::onTouchEnd(uint8_t tag) { case 1: // On Cancel, reload saved mesh, discarding changes GOTO_PREVIOUS(); - injectCommands_P(PSTR("G29 L1")); + injectCommands(F("G29 L1")); return true; case 2: saveAdjustedHighlightedValue(); - injectCommands_P(PSTR("G29 S1")); + injectCommands(F("G29 S1")); mydata.needSave = false; return true; case 3: diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.cpp index 8db2d2ef70..7b4195ff5c 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/bed_mesh_view_screen.cpp @@ -154,11 +154,11 @@ void BedMeshViewScreen::onMeshUpdate(const int8_t x, const int8_t y, const ExtUI void BedMeshViewScreen::doProbe() { GOTO_SCREEN(BedMeshViewScreen); mydata.count = 0; - injectCommands_P(PSTR(BED_LEVELING_COMMANDS)); + injectCommands(F(BED_LEVELING_COMMANDS)); } void BedMeshViewScreen::show() { - injectCommands_P(PSTR("G29 L1")); + injectCommands(F("G29 L1")); GOTO_SCREEN(BedMeshViewScreen); } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_auto_calibration_dialog_box.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_auto_calibration_dialog_box.cpp index 748cc1d7ef..5c43ed34ea 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_auto_calibration_dialog_box.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/confirm_auto_calibration_dialog_box.cpp @@ -37,7 +37,7 @@ bool ConfirmAutoCalibrationDialogBox::onTouchEnd(uint8_t tag) { switch (tag) { case 1: GOTO_SCREEN(StatusScreen); - injectCommands_P(PSTR("G425")); + injectCommands(F("G425")); return true; default: return DialogBoxBaseClass::onTouchEnd(tag); diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/custom_user_menus.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/custom_user_menus.cpp index 8807480897..bcdcad17be 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/custom_user_menus.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/custom_user_menus.cpp @@ -33,7 +33,7 @@ using namespace Theme; #define _USER_DESC(N) MAIN_MENU_ITEM_##N##_DESC #define _USER_GCODE(N) MAIN_MENU_ITEM_##N##_GCODE #define _USER_ITEM(N) .tag(_ITEM_TAG(N)).button(USER_ITEM_POS(N), _USER_DESC(N)) -#define _USER_ACTION(N) case _ITEM_TAG(N): injectCommands_P(PSTR(_USER_GCODE(N))); TERN_(USER_SCRIPT_RETURN, GOTO_SCREEN(StatusScreen)); break; +#define _USER_ACTION(N) case _ITEM_TAG(N): injectCommands(F(_USER_GCODE(N))); TERN_(USER_SCRIPT_RETURN, GOTO_SCREEN(StatusScreen)); break; void CustomUserMenus::onRedraw(draw_mode_t what) { if (what & BACKGROUND) { diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp index 05845a9755..11db21aca9 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/leveling_menu.cpp @@ -125,11 +125,11 @@ bool LevelingMenu::onTouchEnd(uint8_t tag) { #if ENABLED(G26_MESH_VALIDATION) case 6: GOTO_SCREEN(StatusScreen); - injectCommands_P(PSTR("G28\nM117 Heating...\nG26 R X0 Y0\nG27")); + injectCommands(F("G28\nM117 Heating...\nG26 R X0 Y0\nG27")); break; #endif #if ENABLED(BLTOUCH) - case 7: injectCommands_P(PSTR("M280 P0 S60")); break; + case 7: injectCommands(F("M280 P0 S60")); break; case 8: SpinnerDialogBox::enqueueAndWait(F("M280 P0 S90\nG4 P100\nM280 P0 S120")); break; #endif default: return false; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/main_menu.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/main_menu.cpp index a6c39db796..6ccda405fc 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/main_menu.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/main_menu.cpp @@ -106,10 +106,10 @@ bool MainMenu::onTouchEnd(uint8_t tag) { case 1: SaveSettingsDialogBox::promptToSaveSettings(); break; case 2: SpinnerDialogBox::enqueueAndWait(F("G28")); break; #if ENABLED(NOZZLE_CLEAN_FEATURE) - case 3: injectCommands_P(PSTR("G12")); GOTO_SCREEN(StatusScreen); break; + case 3: injectCommands(F("G12")); GOTO_SCREEN(StatusScreen); break; #endif case 4: GOTO_SCREEN(MoveAxisScreen); break; - case 5: injectCommands_P(PSTR("M84")); break; + case 5: injectCommands(F("M84")); break; case 6: GOTO_SCREEN(TemperatureScreen); break; case 7: GOTO_SCREEN(ChangeFilamentScreen); break; case 8: GOTO_SCREEN(AdvancedSettingsMenu); break; diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/restore_failsafe_dialog_box.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/restore_failsafe_dialog_box.cpp index 2dfd64fa5b..f82ba1d5c8 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/restore_failsafe_dialog_box.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/restore_failsafe_dialog_box.cpp @@ -35,7 +35,7 @@ void RestoreFailsafeDialogBox::onRedraw(draw_mode_t) { bool RestoreFailsafeDialogBox::onTouchEnd(uint8_t tag) { switch (tag) { case 1: - ExtUI::injectCommands_P(PSTR("M502")); + ExtUI::injectCommands(F("M502")); AlertDialogBox::show(GET_TEXT_F(MSG_EEPROM_RESET)); // Remove RestoreFailsafeDialogBox from the stack // so the alert box doesn't return to it. diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/save_settings_dialog_box.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/save_settings_dialog_box.cpp index 5d92052ace..496d004a20 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/save_settings_dialog_box.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/save_settings_dialog_box.cpp @@ -38,7 +38,7 @@ bool SaveSettingsDialogBox::onTouchEnd(uint8_t tag) { needs_save = false; switch (tag) { case 1: - injectCommands_P(PSTR("M500")); + injectCommands(F("M500")); AlertDialogBox::show(GET_TEXT_F(MSG_EEPROM_SAVED)); // Remove SaveSettingsDialogBox from the stack // so the alert box doesn't return to me. diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.cpp index 2493de795a..3928bf3297 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.cpp @@ -60,7 +60,7 @@ void SpinnerDialogBox::onRefresh() { void SpinnerDialogBox::onRedraw(draw_mode_t) { } -void SpinnerDialogBox::show(FSTR_P message) { +void SpinnerDialogBox::show(FSTR_P fstr) { CommandProcessor cmd; if (AT_SCREEN(SpinnerDialogBox)) cmd.stop().execute(); cmd.cmd(CMD_DLSTART) @@ -68,7 +68,7 @@ void SpinnerDialogBox::show(FSTR_P message) { .cmd(CLEAR(true,true,true)) .cmd(COLOR_RGB(bg_text_enabled)) .tag(0); - draw_text_box(cmd, BTN_POS(1,1), BTN_SIZE(2,3), message, OPT_CENTER, font_large); + draw_text_box(cmd, BTN_POS(1,1), BTN_SIZE(2,3), fstr, OPT_CENTER, font_large); DLCache dlcache(SPINNER_CACHE); if (!dlcache.store(SPINNER_DL_SIZE)) { SERIAL_ECHO_MSG("CachedScreen::storeBackground() failed: not enough DL cache space"); @@ -86,14 +86,14 @@ void SpinnerDialogBox::hide() { GOTO_PREVIOUS(); } -void SpinnerDialogBox::enqueueAndWait(FSTR_P message, FSTR_P commands) { - show(message); - ExtUI::injectCommands_P((const char*)commands); +void SpinnerDialogBox::enqueueAndWait(FSTR_P fstr, FSTR_P commands) { + show(fstr); + ExtUI::injectCommands(commands); mydata.auto_hide = true; } -void SpinnerDialogBox::enqueueAndWait(FSTR_P message, char *commands) { - show(message); +void SpinnerDialogBox::enqueueAndWait(FSTR_P fstr, char *commands) { + show(fstr); ExtUI::injectCommands(commands); mydata.auto_hide = true; } diff --git a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/stress_test_screen.cpp b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/stress_test_screen.cpp index ab1f96a399..ea4b872303 100644 --- a/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/stress_test_screen.cpp +++ b/Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/stress_test_screen.cpp @@ -84,7 +84,7 @@ void StressTestScreen::runTestOnBootup(bool enable) { // whether or not we need to re-run the test // at startup. LockScreen::set_hash(enable ? 0xDEAD : 0); - injectCommands_P(PSTR("M500")); + injectCommands(F("M500")); } void StressTestScreen::startupCheck() { @@ -122,7 +122,7 @@ void StressTestScreen::onIdle() { injectCommands_P(G28_STR); } else { - injectCommands_P(PSTR( + injectCommands(F( "G0 X100 Y100 Z100 F6000\n" "T0\nG4 S1" E_TERN_("\nT1\nG4 S1") diff --git a/Marlin/src/lcd/extui/nextion/FileNavigator.cpp b/Marlin/src/lcd/extui/nextion/FileNavigator.cpp index 07f1256ded..6730370a94 100644 --- a/Marlin/src/lcd/extui/nextion/FileNavigator.cpp +++ b/Marlin/src/lcd/extui/nextion/FileNavigator.cpp @@ -83,46 +83,46 @@ void FileNavigator::getFiles(uint16_t index) { #endif if (currentindex == 0 && folderdepth > 0) { // Add a link to go up a folder - nextion.SendtoTFT(PSTR("vis p0,1")); - nextion.SendtoTFT(PSTR("\xFF\xFF\xFF")); + nextion.SendtoTFT(F("vis p0,1")); + nextion.SendtoTFT(F("\xFF\xFF\xFF")); SEND_VAL("tmpUP", "0"); files--; } else { - nextion.SendtoTFT(PSTR("vis p0,0")); - nextion.SendtoTFT(PSTR("\xFF\xFF\xFF")); + nextion.SendtoTFT(F("vis p0,0")); + nextion.SendtoTFT(F("\xFF\xFF\xFF")); } for (uint16_t seek = currentindex; seek < currentindex + files; seek++) { if (filelist.seek(seek)) { - nextion.SendtoTFT(PSTR("s")); + nextion.SendtoTFT(F("s")); LCD_SERIAL.print(fcnt); - nextion.SendtoTFT(PSTR(".txt=\"")); + nextion.SendtoTFT(F(".txt=\"")); if (filelist.isDir()) { LCD_SERIAL.print(filelist.shortFilename()); - nextion.SendtoTFT(PSTR("/\"")); - nextion.SendtoTFT(PSTR("\xFF\xFF\xFF")); + nextion.SendtoTFT(F("/\"")); + nextion.SendtoTFT(F("\xFF\xFF\xFF")); - nextion.SendtoTFT(PSTR("l")); + nextion.SendtoTFT(F("l")); LCD_SERIAL.print(fcnt); - nextion.SendtoTFT(PSTR(".txt=\"")); + nextion.SendtoTFT(F(".txt=\"")); LCD_SERIAL.print(filelist.filename()); - nextion.SendtoTFT(PSTR("\"")); - nextion.SendtoTFT(PSTR("\xFF\xFF\xFF")); + nextion.SendtoTFT(F("\"")); + nextion.SendtoTFT(F("\xFF\xFF\xFF")); SEND_PCO2("l", fcnt, "1055"); } else { LCD_SERIAL.print(currentfoldername); LCD_SERIAL.print(filelist.shortFilename()); - nextion.SendtoTFT(PSTR("\"")); - nextion.SendtoTFT(PSTR("\xFF\xFF\xFF")); + nextion.SendtoTFT(F("\"")); + nextion.SendtoTFT(F("\xFF\xFF\xFF")); - nextion.SendtoTFT(PSTR("l")); + nextion.SendtoTFT(F("l")); LCD_SERIAL.print(fcnt); - nextion.SendtoTFT(PSTR(".txt=\"")); + nextion.SendtoTFT(F(".txt=\"")); LCD_SERIAL.print(filelist.longFilename()); - nextion.SendtoTFT(PSTR("\"")); - nextion.SendtoTFT(PSTR("\xFF\xFF\xFF")); + nextion.SendtoTFT(F("\"")); + nextion.SendtoTFT(F("\xFF\xFF\xFF")); } fcnt++; fseek = seek; diff --git a/Marlin/src/lcd/extui/nextion/nextion_tft.cpp b/Marlin/src/lcd/extui/nextion/nextion_tft.cpp index c4e0e66a39..64e909779d 100644 --- a/Marlin/src/lcd/extui/nextion/nextion_tft.cpp +++ b/Marlin/src/lcd/extui/nextion/nextion_tft.cpp @@ -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 { diff --git a/Marlin/src/lcd/extui/nextion/nextion_tft.h b/Marlin/src/lcd/extui/nextion/nextion_tft.h index 4eb5fbe0b7..f32e5d4ef1 100644 --- a/Marlin/src/lcd/extui/nextion/nextion_tft.h +++ b/Marlin/src/lcd/extui/nextion/nextion_tft.h @@ -43,9 +43,9 @@ class NextionTFT { static void Startup(); static void IdleLoop(); static void PrinterKilled(PGM_P, PGM_P); - static void ConfirmationRequest(const char * const ); - static void StatusChange(const char * const ); - static void SendtoTFT(PGM_P); + static void ConfirmationRequest(const char * const); + static void StatusChange(const char * const); + static void SendtoTFT(FSTR_P const); static void UpdateOnChange(); static void PrintFinished(); static void PanelInfo(uint8_t); diff --git a/Marlin/src/lcd/extui/nextion/nextion_tft_defs.h b/Marlin/src/lcd/extui/nextion/nextion_tft_defs.h index 32d3ea3295..4570e9bba4 100644 --- a/Marlin/src/lcd/extui/nextion/nextion_tft_defs.h +++ b/Marlin/src/lcd/extui/nextion/nextion_tft_defs.h @@ -54,10 +54,10 @@ // TFT panel commands #define msg_welcome MACHINE_NAME " Ready." -#define SEND_TEMP(x,y,t,z) (nextion.SendtoTFT(PSTR(x)), nextion.SendtoTFT(PSTR(".txt=\"")), LCD_SERIAL.print(y), nextion.SendtoTFT(PSTR(t)), LCD_SERIAL.print(z), nextion.SendtoTFT(PSTR("\"\xFF\xFF\xFF"))) -#define SEND_VAL(x,y) (nextion.SendtoTFT(PSTR(x)), nextion.SendtoTFT(PSTR(".val=")), LCD_SERIAL.print(y), nextion.SendtoTFT(PSTR("\xFF\xFF\xFF"))) -#define SEND_TXT(x,y) (nextion.SendtoTFT(PSTR(x)), nextion.SendtoTFT(PSTR(".txt=\"")), nextion.SendtoTFT(PSTR(y)), nextion.SendtoTFT(PSTR("\"\xFF\xFF\xFF"))) -#define SEND_TXT_P(x,y) (nextion.SendtoTFT(PSTR(x)), nextion.SendtoTFT(PSTR(".txt=\"")), nextion.SendtoTFT(y), nextion.SendtoTFT(PSTR("\"\xFF\xFF\xFF"))) -#define SEND_VALasTXT(x,y) (nextion.SendtoTFT(PSTR(x)), nextion.SendtoTFT(PSTR(".txt=\"")), LCD_SERIAL.print(y), nextion.SendtoTFT(PSTR("\"\xFF\xFF\xFF"))) -#define SEND_TXT_END(x) (nextion.SendtoTFT(PSTR(x)), nextion.SendtoTFT(PSTR("\xFF\xFF\xFF"))) -#define SEND_PCO2(x,y,z) (nextion.SendtoTFT(PSTR(x)), LCD_SERIAL.print(y), nextion.SendtoTFT(PSTR(".pco=")), nextion.SendtoTFT(PSTR(z)), nextion.SendtoTFT(PSTR("\xFF\xFF\xFF"))) +#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_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"))) diff --git a/Marlin/src/lcd/extui/ui_api.cpp b/Marlin/src/lcd/extui/ui_api.cpp index d37b277110..afd762a470 100644 --- a/Marlin/src/lcd/extui/ui_api.cpp +++ b/Marlin/src/lcd/extui/ui_api.cpp @@ -1077,15 +1077,15 @@ namespace ExtUI { void resumePrint() { ui.resume_print(); } void stopPrint() { ui.abort_print(); } - void onUserConfirmRequired_P(PGM_P const pstr) { - char msg[strlen_P(pstr) + 1]; - strcpy_P(msg, pstr); + void onUserConfirmRequired(FSTR_P const fstr) { + char msg[strlen_P(FTOP(fstr)) + 1]; + strcpy_P(msg, FTOP(fstr)); onUserConfirmRequired(msg); } - void onStatusChanged_P(PGM_P const pstr) { - char msg[strlen_P(pstr) + 1]; - strcpy_P(msg, pstr); + void onStatusChanged(FSTR_P const fstr) { + char msg[strlen_P(FTOP(fstr)) + 1]; + strcpy_P(msg, FTOP(fstr)); onStatusChanged(msg); } diff --git a/Marlin/src/lcd/extui/ui_api.h b/Marlin/src/lcd/extui/ui_api.h index 9e1ae3a9c0..4866c5b9d7 100644 --- a/Marlin/src/lcd/extui/ui_api.h +++ b/Marlin/src/lcd/extui/ui_api.h @@ -79,6 +79,7 @@ namespace ExtUI { bool canMove(const axis_t); bool canMove(const extruder_t); void injectCommands_P(PGM_P const); + inline void injectCommands(FSTR_P const fstr) { injectCommands_P(FTOP(fstr)); } void injectCommands(char * const); bool commandsInQueue(); @@ -400,9 +401,9 @@ namespace ExtUI { void onPrintFinished(); void onFilamentRunout(const extruder_t extruder); void onUserConfirmRequired(const char * const msg); - void onUserConfirmRequired_P(PGM_P const pstr); + void onUserConfirmRequired(FSTR_P const fstr); void onStatusChanged(const char * const msg); - void onStatusChanged_P(PGM_P const pstr); + void onStatusChanged(FSTR_P const fstr); void onHomingStart(); void onHomingComplete(); void onSteppersDisabled(); diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp index c18a7d46f4..1fec14228b 100644 --- a/Marlin/src/lcd/marlinui.cpp +++ b/Marlin/src/lcd/marlinui.cpp @@ -1741,18 +1741,18 @@ constexpr uint8_t epps = ENCODER_PULSES_PER_STEP; pause_mode = mode; ExtUI::pauseModeStatus = message; switch (message) { - case PAUSE_MESSAGE_PARKING: ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_PAUSE_PRINT_PARKING)); - case PAUSE_MESSAGE_CHANGING: ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_INIT)); - case PAUSE_MESSAGE_UNLOAD: ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_UNLOAD)); - case PAUSE_MESSAGE_WAITING: ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_ADVANCED_PAUSE_WAITING)); - case PAUSE_MESSAGE_INSERT: ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_INSERT)); - case PAUSE_MESSAGE_LOAD: ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_LOAD)); + case PAUSE_MESSAGE_PARKING: ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_PAUSE_PRINT_PARKING)); + case PAUSE_MESSAGE_CHANGING: ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENT_CHANGE_INIT)); + case PAUSE_MESSAGE_UNLOAD: ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENT_CHANGE_UNLOAD)); + case PAUSE_MESSAGE_WAITING: ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_ADVANCED_PAUSE_WAITING)); + case PAUSE_MESSAGE_INSERT: ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENT_CHANGE_INSERT)); + case PAUSE_MESSAGE_LOAD: ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENT_CHANGE_LOAD)); case PAUSE_MESSAGE_PURGE: - ExtUI::onUserConfirmRequired_P(GET_TEXT(TERN(ADVANCED_PAUSE_CONTINUOUS_PURGE, MSG_FILAMENT_CHANGE_CONT_PURGE, MSG_FILAMENT_CHANGE_PURGE))); - case PAUSE_MESSAGE_RESUME: ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_RESUME)); - case PAUSE_MESSAGE_HEAT: ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_HEAT)); - case PAUSE_MESSAGE_HEATING: ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_HEATING)); - case PAUSE_MESSAGE_OPTION: ExtUI::onUserConfirmRequired_P(GET_TEXT(MSG_FILAMENT_CHANGE_OPTION_HEADER)); + ExtUI::onUserConfirmRequired(GET_TEXT_F(TERN(ADVANCED_PAUSE_CONTINUOUS_PURGE, MSG_FILAMENT_CHANGE_CONT_PURGE, MSG_FILAMENT_CHANGE_PURGE))); + case PAUSE_MESSAGE_RESUME: ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENT_CHANGE_RESUME)); + case PAUSE_MESSAGE_HEAT: ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENT_CHANGE_HEAT)); + case PAUSE_MESSAGE_HEATING: ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENT_CHANGE_HEATING)); + case PAUSE_MESSAGE_OPTION: ExtUI::onUserConfirmRequired(GET_TEXT_F(MSG_FILAMENT_CHANGE_OPTION_HEADER)); case PAUSE_MESSAGE_STATUS: default: break; } diff --git a/Marlin/src/lcd/menu/menu_delta_calibrate.cpp b/Marlin/src/lcd/menu/menu_delta_calibrate.cpp index 0990ac504d..95103e9bf6 100644 --- a/Marlin/src/lcd/menu/menu_delta_calibrate.cpp +++ b/Marlin/src/lcd/menu/menu_delta_calibrate.cpp @@ -65,7 +65,7 @@ void _man_probe_pt(const xy_pos_t &xy) { _man_probe_pt(xy); ui.defer_status_screen(); TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, F("Delta Calibration in progress"), FPSTR(CONTINUE_STR))); - TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(PSTR("Delta Calibration in progress"))); + TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(F("Delta Calibration in progress"))); TERN_(HAS_RESUME_CONTINUE, wait_for_user_response()); ui.goto_previous_screen_no_defer(); return current_position.z; diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index 18e72f401c..f37d2aa03f 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -296,7 +296,7 @@ FORCE_INLINE void probe_specific_action(const bool deploy) { SERIAL_ECHOLNF(ds_str); TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_USER_CONTINUE, F("Stow Probe"), FPSTR(CONTINUE_STR))); - TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired_P(PSTR("Stow Probe"))); + TERN_(EXTENSIBLE_UI, ExtUI::onUserConfirmRequired(F("Stow Probe"))); TERN_(DWIN_CREALITY_LCD_ENHANCED, DWIN_Popup_Confirm(ICON_BLTouch, PSTR("Stow Probe"), CONTINUE_STR)); TERN_(HAS_RESUME_CONTINUE, wait_for_user_response()); ui.reset_status();