From 8aa79ade6a21d8b00cac39ba94f4e1e0601c00c1 Mon Sep 17 00:00:00 2001 From: Knutwurst <36196269+knutwurst@users.noreply.github.com> Date: Mon, 13 Sep 2021 12:11:58 +0200 Subject: [PATCH] HeaterCheck is now only displayed one single time at startup --- Marlin/src/lcd/anycubic_touchscreen.cpp | 24 ++++++++---------------- 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/Marlin/src/lcd/anycubic_touchscreen.cpp b/Marlin/src/lcd/anycubic_touchscreen.cpp index 8e40f3e7..76d9253d 100755 --- a/Marlin/src/lcd/anycubic_touchscreen.cpp +++ b/Marlin/src/lcd/anycubic_touchscreen.cpp @@ -250,6 +250,7 @@ void AnycubicTouchscreenClass::Setup() #endif setup_OutageTestPin(); + CheckHeaterError(); } #if ENABLED(KNUTWURST_MEGA_P_LASER) @@ -1287,21 +1288,13 @@ void AnycubicTouchscreenClass::CheckHeaterError() { if ((thermalManager.degHotend(0) < 5) || (thermalManager.degHotend(0) > 300)) { - if (HeaterCheckCount > 60000) - { - HeaterCheckCount = 0; - #ifndef ANYCUBIC_TFT_DEBUG - HARDWARE_SERIAL_PROTOCOLPGM("J10"); // J10 Hotend temperature abnormal - HARDWARE_SERIAL_ENTER(); - #endif - #ifdef ANYCUBIC_TFT_DEBUG - SERIAL_ECHOLNPGM("TFT Serial Debug: Hotend temperature abnormal... J20"); - #endif - } else { - HeaterCheckCount++; - } - } else { - HeaterCheckCount = 0; + #ifndef ANYCUBIC_TFT_DEBUG + HARDWARE_SERIAL_PROTOCOLPGM("J10"); // J10 Hotend temperature abnormal + HARDWARE_SERIAL_ENTER(); + #endif + #ifdef ANYCUBIC_TFT_DEBUG + SERIAL_ECHOLNPGM("TFT Serial Debug: Hotend temperature abnormal... J20"); + #endif } } @@ -2445,7 +2438,6 @@ SERIAL_PROTOCOLLN(cvalue); void AnycubicTouchscreenClass::CommandScan() { - CheckHeaterError(); CheckSDCardChange(); StateHandler();