From d9f7de7a24071fecb9bcae3400e3b4ec56c68a8d Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 4 Oct 2021 19:50:14 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20ExtUI=20F()=20followups?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Followup to 12b5d997a2 --- Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp | 4 ++-- Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.h | 4 ++-- Marlin/src/lcd/extui/nextion/nextion_tft.cpp | 2 +- Marlin/src/lcd/extui/nextion/nextion_tft.h | 5 +++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp b/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp index c3fc6aa96e..9f558e3a98 100644 --- a/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp +++ b/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp @@ -315,7 +315,7 @@ void ChironTFT::PrintComplete() { setSoftEndstopState(true); // enable endstops } -void ChironTFT::SendtoTFT(FSTR_P const fstr) { // A helper to print PROGMEM string to the panel +void ChironTFT::SendtoTFT(FSTR_P const fstr/*=nullptr*/) { // A helper to print PROGMEM string to the panel #if ACDEBUG(AC_SOME) SERIAL_ECHOF(fstr); #endif @@ -323,7 +323,7 @@ void ChironTFT::SendtoTFT(FSTR_P const fstr) { // A helper to print PROGMEM str while (const char c = pgm_read_byte(str++)) TFTSer.write(c); } -void ChironTFT::SendtoTFTLN(FSTR_P const fstr) { +void ChironTFT::SendtoTFTLN(FSTR_P const fstr/*=nullptr*/) { if (fstr) { #if ACDEBUG(AC_SOME) SERIAL_ECHOPGM("> "); diff --git a/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.h b/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.h index 44ba02dc5d..c9a32e584d 100644 --- a/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.h +++ b/Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.h @@ -67,8 +67,8 @@ class ChironTFT { static void StatusChange(const char * const); static void PowerLossRecovery(); static void PrintComplete(); - static void SendtoTFT(FSTR_P const); - static void SendtoTFTLN(FSTR_P const); + static void SendtoTFT(FSTR_P const=nullptr); + static void SendtoTFTLN(FSTR_P const=nullptr); private: static void DetectPanelType(); static bool ReadTFTCommand(); diff --git a/Marlin/src/lcd/extui/nextion/nextion_tft.cpp b/Marlin/src/lcd/extui/nextion/nextion_tft.cpp index 810848469c..99211a220c 100644 --- a/Marlin/src/lcd/extui/nextion/nextion_tft.cpp +++ b/Marlin/src/lcd/extui/nextion/nextion_tft.cpp @@ -110,7 +110,7 @@ void NextionTFT::StatusChange(const char * const msg) { SEND_VALasTXT("tmppage.M117", msg); } -void NextionTFT::SendtoTFT(FSTR_P fstr) { // A helper to print PROGMEM string to the panel +void NextionTFT::SendtoTFT(FSTR_P const fstr/*=nullptr*/) { // A helper to print PROGMEM string to the panel #if NEXDEBUG(N_SOME) DEBUG_ECHOF(fstr); #endif diff --git a/Marlin/src/lcd/extui/nextion/nextion_tft.h b/Marlin/src/lcd/extui/nextion/nextion_tft.h index f32e5d4ef1..806630485c 100644 --- a/Marlin/src/lcd/extui/nextion/nextion_tft.h +++ b/Marlin/src/lcd/extui/nextion/nextion_tft.h @@ -42,10 +42,11 @@ class NextionTFT { NextionTFT(); static void Startup(); static void IdleLoop(); - static void PrinterKilled(PGM_P, PGM_P); + static void PrinterKilled(FSTR_P const, FSTR_P const); static void ConfirmationRequest(const char * const); static void StatusChange(const char * const); - static void SendtoTFT(FSTR_P const); + static void SendtoTFT(FSTR_P const=nullptr); + //static void SendtoTFTLN(FSTR_P const=nullptr); static void UpdateOnChange(); static void PrintFinished(); static void PanelInfo(uint8_t);