From 77d8cf2f9c02b91a0518f3a469f932d2c0be6874 Mon Sep 17 00:00:00 2001 From: David Crocker Date: Tue, 10 Nov 2020 13:54:38 +0000 Subject: More work on heater tuning --- src/Heating/LocalHeater.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/Heating/LocalHeater.h') 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_ */ -- cgit v1.2.3