mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-02-18 15:21:25 +00:00
🐛 Fix hotend idle timeout checks
This commit is contained in:
parent
d036097bca
commit
6cc4dd10bc
1 changed files with 4 additions and 4 deletions
|
@ -55,7 +55,7 @@ void HotendIdleProtection::check_hotends(const millis_t &ms) {
|
||||||
if (!do_prot)
|
if (!do_prot)
|
||||||
next_protect_ms = 0; // No hotends are hot so cancel timeout
|
next_protect_ms = 0; // No hotends are hot so cancel timeout
|
||||||
else if (!next_protect_ms) // Timeout is possible?
|
else if (!next_protect_ms) // Timeout is possible?
|
||||||
next_protect_ms = ms + cfg.timeout * 1000; // Start timeout if not already set
|
next_protect_ms = ms + 1000UL * cfg.timeout; // Start timeout if not already set
|
||||||
}
|
}
|
||||||
|
|
||||||
void HotendIdleProtection::check_e_motion(const millis_t &ms) {
|
void HotendIdleProtection::check_e_motion(const millis_t &ms) {
|
||||||
|
@ -63,7 +63,7 @@ void HotendIdleProtection::check_e_motion(const millis_t &ms) {
|
||||||
if (old_e_position != current_position.e) {
|
if (old_e_position != current_position.e) {
|
||||||
old_e_position = current_position.e; // Track filament motion
|
old_e_position = current_position.e; // Track filament motion
|
||||||
if (next_protect_ms) // If some heater is on then...
|
if (next_protect_ms) // If some heater is on then...
|
||||||
next_protect_ms = ms + cfg.timeout * 1000; // ...delay the timeout till later
|
next_protect_ms = ms + 1000UL * cfg.timeout; // ...delay the timeout till later
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue