mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-12-02 16:59:03 +00:00
Fix Hotend-abort-on-idle Check (#21535)
This commit is contained in:
parent
a628559258
commit
c4b69fcddd
@ -34,6 +34,7 @@
|
|||||||
|
|
||||||
#include "../module/temperature.h"
|
#include "../module/temperature.h"
|
||||||
#include "../module/motion.h"
|
#include "../module/motion.h"
|
||||||
|
#include "../module/planner.h"
|
||||||
#include "../lcd/marlinui.h"
|
#include "../lcd/marlinui.h"
|
||||||
|
|
||||||
extern HotendIdleProtection hotend_idle;
|
extern HotendIdleProtection hotend_idle;
|
||||||
@ -43,7 +44,8 @@ millis_t HotendIdleProtection::next_protect_ms = 0;
|
|||||||
void HotendIdleProtection::check_hotends(const millis_t &ms) {
|
void HotendIdleProtection::check_hotends(const millis_t &ms) {
|
||||||
bool do_prot = false;
|
bool do_prot = false;
|
||||||
HOTEND_LOOP() {
|
HOTEND_LOOP() {
|
||||||
if (thermalManager.degHotend(e) >= HOTEND_IDLE_MIN_TRIGGER) {
|
const bool busy = (TERN0(HAS_RESUME_CONTINUE, wait_for_user) || planner.has_blocks_queued());
|
||||||
|
if (thermalManager.degHotend(e) >= HOTEND_IDLE_MIN_TRIGGER && !busy) {
|
||||||
do_prot = true; break;
|
do_prot = true; break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user