Browse Source

🧑‍💻 Misc. ExtUI LCD cleanup (#25872)

Scott Lahteine 1 year ago
parent
commit
37d0f49a82

+ 1 - 1
Marlin/src/HAL/AVR/HAL.h

@@ -140,7 +140,7 @@ typedef Servo hal_servo_t;
   #endif
   #define LCD_SERIAL lcdSerial
   #if HAS_DGUS_LCD
-    #define SERIAL_GET_TX_BUFFER_FREE() LCD_SERIAL.get_tx_buffer_free()
+    #define LCD_SERIAL_TX_BUFFER_FREE() LCD_SERIAL.get_tx_buffer_free()
   #endif
 #endif
 

+ 1 - 1
Marlin/src/HAL/LPC1768/HAL.h

@@ -101,7 +101,7 @@ extern DefaultSerial1 USBSerial;
     #error "LCD_SERIAL_PORT must be from 0 to 3. You can also use -1 if the board supports Native USB."
   #endif
   #if HAS_DGUS_LCD
-    #define SERIAL_GET_TX_BUFFER_FREE() LCD_SERIAL.available()
+    #define LCD_SERIAL_TX_BUFFER_FREE() LCD_SERIAL.available()
   #endif
 #endif
 

+ 1 - 1
Marlin/src/HAL/STM32/HAL.h

@@ -114,7 +114,7 @@
     #error "LCD_SERIAL_PORT must be from 1 to 6, or -1 for Native USB."
   #endif
   #if HAS_DGUS_LCD
-    #define SERIAL_GET_TX_BUFFER_FREE() LCD_SERIAL.availableForWrite()
+    #define LCD_SERIAL_TX_BUFFER_FREE() LCD_SERIAL.availableForWrite()
   #endif
 #endif
 

+ 1 - 1
Marlin/src/HAL/STM32F1/HAL.h

@@ -140,7 +140,7 @@
     static_assert(false, "LCD_SERIAL_PORT must be from 1 to " STRINGIFY(NUM_UARTS) ". You can also use -1 if the board supports Native USB.")
   #endif
   #if HAS_DGUS_LCD
-    #define SERIAL_GET_TX_BUFFER_FREE() LCD_SERIAL.availableForWrite()
+    #define LCD_SERIAL_TX_BUFFER_FREE() LCD_SERIAL.availableForWrite()
   #endif
 #endif
 

+ 1 - 1
Marlin/src/lcd/e3v2/jyersui/dwin.cpp

@@ -2536,7 +2536,7 @@ void CrealityDWINClass::Menu_Item_Handler(const uint8_t menu, const uint8_t item
             Draw_Menu_Item(row, ICON_Back, F("Back"));
           else
             Draw_Menu(Motion, MOTION_STEPS);
-            break;
+          break;
         #if HAS_X_AXIS
           case STEPS_X:
             if (draw) {

+ 15 - 15
Marlin/src/lcd/extui/anycubic_chiron/FileNavigator.cpp

@@ -60,21 +60,21 @@ using namespace ExtUI;
 namespace Anycubic {
 
 FileNavigator filenavigator;
-FileList  FileNavigator::filelist;                          // Instance of the Marlin file API
+FileList  FileNavigator::filelist;                          // ExtUI file API
 uint16_t  FileNavigator::lastpanelindex;
 uint16_t  FileNavigator::currentindex;                      // override the panel request
 uint8_t   FileNavigator::folderdepth;
-uint16_t  FileNavigator::currentfolderindex[MAX_FOLDER_DEPTH];   // track folder pos for iteration
-char      FileNavigator::currentfoldername[MAX_PATH_LEN + 1];   // Current folder path
+uint16_t  FileNavigator::currentDirIndex[MAX_FOLDER_DEPTH]; // track folder pos for iteration
+char      FileNavigator::currentDirPath[MAX_PATH_LEN + 1];  // Current folder path
 
 FileNavigator::FileNavigator() { reset(); }
 
 void FileNavigator::reset() {
-  currentfoldername[0] = '\0';
+  currentDirPath[0] = '\0';
   folderdepth = 0;
   currentindex = 0;
   lastpanelindex = 0;
-  ZERO(currentfolderindex);
+  ZERO(currentDirIndex);
 
   // Start at root folder
   while (!filelist.isAtRootDir()) filelist.upDir();
@@ -85,9 +85,9 @@ void FileNavigator::refresh() { filelist.refresh(); }
 
 void FileNavigator::changeDIR(const char *folder) {
   if (folderdepth >= MAX_FOLDER_DEPTH) return; // limit the folder depth
-  currentfolderindex[folderdepth] = currentindex;
-  strcat(currentfoldername, folder);
-  strcat(currentfoldername, "/");
+  currentDirIndex[folderdepth] = currentindex;
+  strcat(currentDirPath, folder);
+  strcat(currentDirPath, "/");
   filelist.changeDir(folder);
   folderdepth++;
   currentindex = 0;
@@ -97,15 +97,15 @@ void FileNavigator::upDIR() {
   if (!filelist.isAtRootDir()) {
     filelist.upDir();
     folderdepth--;
-    currentindex = currentfolderindex[folderdepth]; // restore last position in the folder
+    currentindex = currentDirIndex[folderdepth]; // restore last position in the folder
     filelist.seek(currentindex); // restore file information
   }
 
   // Remove the child folder from the stored path
   if (folderdepth == 0)
-    currentfoldername[0] = '\0';
+    currentDirPath[0] = '\0';
   else {
-    char * const pos = strchr(currentfoldername, '/');
+    char * const pos = strchr(currentDirPath, '/');
     *(pos + 1) = '\0';
   }
 }
@@ -151,7 +151,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(F("..                  .gcode"));
+        chiron.tftSendLn(F("..                  .gcode"));
       }
       else {
         TFTSer.println("<<");
@@ -186,7 +186,7 @@ void FileNavigator::skiptofileindex(uint16_t skip) {
     }
     else { // Not DIR
       TFTSer.write('/');
-      if (folderdepth > 0) TFTSer.print(currentfoldername);
+      if (folderdepth > 0) TFTSer.print(currentDirPath);
       TFTSer.println(filelist.shortFilename());
       TFTSer.print(filelist.longFilename());
 
@@ -233,9 +233,9 @@ void FileNavigator::skiptofileindex(uint16_t skip) {
 
   void FileNavigator::sendFile(panel_type_t paneltype) {
     TFTSer.write('/');
-    if (folderdepth > 0) TFTSer.print(currentfoldername);
+    if (folderdepth > 0) TFTSer.print(currentDirPath);
     TFTSer.println(filelist.shortFilename());
-    if (folderdepth > 0) TFTSer.print(currentfoldername);
+    if (folderdepth > 0) TFTSer.print(currentDirPath);
     TFTSer.println(filelist.longFilename());
   }
 

+ 2 - 2
Marlin/src/lcd/extui/anycubic_chiron/FileNavigator.h

@@ -52,8 +52,8 @@ namespace Anycubic {
       static uint16_t lastpanelindex;
       static uint16_t currentindex;
       static uint8_t  folderdepth;
-      static uint16_t currentfolderindex[MAX_FOLDER_DEPTH];
-      static char     currentfoldername[MAX_PATH_LEN + 1];
+      static uint16_t currentDirIndex[MAX_FOLDER_DEPTH];
+      static char     currentDirPath[MAX_PATH_LEN + 1];
   };
 
   extern FileNavigator filenavigator;

+ 13 - 13
Marlin/src/lcd/extui/anycubic_chiron/chiron_extui.cpp

@@ -37,17 +37,17 @@ using namespace Anycubic;
 
 namespace ExtUI {
 
-  void onStartup() { Chiron.Startup(); }
+  void onStartup() { chiron.startup(); }
 
-  void onIdle() { Chiron.IdleLoop(); }
+  void onIdle() { chiron.idleLoop(); }
 
   void onPrinterKilled(FSTR_P const error, FSTR_P const component) {
-    Chiron.PrinterKilled(error, component);
+    chiron.printerKilled(error, component);
   }
 
-  void onMediaInserted() { Chiron.MediaEvent(AC_media_inserted); }
-  void onMediaError()    { Chiron.MediaEvent(AC_media_error);    }
-  void onMediaRemoved()  { Chiron.MediaEvent(AC_media_removed);  }
+  void onMediaInserted() { chiron.mediaEvent(AC_media_inserted); }
+  void onMediaError()    { chiron.mediaEvent(AC_media_error);    }
+  void onMediaRemoved()  { chiron.mediaEvent(AC_media_removed);  }
 
   void onPlayTone(const uint16_t frequency, const uint16_t duration) {
     #if ENABLED(SPEAKER)
@@ -55,15 +55,15 @@ namespace ExtUI {
     #endif
   }
 
-  void onPrintTimerStarted() { Chiron.TimerEvent(AC_timer_started); }
-  void onPrintTimerPaused()  { Chiron.TimerEvent(AC_timer_paused);  }
-  void onPrintTimerStopped() { Chiron.TimerEvent(AC_timer_stopped); }
+  void onPrintTimerStarted() { chiron.timerEvent(AC_timer_started); }
+  void onPrintTimerPaused()  { chiron.timerEvent(AC_timer_paused);  }
+  void onPrintTimerStopped() { chiron.timerEvent(AC_timer_stopped); }
   void onPrintDone() {}
 
-  void onFilamentRunout(const extruder_t)            { Chiron.FilamentRunout();             }
+  void onFilamentRunout(const extruder_t)            { chiron.filamentRunout();             }
 
-  void onUserConfirmRequired(const char * const msg) { Chiron.ConfirmationRequest(msg);     }
-  void onStatusChanged(const char * const msg)       { Chiron.StatusChange(msg);            }
+  void onUserConfirmRequired(const char * const msg) { chiron.confirmationRequest(msg);     }
+  void onStatusChanged(const char * const msg)       { chiron.statusChange(msg);            }
 
   void onHomingStart() {}
   void onHomingDone() {}
@@ -127,7 +127,7 @@ namespace ExtUI {
       // Called when power-loss state is detected
     }
     // Called on resume from power-loss
-    void onPowerLossResume() { Chiron.PowerLossRecovery(); }
+    void onPowerLossResume() { chiron.powerLossRecovery(); }
   #endif
 
   #if HAS_PID_HEATING

+ 156 - 154
Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.cpp

@@ -42,9 +42,13 @@
 #include "../../../libs/numtostr.h"
 #include "../../../MarlinCore.h"
 
+#define DEBUG_OUT ACDEBUGLEVEL
+#include "../../../core/debug_out.h"
+
 namespace Anycubic {
 
-ChironTFT Chiron;
+ChironTFT chiron;
+
 #if AUTO_DETECT_CHIRON_TFT
   panel_type_t   ChironTFT::panel_type = AC_panel_unknown;
 #endif
@@ -60,7 +64,7 @@ uint8_t          ChironTFT::command_len;
 float            ChironTFT::live_Zoffset;
 file_menu_t      ChironTFT::file_menu;
 
-void ChironTFT::Startup() {
+void ChironTFT::startup() {
   selectedfile[0]   = '\0';
   panel_command[0]  = '\0';
   command_len       = 0;
@@ -92,73 +96,73 @@ void ChironTFT::Startup() {
       break;
     default:
       SERIAL_ECHOLNF(AC_msg_auto_panel_detection);
-      DetectPanelType();
+      detectPanelType();
       break;
   }
 
   // Signal Board has reset
-  SendtoTFTLN(AC_msg_main_board_has_reset);
+  tftSendLn(AC_msg_main_board_has_reset);
 
   // 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(AC_cmnd_enable_leveling);
 
-  // Startup tunes are defined in Tunes.h
+  // startup tunes are defined in Tunes.h
   PlayTune(TERN(AC_DEFAULT_STARTUP_TUNE, Anycubic_PowerOn, GB_PowerOn));
 
   #if ACDEBUGLEVEL
-    SERIAL_ECHOLNPGM("AC Debug Level ", ACDEBUGLEVEL);
+    DEBUG_ECHOLNPGM("AC Debug Level ", ACDEBUGLEVEL);
   #endif
-  SendtoTFTLN(AC_msg_ready);
+  tftSendLn(AC_msg_ready);
 }
 
-void ChironTFT::DetectPanelType() {
+void ChironTFT::detectPanelType() {
   #if AUTO_DETECT_CHIRON_TFT
     // Send a query to the TFT
-    SendtoTFTLN(AC_Test_for_OldPanel); // The panel will respond with 'SXY 480 320'
-    SendtoTFTLN(AC_Test_for_NewPanel); // the panel will respond with '[0]=0   ' to '[19]=0   '
+    tftSendLn(AC_Test_for_OldPanel); // The panel will respond with 'SXY 480 320'
+    tftSendLn(AC_Test_for_NewPanel); // the panel will respond with '[0]=0   ' to '[19]=0   '
   #endif
 }
 
-void ChironTFT::IdleLoop()  {
-  if (ReadTFTCommand()) {
-    ProcessPanelRequest();
+void ChironTFT::idleLoop()  {
+  if (readTFTCommand()) {
+    processPanelRequest();
     command_len = 0;
   }
-  CheckHeaters();
+  checkHeaters();
 }
 
-void ChironTFT::PrinterKilled(FSTR_P const error, FSTR_P const component)  {
-  SendtoTFTLN(AC_msg_kill_lcd);
+void ChironTFT::printerKilled(FSTR_P const error, FSTR_P const component)  {
+  tftSendLn(AC_msg_kill_lcd);
   #if ACDEBUG(AC_MARLIN)
-    SERIAL_ECHOLNPGM("PrinterKilled()\nerror: ", error , "\ncomponent: ", component);
+    DEBUG_ECHOLNPGM("printerKilled()\nerror: ", error , "\ncomponent: ", component);
   #endif
 }
 
-void ChironTFT::MediaEvent(media_event_t event)  {
+void ChironTFT::mediaEvent(media_event_t event)  {
   #if ACDEBUG(AC_MARLIN)
-    SERIAL_ECHOLNPGM("ProcessMediaStatus() ", event);
+    DEBUG_ECHOLNPGM("ProcessMediaStatus() ", event);
   #endif
   switch (event) {
     case AC_media_inserted:
-      SendtoTFTLN(AC_msg_sd_card_inserted);
+      tftSendLn(AC_msg_sd_card_inserted);
       break;
 
     case AC_media_removed:
-      SendtoTFTLN(AC_msg_sd_card_removed);
+      tftSendLn(AC_msg_sd_card_removed);
       break;
 
     case AC_media_error:
       last_error = AC_error_noSD;
-      SendtoTFTLN(AC_msg_no_sd_card);
+      tftSendLn(AC_msg_no_sd_card);
       break;
   }
 }
 
-void ChironTFT::TimerEvent(timer_event_t event)  {
+void ChironTFT::timerEvent(timer_event_t event)  {
   #if ACDEBUG(AC_MARLIN)
-    SERIAL_ECHOLNPGM("TimerEvent() ", event);
-    SERIAL_ECHOLNPGM("Printer State: ", printer_state);
+    DEBUG_ECHOLNPGM("timerEvent() ", event);
+    DEBUG_ECHOLNPGM("Printer State: ", printer_state);
   #endif
 
   switch (event) {
@@ -166,44 +170,44 @@ void ChironTFT::TimerEvent(timer_event_t event)  {
       live_Zoffset = 0.0; // reset print offset
       setSoftEndstopState(false);  // disable endstops to print
       printer_state = AC_printer_printing;
-      SendtoTFTLN(AC_msg_print_from_sd_card);
+      tftSendLn(AC_msg_print_from_sd_card);
     } break;
 
     case AC_timer_paused: {
       printer_state = AC_printer_paused;
       pause_state   = AC_paused_idle;
-      SendtoTFTLN(AC_msg_paused);
+      tftSendLn(AC_msg_paused);
     } break;
 
     case AC_timer_stopped: {
       if (printer_state != AC_printer_idle) {
         printer_state = AC_printer_stopping;
-        SendtoTFTLN(AC_msg_print_complete);
+        tftSendLn(AC_msg_print_complete);
       }
       setSoftEndstopState(true); // enable endstops
     } break;
   }
 }
 
-void ChironTFT::FilamentRunout()  {
+void ChironTFT::filamentRunout()  {
   #if ACDEBUG(AC_MARLIN)
-    SERIAL_ECHOLNPGM("FilamentRunout() printer_state ", printer_state);
+    DEBUG_ECHOLNPGM("filamentRunout() printer_state ", printer_state);
   #endif
   // 1 Signal filament out
   last_error = AC_error_filament_runout;
-  SendtoTFTLN(isPrintingFromMedia() ? AC_msg_filament_out_alert : AC_msg_filament_out_block);
+  tftSendLn(isPrintingFromMedia() ? AC_msg_filament_out_alert : AC_msg_filament_out_block);
   PlayTune(FilamentOut);
 }
 
-void ChironTFT::ConfirmationRequest(const char * const msg)  {
+void ChironTFT::confirmationRequest(const char * const msg)  {
   // M108 continue
   #if ACDEBUG(AC_MARLIN)
-    SERIAL_ECHOLNPGM("ConfirmationRequest() ", msg, " printer_state:", printer_state);
+    DEBUG_ECHOLNPGM("confirmationRequest() ", msg, " printer_state:", printer_state);
   #endif
   switch (printer_state) {
     case AC_printer_pausing: {
       if (strcmp_P(msg, MARLIN_msg_print_paused) == 0 || strcmp_P(msg, MARLIN_msg_nozzle_parked) == 0) {
-        SendtoTFTLN(AC_msg_paused); // enable continue button
+        tftSendLn(AC_msg_paused); // enable continue button
         printer_state = AC_printer_paused;
       }
     } break;
@@ -214,18 +218,18 @@ void ChironTFT::ConfirmationRequest(const char * const msg)  {
       // Heater timeout, send acknowledgement
       if (strcmp_P(msg, MARLIN_msg_heater_timeout) == 0) {
         pause_state = AC_paused_heater_timed_out;
-        SendtoTFTLN(AC_msg_paused); // enable continue button
+        tftSendLn(AC_msg_paused); // enable continue button
         PlayTune(HeaterTimeout);
       }
       // Reheat finished, send acknowledgement
       else if (strcmp_P(msg, MARLIN_msg_reheat_done) == 0) {
         pause_state = AC_paused_idle;
-        SendtoTFTLN(AC_msg_paused); // enable continue button
+        tftSendLn(AC_msg_paused); // enable continue button
       }
       // Filament Purging, send acknowledgement enter run mode
       else if (strcmp_P(msg, MARLIN_msg_filament_purging) == 0) {
         pause_state = AC_paused_purging_filament;
-        SendtoTFTLN(AC_msg_paused); // enable continue button
+        tftSendLn(AC_msg_paused); // enable continue button
       }
     } break;
     default:
@@ -233,10 +237,10 @@ void ChironTFT::ConfirmationRequest(const char * const msg)  {
   }
 }
 
-void ChironTFT::StatusChange(const char * const msg)  {
+void ChironTFT::statusChange(const char * const msg)  {
   #if ACDEBUG(AC_MARLIN)
-    SERIAL_ECHOLNPGM("StatusChange() ", msg);
-    SERIAL_ECHOLNPGM("printer_state:", printer_state);
+    DEBUG_ECHOLNPGM("statusChange() ", msg);
+    DEBUG_ECHOLNPGM("printer_state:", printer_state);
   #endif
   bool msg_matched = false;
   // The only way to get printer status is to parse messages
@@ -247,7 +251,7 @@ void ChironTFT::StatusChange(const char * const msg)  {
       // Ignore the custom machine name
       if (strcmp_P(msg + strlen(MACHINE_NAME), MARLIN_msg_ready) == 0) {
         injectCommands(F("M500\nG27"));
-        SendtoTFTLN(AC_msg_probing_complete);
+        tftSendLn(AC_msg_probing_complete);
         printer_state = AC_printer_idle;
         msg_matched = true;
       }
@@ -255,7 +259,7 @@ void ChironTFT::StatusChange(const char * const msg)  {
       if (strcmp_P(msg, MARLIN_msg_probing_failed) == 0) {
         PlayTune(BeepBeepBeeep);
         injectCommands(F("G1 Z50 F500"));
-        SendtoTFTLN(AC_msg_probing_complete);
+        tftSendLn(AC_msg_probing_complete);
         printer_state = AC_printer_idle;
         msg_matched = true;
       }
@@ -263,14 +267,14 @@ void ChironTFT::StatusChange(const char * const msg)  {
 
     case AC_printer_printing: {
       if (strcmp_P(msg, MARLIN_msg_reheating) == 0) {
-        SendtoTFTLN(AC_msg_paused); // enable continue button
+        tftSendLn(AC_msg_paused); // enable continue button
         msg_matched = true;
        }
     } break;
 
     case AC_printer_pausing: {
       if (strcmp_P(msg, MARLIN_msg_print_paused) == 0) {
-        SendtoTFTLN(AC_msg_paused);
+        tftSendLn(AC_msg_paused);
         printer_state = AC_printer_paused;
         pause_state = AC_paused_idle;
         msg_matched = true;
@@ -279,7 +283,7 @@ void ChironTFT::StatusChange(const char * const msg)  {
 
     case AC_printer_stopping: {
       if (strcmp_P(msg, MARLIN_msg_print_aborted) == 0) {
-        SendtoTFTLN(AC_msg_stop);
+        tftSendLn(AC_msg_stop);
         printer_state = AC_printer_idle;
         msg_matched = true;
       }
@@ -291,11 +295,11 @@ void ChironTFT::StatusChange(const char * const msg)  {
   // If not matched earlier see if this was a heater message
   if (!msg_matched) {
     if (strcmp_P(msg, MARLIN_msg_extruder_heating) == 0) {
-      SendtoTFTLN(AC_msg_nozzle_heating);
+      tftSendLn(AC_msg_nozzle_heating);
       hotend_state = AC_heater_temp_set;
     }
     else if (strcmp_P(msg, MARLIN_msg_bed_heating) == 0) {
-      SendtoTFTLN(AC_msg_bed_heating);
+      tftSendLn(AC_msg_bed_heating);
       hotbed_state = AC_heater_temp_set;
     }
     else if (strcmp_P(msg, MARLIN_msg_EEPROM_version) == 0) {
@@ -304,33 +308,33 @@ void ChironTFT::StatusChange(const char * const msg)  {
   }
 }
 
-void ChironTFT::PowerLossRecovery()  {
+void ChironTFT::powerLossRecovery()  {
   printer_state = AC_printer_resuming_from_power_outage; // Play tune to notify user we can recover.
   last_error = AC_error_powerloss;
   PlayTune(SOS);
   SERIAL_ECHOLNF(AC_msg_powerloss_recovery);
 }
 
-void ChironTFT::PrintComplete() {
-  SendtoTFT(AC_msg_print_complete);
+void ChironTFT::printComplete() {
+  tftSend(AC_msg_print_complete);
   printer_state = AC_printer_idle;
   setSoftEndstopState(true); // enable endstops
 }
 
-void ChironTFT::SendtoTFT(FSTR_P const fstr/*=nullptr*/) {  // A helper to print PROGMEM string to the panel
+void ChironTFT::tftSend(FSTR_P const fstr/*=nullptr*/) {  // A helper to print PROGMEM string to the panel
   #if ACDEBUG(AC_SOME)
-    SERIAL_ECHOF(fstr);
+    DEBUG_ECHOF(fstr);
   #endif
   PGM_P str = FTOP(fstr);
   while (const char c = pgm_read_byte(str++)) TFTSer.write(c);
 }
 
-void ChironTFT::SendtoTFTLN(FSTR_P const fstr/*=nullptr*/) {
+void ChironTFT::tftSendLn(FSTR_P const fstr/*=nullptr*/) {
   if (fstr) {
     #if ACDEBUG(AC_SOME)
-      SERIAL_ECHOPGM("> ");
+      DEBUG_ECHOPGM("> ");
     #endif
-    SendtoTFT(fstr);
+    tftSend(fstr);
     #if ACDEBUG(AC_SOME)
       SERIAL_EOL();
     #endif
@@ -338,7 +342,7 @@ void ChironTFT::SendtoTFTLN(FSTR_P const fstr/*=nullptr*/) {
   TFTSer.println();
 }
 
-bool ChironTFT::ReadTFTCommand() {
+bool ChironTFT::readTFTCommand() {
   bool command_ready = false;
   while (TFTSer.available() > 0 && command_len < MAX_CMND_LEN) {
     panel_command[command_len] = TFTSer.read();
@@ -352,29 +356,29 @@ bool ChironTFT::ReadTFTCommand() {
   if (command_ready || command_len == MAX_CMND_LEN) {
     panel_command[command_len] = '\0';
     #if ACDEBUG(AC_ALL)
-      SERIAL_ECHOLNPGM("len(",command_len,") < ", panel_command);
+      DEBUG_ECHOLNPGM("len(",command_len,") < ", panel_command);
     #endif
     command_ready = true;
   }
   return command_ready;
 }
 
-int8_t ChironTFT::FindToken(char c) {
+int8_t ChironTFT::findToken(char c) {
   for (int8_t pos = 0; pos < command_len; pos++) {
     if (panel_command[pos] == c) {
       #if ACDEBUG(AC_INFO)
-        SERIAL_ECHOLNPGM("Tpos:", pos, " ", c);
+        DEBUG_ECHOLNPGM("Tpos:", pos, " ", c);
       #endif
       return pos;
     }
   }
   #if ACDEBUG(AC_INFO)
-    SERIAL_ECHOLNPGM("Not found: ", c);
+    DEBUG_ECHOLNPGM("Not found: ", c);
   #endif
   return -1;
 }
 
-void ChironTFT::CheckHeaters() {
+void ChironTFT::checkHeaters() {
   uint8_t faultDuration = 0;
 
   // if the hotend temp is abnormal, confirm state before signalling panel
@@ -382,7 +386,7 @@ void ChironTFT::CheckHeaters() {
   while (!WITHIN(temp, HEATER_0_MINTEMP, HEATER_0_MAXTEMP)) {
     faultDuration++;
     if (faultDuration >= AC_HEATER_FAULT_VALIDATION_TIME) {
-      SendtoTFTLN(AC_msg_nozzle_temp_abnormal);
+      tftSendLn(AC_msg_nozzle_temp_abnormal);
       last_error = AC_error_abnormal_temp_t0;
       SERIAL_ECHOLNPGM("Extruder temp abnormal! : ", temp);
       break;
@@ -397,7 +401,7 @@ void ChironTFT::CheckHeaters() {
   while (!WITHIN(temp, BED_MINTEMP, BED_MAXTEMP)) {
     faultDuration++;
     if (faultDuration >= AC_HEATER_FAULT_VALIDATION_TIME) {
-      SendtoTFTLN(AC_msg_nozzle_temp_abnormal);
+      tftSendLn(AC_msg_nozzle_temp_abnormal);
       last_error = AC_error_abnormal_temp_bed;
       SERIAL_ECHOLNPGM("Bed temp abnormal! : ", temp);
       break;
@@ -409,7 +413,7 @@ void ChironTFT::CheckHeaters() {
   // Update panel with hotend heater status
   if (hotend_state != AC_heater_temp_reached) {
     if (WITHIN(getActualTemp_celsius(E0) - getTargetTemp_celsius(E0), -(TEMP_WINDOW), TEMP_WINDOW)) {
-      SendtoTFTLN(AC_msg_nozzle_heating_done);
+      tftSendLn(AC_msg_nozzle_heating_done);
       hotend_state = AC_heater_temp_reached;
     }
   }
@@ -417,23 +421,23 @@ void ChironTFT::CheckHeaters() {
   // Update panel with bed heater status
   if (hotbed_state != AC_heater_temp_reached) {
     if (WITHIN(getActualTemp_celsius(BED) - getTargetTemp_celsius(BED), -(TEMP_BED_WINDOW), TEMP_BED_WINDOW)) {
-      SendtoTFTLN(AC_msg_bed_heating_done);
+      tftSendLn(AC_msg_bed_heating_done);
       hotbed_state = AC_heater_temp_reached;
     }
   }
 }
 
-void ChironTFT::SendFileList(int8_t startindex) {
+void ChironTFT::sendFileList(int8_t startindex) {
   // Respond to panel request for 4 files starting at index
   #if ACDEBUG(AC_INFO)
-    SERIAL_ECHOLNPGM("## SendFileList ## ", startindex);
+    DEBUG_ECHOLNPGM("## sendFileList ## ", startindex);
   #endif
-  SendtoTFTLN(F("FN "));
+  tftSendLn(F("FN "));
   filenavigator.getFiles(startindex, panel_type, 4);
-  SendtoTFTLN(F("END"));
+  tftSendLn(F("END"));
 }
 
-void ChironTFT::SelectFile() {
+void ChironTFT::selectFile() {
   if (panel_type <= AC_panel_new) {
     strncpy(selectedfile, panel_command + 4, command_len - 3);
     selectedfile[command_len - 4] = '\0';
@@ -443,50 +447,50 @@ void ChironTFT::SelectFile() {
     selectedfile[command_len - 5] = '\0';
   }
   #if ACDEBUG(AC_FILE)
-    SERIAL_ECHOLNPGM(" Selected File: ",selectedfile);
+    DEBUG_ECHOLNPGM(" Selected File: ",selectedfile);
   #endif
   switch (selectedfile[0]) {
     case '/':   // Valid file selected
-      SendtoTFTLN(AC_msg_sd_file_open_success);
+      tftSendLn(AC_msg_sd_file_open_success);
       break;
 
     case '<':   // .. (go up folder level)
       filenavigator.upDIR();
-      SendtoTFTLN(AC_msg_sd_file_open_failed);
-      SendFileList( 0 );
+      tftSendLn(AC_msg_sd_file_open_failed);
+      sendFileList( 0 );
       break;
     default:   // enter sub folder
       // for new panel remove the '.GCO' tag that was added to the end of the path
       if (panel_type <= AC_panel_new)
         selectedfile[strlen(selectedfile) - 4] = '\0';
       filenavigator.changeDIR(selectedfile);
-      SendtoTFTLN(AC_msg_sd_file_open_failed);
-      SendFileList( 0 );
+      tftSendLn(AC_msg_sd_file_open_failed);
+      sendFileList( 0 );
       break;
   }
 }
 
-void ChironTFT::ProcessPanelRequest() {
+void ChironTFT::processPanelRequest() {
   // Break these up into logical blocks // as its easier to navigate than one huge switch case!
-  int8_t tpos = FindToken('A');
+  int8_t tpos = findToken('A');
   // Panel request are 'A0' - 'A36'
   if (tpos >= 0) {
     const int8_t req = atoi(&panel_command[tpos + 1]);
 
     // Information requests A0 - A8 and A33
-    if (req <= 8 || req == 33) PanelInfo(req);
+    if (req <= 8 || req == 33) panelInfo(req);
 
     // Simple Actions A9 - A28
-    else if (req <= 28) PanelAction(req);
+    else if (req <= 28) panelAction(req);
 
     // Process Initiation
-    else if (req <= 36) PanelProcess(req);
+    else if (req <= 36) panelProcess(req);
   }
   else {
     #if AUTO_DETECT_CHIRON_TFT
       // This may be a response to a panel type detection query
       if (panel_type == AC_panel_unknown) {
-        tpos = FindToken('S'); // old panel will respond to 'SIZE' with 'SXY 480 320'
+        tpos = findToken('S'); // old panel will respond to 'SIZE' with 'SXY 480 320'
         if (tpos >= 0) {
           if (panel_command[tpos + 1] == 'X' && panel_command[tpos + 2] =='Y') {
             panel_type = AC_panel_standard;
@@ -496,7 +500,7 @@ void ChironTFT::ProcessPanelRequest() {
         else {
           // new panel will respond to 'J200' with '[0]=0'
           // it seems only after a power cycle so detection assumes a new panel
-          tpos = FindToken('[');
+          tpos = findToken('[');
           if (tpos >= 0) {
             if (panel_command[tpos + 1] == '0' && panel_command[tpos + 2] ==']') {
               panel_type = AC_panel_new;
@@ -508,94 +512,94 @@ void ChironTFT::ProcessPanelRequest() {
       }
     #endif
 
-    SendtoTFTLN(); // Ignore unknown requests
+    tftSendLn(); // Ignore unknown requests
   }
 }
 
-void ChironTFT::PanelInfo(uint8_t req) {
+void ChironTFT::panelInfo(uint8_t req) {
   // information requests A0-A8 and A33
   switch (req) {
     case 0:   // A0 Get HOTEND Temp
-      SendtoTFT(F("A0V "));
+      tftSend(F("A0V "));
       TFTSer.println(getActualTemp_celsius(E0));
       break;
 
     case 1:   // A1 Get HOTEND Target Temp
-      SendtoTFT(F("A1V "));
+      tftSend(F("A1V "));
       TFTSer.println(getTargetTemp_celsius(E0));
       break;
 
     case 2:   // A2 Get BED Temp
-      SendtoTFT(F("A2V "));
+      tftSend(F("A2V "));
       TFTSer.println(getActualTemp_celsius(BED));
       break;
 
     case 3:   // A3 Get BED Target Temp
-      SendtoTFT(F("A3V "));
+      tftSend(F("A3V "));
       TFTSer.println(getTargetTemp_celsius(BED));
       break;
 
     case 4:   // A4 Get FAN Speed
-      SendtoTFT(F("A4V "));
+      tftSend(F("A4V "));
       TFTSer.println(getActualFan_percent(FAN0));
       break;
 
     case 5:   // A5 Get Current Coordinates
-      SendtoTFT(F("A5V X: "));
+      tftSend(F("A5V X: "));
       TFTSer.print(getAxisPosition_mm(X));
-      SendtoTFT(F(" Y: "));
+      tftSend(F(" Y: "));
       TFTSer.print(getAxisPosition_mm(Y));
-      SendtoTFT(F(" Z: "));
+      tftSend(F(" Z: "));
       TFTSer.println(getAxisPosition_mm(Z));
       break;
 
     case 6:   // A6 Get printing progress
       if (isPrintingFromMedia()) {
-        SendtoTFT(F("A6V "));
+        tftSend(F("A6V "));
         TFTSer.println(ui8tostr2(getProgress_percent()));
       }
       else
-        SendtoTFTLN(F("A6V ---"));
+        tftSendLn(F("A6V ---"));
       break;
 
     case 7: { // A7 Get Printing Time
       uint32_t time = getProgress_seconds_elapsed() / 60;
-      SendtoTFT(F("A7V "));
+      tftSend(F("A7V "));
       TFTSer.print(ui8tostr2(time / 60));
-      SendtoTFT(F(" H "));
+      tftSend(F(" H "));
       TFTSer.print(ui8tostr2(time % 60));
-      SendtoTFT(F(" M"));
+      tftSend(F(" M"));
       #if ACDEBUG(AC_ALL)
-        SERIAL_ECHOLNPGM("Print time ", ui8tostr2(time / 60), ":", ui8tostr2(time % 60));
+        DEBUG_ECHOLNPGM("Print time ", ui8tostr2(time / 60), ":", ui8tostr2(time % 60));
       #endif
     } break;
 
     case 8:   // A8 Get SD Card list A8 S0
       if (!isMediaInserted()) safe_delay(500);
       if (!isMediaInserted())   // Make sure the card is removed
-        SendtoTFTLN(AC_msg_no_sd_card);
+        tftSendLn(AC_msg_no_sd_card);
       else if (panel_command[3] == 'S')
-        SendFileList( atoi( &panel_command[4] ) );
+        sendFileList( atoi( &panel_command[4] ) );
       break;
 
     case 33:   // A33 Get firmware info
-      SendtoTFT(F("J33 "));
+      tftSend(F("J33 "));
       // If there is an error recorded, show that instead of the FW version
-      if (!GetLastError()) SendtoTFTLN(F(SHORT_BUILD_VERSION));
+      if (!getLastError()) tftSendLn(F(SHORT_BUILD_VERSION));
       break;
   }
 }
 
-void ChironTFT::PanelAction(uint8_t req) {
+void ChironTFT::panelAction(uint8_t req) {
   switch (req) {
     case  9:   // A9 Pause SD print
       if (isPrintingFromMedia()) {
-        SendtoTFTLN(AC_msg_pause);
+        tftSendLn(AC_msg_pause);
         pausePrint();
         printer_state = AC_printer_pausing;
       }
       else
-        SendtoTFTLN(AC_msg_stop);
+        tftSendLn(AC_msg_stop);
       break;
 
     case 10: // A10 Resume SD Print
@@ -613,7 +617,7 @@ void ChironTFT::PanelAction(uint8_t req) {
       else {
         if (printer_state == AC_printer_resuming_from_power_outage)
           injectCommands(F("M1000 C")); // Cancel recovery
-        SendtoTFTLN(AC_msg_stop);
+        tftSendLn(AC_msg_stop);
         printer_state = AC_printer_idle;
       }
       break;
@@ -623,7 +627,7 @@ void ChironTFT::PanelAction(uint8_t req) {
       break;
 
     case 13:   // A13 Select file
-      SelectFile();
+      selectFile();
       break;
 
     case 14:   // A14 Start Printing
@@ -632,11 +636,9 @@ void ChironTFT::PanelAction(uint8_t req) {
         injectCommands(F("M1000 C")); // Cancel recovery
         printer_state = AC_printer_idle;
       }
-      #if ACDebugLevel >= 1
-        SERIAL_ECHOLNPGM("Print: ", selectedfile);
-      #endif
+      DEBUG_ECHOLNPGM("Print: ", selectedfile);
       printFile(selectedfile);
-      SendtoTFTLN(AC_msg_print_from_sd_card);
+      tftSendLn(AC_msg_print_from_sd_card);
       break;
 
     case 15:   // A15 Resuming from outage
@@ -671,7 +673,7 @@ void ChironTFT::PanelAction(uint8_t req) {
     case 19:   // A19 Motors off
       if (!isPrinting()) {
         stepper.disable_all_steppers();
-        SendtoTFTLN(AC_msg_ready);
+        tftSendLn(AC_msg_ready);
       }
       break;
 
@@ -679,7 +681,7 @@ void ChironTFT::PanelAction(uint8_t req) {
       if (panel_command[4] == 'S')
         setFeedrate_percent(atoi(&panel_command[5]));
       else {
-        SendtoTFT(F("A20V "));
+        tftSend(F("A20V "));
         TFTSer.println(getFeedrate_percent());
       }
       break;
@@ -707,7 +709,7 @@ void ChironTFT::PanelAction(uint8_t req) {
         char MoveCmnd[30];
         sprintf_P(MoveCmnd, PSTR("G91\nG0%s\nG90"), panel_command + 3);
         #if ACDEBUG(AC_ACTION)
-          SERIAL_ECHOLNPGM("Move: ", MoveCmnd);
+          DEBUG_ECHOLNPGM("Move: ", MoveCmnd);
         #endif
         setSoftEndstopState(true);  // enable endstops
         injectCommands(MoveCmnd);
@@ -720,7 +722,7 @@ void ChironTFT::PanelAction(uint8_t req) {
         // Temps defined in configuration.h
         setTargetTemp_celsius(PREHEAT_1_TEMP_BED, BED);
         setTargetTemp_celsius(PREHEAT_1_TEMP_HOTEND, E0);
-        SendtoTFTLN();
+        tftSendLn();
         hotbed_state = AC_heater_temp_set;
         hotend_state = AC_heater_temp_set;
       }
@@ -731,7 +733,7 @@ void ChironTFT::PanelAction(uint8_t req) {
       if (!isPrinting()) {
         setTargetTemp_celsius(PREHEAT_2_TEMP_BED, BED);
         setTargetTemp_celsius(PREHEAT_2_TEMP_HOTEND, E0);
-        SendtoTFTLN();
+        tftSendLn();
         hotbed_state = AC_heater_temp_set;
         hotend_state = AC_heater_temp_set;
       }
@@ -742,7 +744,7 @@ void ChironTFT::PanelAction(uint8_t req) {
       if (!isPrinting()) {
         setTargetTemp_celsius(0, E0);
         setTargetTemp_celsius(0, BED);
-        SendtoTFTLN(AC_msg_ready);
+        tftSendLn(AC_msg_ready);
         hotbed_state = AC_heater_off;
         hotend_state = AC_heater_off;
       }
@@ -761,21 +763,21 @@ void ChironTFT::PanelAction(uint8_t req) {
     case 28:   // A28 Filament set A28 O/C
       // Ignore request if printing
       if (isPrinting()) break;
-      SendtoTFTLN();
+      tftSendLn();
       break;
   }
 }
 
-void ChironTFT::PanelProcess(uint8_t req) {
+void ChironTFT::panelProcess(uint8_t req) {
   switch (req) {
     case 29: { // A29 Read Mesh Point A29 X1 Y1
       xy_uint8_t pos;
       float pos_z;
-      pos.x = atoi(&panel_command[FindToken('X')+1]);
-      pos.y = atoi(&panel_command[FindToken('Y')+1]);
+      pos.x = atoi(&panel_command[findToken('X')+1]);
+      pos.y = atoi(&panel_command[findToken('Y')+1]);
       pos_z = getMeshPoint(pos);
 
-      SendtoTFT(F("A29V "));
+      tftSend(F("A29V "));
       TFTSer.println(pos_z * 100);
       if (!isPrinting()) {
         setSoftEndstopState(true);  // disable endstops
@@ -786,7 +788,7 @@ void ChironTFT::PanelProcess(uint8_t req) {
 
           if (isPositionKnown()) {
             #if ACDEBUG(AC_INFO)
-              SERIAL_ECHOLNPGM("Moving to mesh point at x: ", pos.x, " y: ", pos.y, " z: ", pos_z);
+              DEBUG_ECHOLNPGM("Moving to mesh point at x: ", pos.x, " y: ", pos.y, " z: ", pos_z);
             #endif
             // Go up before moving
             setAxisPosition_mm(3.0,Z);
@@ -795,7 +797,7 @@ void ChironTFT::PanelProcess(uint8_t req) {
             setAxisPosition_mm(20 + (93 * pos.y), Y);
             setAxisPosition_mm(0.0, Z);
             #if ACDEBUG(AC_INFO)
-              SERIAL_ECHOLNPGM("Current Z: ", getAxisPosition_mm(Z));
+              DEBUG_ECHOLNPGM("Current Z: ", getAxisPosition_mm(Z));
             #endif
           }
         }
@@ -805,24 +807,24 @@ void ChironTFT::PanelProcess(uint8_t req) {
     } break;
 
     case 30:     // A30 Auto leveling
-      if (FindToken('S') >= 0) { // Start probing New panel adds spaces..
+      if (findToken('S') >= 0) { // Start probing New panel adds spaces..
         // Ignore request if printing
         if (isPrinting())
-          SendtoTFTLN(AC_msg_probing_not_allowed); // forbid auto leveling
+          tftSendLn(AC_msg_probing_not_allowed); // forbid auto leveling
         else {
-          SendtoTFTLN(AC_msg_start_probing);
+          tftSendLn(AC_msg_start_probing);
           injectCommands(F("G28\nG29"));
           printer_state = AC_printer_probing;
         }
       }
       else
-        SendtoTFTLN(AC_msg_start_probing); // Just enter levelling menu
+        tftSendLn(AC_msg_start_probing); // Just enter levelling menu
       break;
 
     case 31:   // A31 Adjust all Probe Points
       // The tokens can occur in different places on the new panel so we need to find it.
 
-      if (FindToken('C') >= 0) { // Restore and apply original offsets
+      if (findToken('C') >= 0) { // Restore and apply original offsets
         if (!isPrinting()) {
           injectCommands(F("M501\nM420 S1"));
           selectedmeshpoint.x = selectedmeshpoint.y = 99;
@@ -830,7 +832,7 @@ void ChironTFT::PanelProcess(uint8_t req) {
         }
       }
 
-      else if (FindToken('D') >= 0) { // Save Z Offset tables and restore leveling state
+      else if (findToken('D') >= 0) { // Save Z Offset tables and restore leveling state
         if (!isPrinting()) {
           setAxisPosition_mm(1.0,Z); // Lift nozzle before any further movements are made
           injectCommands(F("M500"));
@@ -839,8 +841,8 @@ void ChironTFT::PanelProcess(uint8_t req) {
         }
       }
 
-      else if (FindToken('G') >= 0) { // Get current offset
-        SendtoTFT(F("A31V "));
+      else if (findToken('G') >= 0) { // Get current offset
+        tftSend(F("A31V "));
         // When printing use the live z Offset position
         // we will use babystepping to move the print head
         if (isPrinting())
@@ -852,7 +854,7 @@ void ChironTFT::PanelProcess(uint8_t req) {
       }
 
       else {
-        int8_t tokenpos = FindToken('S');
+        int8_t tokenpos = findToken('S');
         if (tokenpos >= 0) { // Set offset (adjusts all points by value)
           float Zshift = atof(&panel_command[tokenpos+1]);
           setSoftEndstopState(false);  // disable endstops
@@ -860,22 +862,22 @@ void ChironTFT::PanelProcess(uint8_t req) {
           // From the leveling panel use the all points UI to adjust the print pos.
           if (isPrinting()) {
             #if ACDEBUG(AC_INFO)
-              SERIAL_ECHOLNPGM("Change Zoffset from:", live_Zoffset, " to ", live_Zoffset + Zshift);
+              DEBUG_ECHOLNPGM("Change Zoffset from:", live_Zoffset, " to ", live_Zoffset + Zshift);
             #endif
             if (isAxisPositionKnown(Z)) {
               #if ACDEBUG(AC_INFO)
                 const float currZpos = getAxisPosition_mm(Z);
-                SERIAL_ECHOLNPGM("Nudge Z pos from ", currZpos, " to ", currZpos + constrain(Zshift, -0.05, 0.05));
+                DEBUG_ECHOLNPGM("Nudge Z pos from ", currZpos, " to ", currZpos + constrain(Zshift, -0.05, 0.05));
               #endif
               // Use babystepping to adjust the head position
               int16_t steps = mmToWholeSteps(constrain(Zshift,-0.05,0.05), Z);
               #if ACDEBUG(AC_INFO)
-                SERIAL_ECHOLNPGM("Steps to move Z: ", steps);
+                DEBUG_ECHOLNPGM("Steps to move Z: ", steps);
               #endif
               babystepAxis_steps(steps, Z);
               live_Zoffset += Zshift;
             }
-            SendtoTFT(F("A31V "));
+            tftSend(F("A31V "));
             TFTSer.println(live_Zoffset);
           }
           else {
@@ -884,23 +886,23 @@ void ChironTFT::PanelProcess(uint8_t req) {
               const float currval = getMeshPoint(pos);
               setMeshPoint(pos, constrain(currval + Zshift, AC_LOWEST_MESHPOINT_VAL, 2));
               #if ACDEBUG(AC_INFO)
-                SERIAL_ECHOLNPGM("Change mesh point X", x," Y",y ," from ", currval, " to ", getMeshPoint(pos) );
+                DEBUG_ECHOLNPGM("Change mesh point X", x," Y",y ," from ", currval, " to ", getMeshPoint(pos) );
               #endif
             }
             const float currZOffset = getZOffset_mm();
             #if ACDEBUG(AC_INFO)
-              SERIAL_ECHOLNPGM("Change probe offset from ", currZOffset, " to  ", currZOffset + Zshift);
+              DEBUG_ECHOLNPGM("Change probe offset from ", currZOffset, " to  ", currZOffset + Zshift);
             #endif
 
             setZOffset_mm(currZOffset + Zshift);
-            SendtoTFT(F("A31V "));
+            tftSend(F("A31V "));
             TFTSer.println(getZOffset_mm());
 
             if (isAxisPositionKnown(Z)) {
               // Move Z axis
               const float currZpos = getAxisPosition_mm(Z);
               #if ACDEBUG(AC_INFO)
-                SERIAL_ECHOLNPGM("Move Z pos from ", currZpos, " to ", currZpos + constrain(Zshift, -0.05, 0.05));
+                DEBUG_ECHOLNPGM("Move Z pos from ", currZpos, " to ", currZpos + constrain(Zshift, -0.05, 0.05));
               #endif
               setAxisPosition_mm(currZpos+constrain(Zshift,-0.05,0.05),Z);
             }
@@ -916,7 +918,7 @@ void ChironTFT::PanelProcess(uint8_t req) {
       //TFTSer.println();
       break;
 
-    // A33 firmware info request see PanelInfo()
+    // A33 firmware info request see panelInfo()
 
     case 34:    // A34 Adjust single mesh point A34 C/S X1 Y1 V123
       if (panel_command[3] == 'C') { // Restore original offsets
@@ -932,8 +934,8 @@ void ChironTFT::PanelProcess(uint8_t req) {
         float currmesh = getMeshPoint(pos);
         float newval   = atof(&panel_command[11])/100;
         #if ACDEBUG(AC_INFO)
-          SERIAL_ECHOLNPGM("Change mesh point x:", pos.x, " y:", pos.y);
-          SERIAL_ECHOLNPGM("from ", currmesh, " to ", newval);
+          DEBUG_ECHOLNPGM("Change mesh point x:", pos.x, " y:", pos.y);
+          DEBUG_ECHOLNPGM("from ", currmesh, " to ", newval);
         #endif
         // Update Meshpoint
         setMeshPoint(pos,newval);
@@ -944,7 +946,7 @@ void ChironTFT::PanelProcess(uint8_t req) {
             setSoftEndstopState(false);
             float currZpos = getAxisPosition_mm(Z);
             #if ACDEBUG(AC_INFO)
-              SERIAL_ECHOLNPGM("Move Z pos from ", currZpos, " to ", currZpos + constrain(newval - currmesh, -0.05, 0.05));
+              DEBUG_ECHOLNPGM("Move Z pos from ", currZpos, " to ", currZpos + constrain(newval - currmesh, -0.05, 0.05));
             #endif
             setAxisPosition_mm(currZpos + constrain(newval - currmesh, -0.05, 0.05), Z);
           }
@@ -953,19 +955,19 @@ void ChironTFT::PanelProcess(uint8_t req) {
       break;
 
     case 36:    // A36 Auto leveling for new TFT bet that was a typo in the panel code!
-      SendtoTFTLN(AC_msg_start_probing);
+      tftSendLn(AC_msg_start_probing);
       break;
   }
 }
 
-bool ChironTFT::GetLastError() {
+bool ChironTFT::getLastError() {
   switch (last_error) {
-    case AC_error_abnormal_temp_bed: SendtoTFTLN(AC_msg_error_bed_temp);    break;
-    case AC_error_abnormal_temp_t0:  SendtoTFTLN(AC_msg_error_hotend_temp); break;
-    case AC_error_noSD:              SendtoTFTLN(AC_msg_error_sd_card);     break;
-    case AC_error_powerloss:         SendtoTFTLN(AC_msg_power_loss);        break;
-    case AC_error_EEPROM:            SendtoTFTLN(AC_msg_eeprom_version);    break;
-    case AC_error_filament_runout:   SendtoTFTLN(AC_msg_filament_out);      break;
+    case AC_error_abnormal_temp_bed: tftSendLn(AC_msg_error_bed_temp);    break;
+    case AC_error_abnormal_temp_t0:  tftSendLn(AC_msg_error_hotend_temp); break;
+    case AC_error_noSD:              tftSendLn(AC_msg_error_sd_card);     break;
+    case AC_error_powerloss:         tftSendLn(AC_msg_power_loss);        break;
+    case AC_error_EEPROM:            tftSendLn(AC_msg_eeprom_version);    break;
+    case AC_error_filament_runout:   tftSendLn(AC_msg_filament_out);      break;
     default: return false;
   }
   last_error = AC_error_none;

+ 24 - 24
Marlin/src/lcd/extui/anycubic_chiron/chiron_tft.h

@@ -57,32 +57,32 @@ class ChironTFT {
   static float            live_Zoffset;
   static file_menu_t      file_menu;
   public:
-    static void Startup();
-    static void IdleLoop();
-    static void PrinterKilled(FSTR_P, FSTR_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 PowerLossRecovery();
-    static void PrintComplete();
-    static void SendtoTFT(FSTR_P const=nullptr);
-    static void SendtoTFTLN(FSTR_P const=nullptr);
+    static void startup();
+    static void idleLoop();
+    static void printerKilled(FSTR_P, FSTR_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 powerLossRecovery();
+    static void printComplete();
+    static void tftSend(FSTR_P const=nullptr);
+    static void tftSendLn(FSTR_P const=nullptr);
   private:
-    static void DetectPanelType();
-    static bool ReadTFTCommand();
-    static int8_t FindToken(char);
-    static void CheckHeaters();
-    static void SendFileList(int8_t);
-    static void SelectFile();
-    static void ProcessPanelRequest();
-    static void PanelInfo(uint8_t);
-    static void PanelAction(uint8_t);
-    static void PanelProcess(uint8_t);
-    static bool GetLastError();
+    static void detectPanelType();
+    static bool readTFTCommand();
+    static int8_t findToken(char);
+    static void checkHeaters();
+    static void sendFileList(int8_t);
+    static void selectFile();
+    static void processPanelRequest();
+    static void panelInfo(uint8_t);
+    static void panelAction(uint8_t);
+    static void panelProcess(uint8_t);
+    static bool getLastError();
 };
 
-extern ChironTFT Chiron;
+extern ChironTFT chiron;
 
 } // Anycubic namespace

Some files were not shown because too many files changed in this diff