diff options
author | David Crocker <dcrocker@eschertech.com> | 2021-11-22 11:30:50 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2021-11-22 11:30:50 +0300 |
commit | 8e6a3d0074e931c0c570de4175aa5eff41857d97 (patch) | |
tree | 5354068d2748f07b37fa5686c2eb965ac88ea5b5 | |
parent | 37b4e02726993763b477181b6aa918089e2210b4 (diff) |
Fix to new heater model code
-rw-r--r-- | src/Heating/FOPDT.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Heating/FOPDT.cpp b/src/Heating/FOPDT.cpp index d78212ed..b64c0f7b 100644 --- a/src/Heating/FOPDT.cpp +++ b/src/Heating/FOPDT.cpp @@ -317,7 +317,7 @@ float FopDt::CorrectPwmForVoltage(float requiredPwm, float actualVoltage) const { requiredPwm *= fsquare(standardVoltage/actualVoltage); } - return max<float>(requiredPwm, maxPwm); + return min<float>(requiredPwm, maxPwm); } float FopDt::GetPwmCorrectionForFan(float temperatureRise, float fanPwmChange) const noexcept |