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);