Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Duet3D/RepRapFirmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/Heating/Heat.cpp')
-rw-r--r--src/Heating/Heat.cpp16
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);