From 862ac308c74bd0890423f6b44ed0e9a5b5f0a667 Mon Sep 17 00:00:00 2001 From: Knutwurst <36196269+knutwurst@users.noreply.github.com> Date: Fri, 2 Jun 2023 18:18:49 +0200 Subject: [PATCH] Clean dead code and disable debugging messages. --- .../extui/knutwurst/anycubic_touchscreen.cpp | 44 +------------------ 1 file changed, 1 insertion(+), 43 deletions(-) diff --git a/Marlin/src/lcd/extui/knutwurst/anycubic_touchscreen.cpp b/Marlin/src/lcd/extui/knutwurst/anycubic_touchscreen.cpp index dcb1fcaf..3ec86748 100755 --- a/Marlin/src/lcd/extui/knutwurst/anycubic_touchscreen.cpp +++ b/Marlin/src/lcd/extui/knutwurst/anycubic_touchscreen.cpp @@ -32,7 +32,7 @@ #include "../../../module/motion.h" #include "../../../module/stepper.h" -#define ANYCUBIC_TFT_DEBUG +//#define ANYCUBIC_TFT_DEBUG //#define KNUTWURST_DGUS2_TFT //#define KNUTWURST_TFT_LEVELING @@ -138,7 +138,6 @@ CheckHeaterError(); DoFilamentRunoutCheck(); - #ifdef STARTUP_CHIME BUZZ(100, 554); BUZZ(100, 740); @@ -1110,46 +1109,6 @@ void AnycubicTouchscreenClass::RenderCurrentFolder(uint16_t selectedNumber) { TFTcmdbuffer[TFTbufindw][serial3_count] = 0; // terminate string if (!TFTcomment_mode) { - /* - // -------- START ERROR CORRECTION ---------- - TFTcomment_mode = false; //for new command - if (strchr(TFTcmdbuffer[TFTbufindw], 'N') != NULL) - { - if (strchr(TFTcmdbuffer[TFTbufindw], '*') != NULL) - { - byte checksum = 0; - byte count = 0; - while(TFTcmdbuffer[TFTbufindw][count] != '*') checksum = checksum^TFTcmdbuffer[TFTbufindw][count++]; - TFTstrchr_pointer = strchr(TFTcmdbuffer[TFTbufindw], '*'); - - if ( (int)(strtod(&TFTcmdbuffer[TFTbufindw][TFTstrchr_pointer - TFTcmdbuffer[TFTbufindw] + 1], NULL)) != checksum) - { - SEND_PGM("ERR "); - LCD_SERIAL.flush(); - SEND_PGM("ERR "); - LCD_SERIAL.flush(); - serial3_count = 0; - return; - } - //if no errors, continue parsing - } else { - SEND_PGM("ERR "); - LCD_SERIAL.flush(); - serial3_count = 0; - return; - } - //if no errors, continue parsing - } else { // if we don't receive 'N' but still see '*' - if ((strchr(TFTcmdbuffer[TFTbufindw], '*') != NULL)) - { - SEND_PGM("ERR "); - serial3_count = 0; - return; - } - } - // -------- FINISH ERROR CORRECTION ---------- - */ - if ((strchr(TFTcmdbuffer[TFTbufindw], 'A') != NULL)) { TFTstrchr_pointer = strchr(TFTcmdbuffer[TFTbufindw], 'A'); switch ((int)((strtod(&TFTcmdbuffer[TFTbufindw][TFTstrchr_pointer - TFTcmdbuffer[TFTbufindw] + 1], NULL)))) { @@ -1222,7 +1181,6 @@ void AnycubicTouchscreenClass::RenderCurrentFolder(uint16_t selectedNumber) { #endif { if (CodeSeen('S')) filenumber = CodeValue(); - //PrintList(); RenderCurrentFileList(); } #endif