diff options
author | David Crocker <dcrocker@eschertech.com> | 2020-11-10 16:54:38 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2020-11-10 16:54:38 +0300 |
commit | 77d8cf2f9c02b91a0518f3a469f932d2c0be6874 (patch) | |
tree | d20be083f6baf87fce62ef381fdb4533b590bcf5 /src/Heating/LocalHeater.h | |
parent | 74588201ba5dd8c7df5eb7e65343cc9d9d07033c (diff) |
More work on heater tuning
Diffstat (limited to 'src/Heating/LocalHeater.h')
-rw-r--r-- | src/Heating/LocalHeater.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Heating/LocalHeater.h b/src/Heating/LocalHeater.h index 1bcef486..07e0abfe 100644 --- a/src/Heating/LocalHeater.h +++ b/src/Heating/LocalHeater.h @@ -31,8 +31,7 @@ public: float heatingRate; float coolingTimeConstant; float deadTime; - - float GetGain() const noexcept { return heatingRate * coolingTimeConstant; } + float gain; }; LocalHeater(unsigned int heaterNum) noexcept; @@ -92,9 +91,11 @@ private: static_assert(sizeof(previousTemperaturesGood) * 8 >= NumPreviousTemperatures, "too few bits in previousTemperaturesGood"); + static constexpr unsigned int TuningHeaterSettleCycles = 2; static constexpr unsigned int MinTuningHeaterCycles = 5; - static constexpr unsigned int MaxTuningHeaterCycles = 20; + static constexpr unsigned int MaxTuningHeaterCycles = 30; static constexpr float TuningHysteresis = 3.0; + static constexpr float TuningPeakTempDrop = 0.5; // must be well below TuningHysteresis }; #endif /* SRC_LOCALHEATER_H_ */ |