From 53982efa14e2e9551fa54e0736269d32a24f26a8 Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" Date: Sat, 11 Jan 2025 12:56:00 +1100 Subject: [PATCH] Use the ADC_MAX_READING value --- source/Core/Threads/PIDThread.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/Core/Threads/PIDThread.cpp b/source/Core/Threads/PIDThread.cpp index c7b27118..3c27fc89 100644 --- a/source/Core/Threads/PIDThread.cpp +++ b/source/Core/Threads/PIDThread.cpp @@ -249,7 +249,7 @@ void detectThermalRunaway(const TemperatureType_t currentTipTempInC, const uint3 static bool haveSeenDelta = false; // Check for readings being pegged at the top of the ADC while the heater is off - if (!thisCycleIsHeating && (getTipRawTemp(0) > (0x7FFF - 16))) { + if (!thisCycleIsHeating && (getTipRawTemp(0) > (ADC_MAX_READING - 8))) { heaterThermalRunaway = true; }