From 308508830e4c96ec75d12e4fb77344b3a3d42c80 Mon Sep 17 00:00:00 2001 From: thisiskeithb Date: Mon, 18 May 2020 11:15:14 -0700 Subject: [PATCH 1/4] Hotend Idle Timeout Fixes Use MIN_TO_MS instead of SEC_TO_MS and rename "duration" variable. --- Marlin/Configuration_adv.h | 8 ++++---- Marlin/src/feature/hotend_idle.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index 9d1118838aff..cbb85e32edc2 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -336,10 +336,10 @@ */ //#define HOTEND_IDLE_TIMEOUT #if ENABLED(HOTEND_IDLE_TIMEOUT) - #define HOTEND_IDLE_DURATION_SEC 5 // (minutes) Time without extruder movement to trigger protection - #define HOTEND_IDLE_MIN_TRIGGER 180 // (°C) Minimum temperature to enable hotend protection - #define HOTEND_IDLE_NOZZLE_TARGET 0 // (°C) Safe temperature for the nozzle after timeout - #define HOTEND_IDLE_BED_TARGET 0 // (°C) Safe temperature for the bed after timeout + #define HOTEND_IDLE_TIMEOUT_DURATION 5 // (minutes) Time without extruder movement to trigger protection + #define HOTEND_IDLE_MIN_TRIGGER 180 // (°C) Minimum temperature to enable hotend protection + #define HOTEND_IDLE_NOZZLE_TARGET 0 // (°C) Safe temperature for the nozzle after timeout + #define HOTEND_IDLE_BED_TARGET 0 // (°C) Safe temperature for the bed after timeout #endif // @section temperature diff --git a/Marlin/src/feature/hotend_idle.h b/Marlin/src/feature/hotend_idle.h index 298439da299d..0791be476bee 100644 --- a/Marlin/src/feature/hotend_idle.h +++ b/Marlin/src/feature/hotend_idle.h @@ -27,7 +27,7 @@ class HotendIdleProtection { public: static void check(); private: - static constexpr millis_t hp_interval = SEC_TO_MS(HOTEND_IDLE_DURATION_SEC); + static constexpr millis_t hp_interval = MIN_TO_MS(HOTEND_IDLE_TIMEOUT_DURATION); static millis_t next_protect_ms; static void check_hotends(const millis_t &ms); static void check_e_motion(const millis_t &ms); From 358deda764584fd26092456f0c12052d17133398 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 19 May 2020 02:31:39 -0500 Subject: [PATCH 2/4] Update Configuration_adv.h --- Marlin/Configuration_adv.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index cbb85e32edc2..b964f7a496a4 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -9,7 +9,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + *TIMEOUT_ * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -336,10 +336,10 @@ */ //#define HOTEND_IDLE_TIMEOUT #if ENABLED(HOTEND_IDLE_TIMEOUT) - #define HOTEND_IDLE_TIMEOUT_DURATION 5 // (minutes) Time without extruder movement to trigger protection - #define HOTEND_IDLE_MIN_TRIGGER 180 // (°C) Minimum temperature to enable hotend protection - #define HOTEND_IDLE_NOZZLE_TARGET 0 // (°C) Safe temperature for the nozzle after timeout - #define HOTEND_IDLE_BED_TARGET 0 // (°C) Safe temperature for the bed after timeout + #define HOTEND_IDLE_TIMEOUT_SEC (5*60) // (seconds) Time without extruder movement to trigger protection + #define HOTEND_IDLE_MIN_TRIGGER 180 // (°C) Minimum temperature to enable hotend protection + #define HOTEND_IDLE_NOZZLE_TARGET 0 // (°C) Safe temperature for the nozzle after timeout + #define HOTEND_IDLE_BED_TARGET 0 // (°C) Safe temperature for the bed after timeout #endif // @section temperature From 1c20b6e6bd9784022df3b131f4219b10fb55f6ce Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 19 May 2020 02:32:25 -0500 Subject: [PATCH 3/4] Update Configuration_adv.h --- Marlin/Configuration_adv.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Marlin/Configuration_adv.h b/Marlin/Configuration_adv.h index b964f7a496a4..76cf40e36221 100644 --- a/Marlin/Configuration_adv.h +++ b/Marlin/Configuration_adv.h @@ -9,7 +9,7 @@ * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - *TIMEOUT_ + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the @@ -336,10 +336,10 @@ */ //#define HOTEND_IDLE_TIMEOUT #if ENABLED(HOTEND_IDLE_TIMEOUT) - #define HOTEND_IDLE_TIMEOUT_SEC (5*60) // (seconds) Time without extruder movement to trigger protection - #define HOTEND_IDLE_MIN_TRIGGER 180 // (°C) Minimum temperature to enable hotend protection - #define HOTEND_IDLE_NOZZLE_TARGET 0 // (°C) Safe temperature for the nozzle after timeout - #define HOTEND_IDLE_BED_TARGET 0 // (°C) Safe temperature for the bed after timeout + #define HOTEND_IDLE_TIMEOUT_SEC (5*60) // (seconds) Time without extruder movement to trigger protection + #define HOTEND_IDLE_MIN_TRIGGER 180 // (°C) Minimum temperature to enable hotend protection + #define HOTEND_IDLE_NOZZLE_TARGET 0 // (°C) Safe temperature for the nozzle after timeout + #define HOTEND_IDLE_BED_TARGET 0 // (°C) Safe temperature for the bed after timeout #endif // @section temperature From f7eab63a3962ed8f946febb95367f85c0d2276b6 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Tue, 19 May 2020 02:32:59 -0500 Subject: [PATCH 4/4] Update hotend_idle.h --- Marlin/src/feature/hotend_idle.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/feature/hotend_idle.h b/Marlin/src/feature/hotend_idle.h index 0791be476bee..73de51c2dd0f 100644 --- a/Marlin/src/feature/hotend_idle.h +++ b/Marlin/src/feature/hotend_idle.h @@ -27,7 +27,7 @@ class HotendIdleProtection { public: static void check(); private: - static constexpr millis_t hp_interval = MIN_TO_MS(HOTEND_IDLE_TIMEOUT_DURATION); + static constexpr millis_t hp_interval = SEC_TO_MS(HOTEND_IDLE_TIMEOUT_SEC); static millis_t next_protect_ms; static void check_hotends(const millis_t &ms); static void check_e_motion(const millis_t &ms);