From 26f31743f72226213ffb43ac58c703721819af42 Mon Sep 17 00:00:00 2001 From: Alex Voinea Date: Wed, 16 Feb 2022 10:06:07 +0100 Subject: [PATCH 1/2] Fix crashDet timer overflow handling --- Firmware/Marlin_main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index b900492b4..3a9ff7d68 100755 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -200,7 +200,7 @@ unsigned long pause_time = 0; unsigned long start_pause_print = _millis(); unsigned long t_fan_rising_edge = _millis(); LongTimer safetyTimer; -static ShortTimer crashDetTimer; +static LongTimer crashDetTimer; //unsigned long load_filament_time; From 91c71da810c2687442c40f67ae8bd813a1e86dbe Mon Sep 17 00:00:00 2001 From: Alex Voinea Date: Thu, 17 Feb 2022 08:48:29 +0100 Subject: [PATCH 2/2] Convert some more suspicious timers to LongTimer --- Firmware/cmdqueue.cpp | 2 +- Firmware/mmu.cpp | 6 +++--- Firmware/mmu.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Firmware/cmdqueue.cpp b/Firmware/cmdqueue.cpp index c100e4c70..bc39c95e8 100755 --- a/Firmware/cmdqueue.cpp +++ b/Firmware/cmdqueue.cpp @@ -24,7 +24,7 @@ int serial_count = 0; //index of character read from serial line bool comment_mode = false; char *strchr_pointer; // just a pointer to find chars in the command string like X, Y, Z, E, etc -ShortTimer farm_incomplete_command_timeout_timer; +LongTimer farm_incomplete_command_timeout_timer; long gcode_N = 0; long gcode_LastN = 0; diff --git a/Firmware/mmu.cpp b/Firmware/mmu.cpp index 7fcef8ab8..b637b8c24 100755 --- a/Firmware/mmu.cpp +++ b/Firmware/mmu.cpp @@ -75,9 +75,9 @@ int16_t mmu_version = -1; int16_t mmu_buildnr = -1; -ShortTimer mmu_last_request; -ShortTimer mmu_last_response; -ShortTimer mmu_last_finda_response; +LongTimer mmu_last_request; +LongTimer mmu_last_response; +LongTimer mmu_last_finda_response; MmuCmd mmu_last_cmd = MmuCmd::None; uint16_t mmu_power_failures = 0; diff --git a/Firmware/mmu.h b/Firmware/mmu.h index 40a6dc727..2e6247564 100644 --- a/Firmware/mmu.h +++ b/Firmware/mmu.h @@ -15,7 +15,7 @@ extern uint8_t mmu_extruder; extern uint8_t tmp_extruder; extern int8_t mmu_finda; -extern ShortTimer mmu_last_finda_response; +extern LongTimer mmu_last_finda_response; extern bool ir_sensor_detected; extern int16_t mmu_version;