From 2e1c2343cbc336fc4c3cfb9157dbe3e38b62b3ea Mon Sep 17 00:00:00 2001 From: Knutwurst <36196269+knutwurst@users.noreply.github.com> Date: Mon, 13 Sep 2021 22:41:58 +0200 Subject: [PATCH] Revert "HeaterCheck is now only displayed one single time at startup" This reverts commit 8aa79ade6a21d8b00cac39ba94f4e1e0601c00c1. --- Marlin/src/lcd/anycubic_touchscreen.cpp | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/Marlin/src/lcd/anycubic_touchscreen.cpp b/Marlin/src/lcd/anycubic_touchscreen.cpp index 76d9253d..8e40f3e7 100755 --- a/Marlin/src/lcd/anycubic_touchscreen.cpp +++ b/Marlin/src/lcd/anycubic_touchscreen.cpp @@ -250,7 +250,6 @@ void AnycubicTouchscreenClass::Setup() #endif setup_OutageTestPin(); - CheckHeaterError(); } #if ENABLED(KNUTWURST_MEGA_P_LASER) @@ -1288,13 +1287,21 @@ void AnycubicTouchscreenClass::CheckHeaterError() { if ((thermalManager.degHotend(0) < 5) || (thermalManager.degHotend(0) > 300)) { - #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 + 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; } } @@ -2438,6 +2445,7 @@ SERIAL_PROTOCOLLN(cvalue); void AnycubicTouchscreenClass::CommandScan() { + CheckHeaterError(); CheckSDCardChange(); StateHandler();