From 4cff4d35d33a91e711693c2ecb5e59b04b09681b Mon Sep 17 00:00:00 2001 From: David Crocker Date: Mon, 27 Dec 2021 17:12:56 +0000 Subject: Replaced < NEARLY_ABS_ZERO by <= NEARLY_ABS_ZERO --- src/GCodes/GCodes2.cpp | 2 +- src/Tools/Tool.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/GCodes/GCodes2.cpp b/src/GCodes/GCodes2.cpp index 38b8af17..e2205c2f 100644 --- a/src/GCodes/GCodes2.cpp +++ b/src/GCodes/GCodes2.cpp @@ -1969,7 +1969,7 @@ bool GCodes::HandleMcode(GCodeBuffer& gb, const StringRef& reply) THROWS(GCodeEx } else { - if (temperature < NEARLY_ABS_ZERO) + if (temperature <= NEARLY_ABS_ZERO) { heat.SwitchOff(currentHeater); } diff --git a/src/Tools/Tool.cpp b/src/Tools/Tool.cpp index 99903869..8408b458 100644 --- a/src/Tools/Tool.cpp +++ b/src/Tools/Tool.cpp @@ -657,7 +657,7 @@ void Tool::SetToolHeaterActiveTemperature(size_t heaterNumber, float temp) THROW const int8_t heater = heaters[heaterNumber]; const Tool * const currentTool = reprap.GetCurrentTool(); const bool setHeater = (currentTool == nullptr || currentTool == this); - if (temp < NEARLY_ABS_ZERO) // temperatures close to ABS_ZERO turn off the heater + if (temp <= NEARLY_ABS_ZERO) // temperatures close to ABS_ZERO turn off the heater { activeTemperatures[heaterNumber] = 0; if (setHeater) @@ -688,7 +688,7 @@ void Tool::SetToolHeaterStandbyTemperature(size_t heaterNumber, float temp) THRO const Tool * const currentTool = reprap.GetCurrentTool(); const Tool * const lastStandbyTool = reprap.GetHeat().GetLastStandbyTool(heater); const bool setHeater = (currentTool == nullptr || currentTool == this || lastStandbyTool == nullptr || lastStandbyTool == this); - if (temp < NEARLY_ABS_ZERO) // temperatures close to ABS_ZERO turn off the heater + if (temp <= NEARLY_ABS_ZERO) // temperatures close to ABS_ZERO turn off the heater { standbyTemperatures[heaterNumber] = 0; if (setHeater) -- cgit v1.2.3