diff options
Diffstat (limited to 'src/Heating/Heat.cpp')
-rw-r--r-- | src/Heating/Heat.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Heating/Heat.cpp b/src/Heating/Heat.cpp index a4759bd2..0ddb64b0 100644 --- a/src/Heating/Heat.cpp +++ b/src/Heating/Heat.cpp @@ -732,6 +732,22 @@ void Heat::SwitchOffAll(bool includingChamberAndBed) noexcept } } +// Turn off all local heaters. Safe to call from an ISR. Called only from the tick ISR. +void Heat::SwitchOffAllLocalFromISR() noexcept +{ + for (Heater* h : heaters) + { + if (h != nullptr +#if SUPPORT_CAN_EXPANSION + && h->IsLocal() +#endif + ) + { + h->SwitchOff(); + } + } +} + void Heat::Standby(int heater, const Tool *tool) noexcept { const auto h = FindHeater(heater); |