Skip to content

Commit 6cc4dd1

Browse files
committed
🐛 Fix hotend idle timeout checks
1 parent d036097 commit 6cc4dd1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Marlin/src/feature/hotend_idle.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ void HotendIdleProtection::check_hotends(const millis_t &ms) {
5555
if (!do_prot)
5656
next_protect_ms = 0; // No hotends are hot so cancel timeout
5757
else if (!next_protect_ms) // Timeout is possible?
58-
next_protect_ms = ms + cfg.timeout * 1000; // Start timeout if not already set
58+
next_protect_ms = ms + 1000UL * cfg.timeout; // Start timeout if not already set
5959
}
6060

6161
void HotendIdleProtection::check_e_motion(const millis_t &ms) {
6262
static float old_e_position = 0;
6363
if (old_e_position != current_position.e) {
64-
old_e_position = current_position.e; // Track filament motion
65-
if (next_protect_ms) // If some heater is on then...
66-
next_protect_ms = ms + cfg.timeout * 1000; // ...delay the timeout till later
64+
old_e_position = current_position.e; // Track filament motion
65+
if (next_protect_ms) // If some heater is on then...
66+
next_protect_ms = ms + 1000UL * cfg.timeout; // ...delay the timeout till later
6767
}
6868
}
6969

0 commit comments

Comments
 (0)