From d9cf69ba0cb9d02814cb52306d4317dc2f706b3d Mon Sep 17 00:00:00 2001 From: elral <3263285+elral@users.noreply.github.com> Date: Thu, 21 Oct 2021 10:11:21 +0200 Subject: [PATCH] avoid compilation error for STM32 --- utility/HeaterSim.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utility/HeaterSim.cpp b/utility/HeaterSim.cpp index 8c546c4..305ba68 100644 --- a/utility/HeaterSim.cpp +++ b/utility/HeaterSim.cpp @@ -70,7 +70,7 @@ void HeaterSim::CalcTemperature() { float rate = LN2/_halfTimeCooling; unsigned long currentTime = millis(); - if (currentTime >= _lastTime) _deltams = max(currentTime - _lastTime,1); + if (currentTime >= _lastTime) _deltams = max(currentTime - _lastTime,1UL); _deltaTime = _deltams/ 1000.0f; float deltaTemp = _boilerTemp - _ambientTemp; float deltaTempAfterCooling = deltaTemp*exp(-rate*_deltaTime);