From cc65cbb05e92f70843de636dff69cb6cb40bbafc Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" Date: Fri, 25 Nov 2022 21:25:49 +1100 Subject: [PATCH] Update CJC.cpp --- source/Core/Threads/OperatingModes/CJC.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Core/Threads/OperatingModes/CJC.cpp b/source/Core/Threads/OperatingModes/CJC.cpp index 58f8d5fb..bea6c46f 100644 --- a/source/Core/Threads/OperatingModes/CJC.cpp +++ b/source/Core/Threads/OperatingModes/CJC.cpp @@ -5,7 +5,7 @@ void performCJCC(void) { // Calibrate Cold Junction Compensation directly at boot, before internal components get warm. OLED::refresh(); osDelay(50); - if (!isTipDisconnected() && (TipThermoModel::getTipInC() - getHandleTemperature(0) / 10) < 10) { + if (!isTipDisconnected() && abs(int(TipThermoModel::getTipInC() - getHandleTemperature(0) / 10)) < 10) { uint16_t setoffset = 0; // If the thermo-couple at the end of the tip, and the handle are at // equilibrium, then the output should be zero, as there is no temperature