From e872a0a257405c1bb916b06f64dcb9db950d720a Mon Sep 17 00:00:00 2001 From: David Crocker Date: Wed, 11 Nov 2020 09:40:01 +0000 Subject: Improvements to heater tuning Changed heater model parameters to have both fan on and fan off cooling rates --- src/Heating/LocalHeater.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/Heating/LocalHeater.h') diff --git a/src/Heating/LocalHeater.h b/src/Heating/LocalHeater.h index 07e0abfe..8c32dc39 100644 --- a/src/Heating/LocalHeater.h +++ b/src/Heating/LocalHeater.h @@ -15,8 +15,8 @@ #include "Heater.h" #include "FOPDT.h" #include "TemperatureError.h" -#include "Hardware/IoPorts.h" -#include "GCodes/GCodeResult.h" +#include +#include #include class HeaterMonitor; @@ -29,9 +29,9 @@ public: struct HeaterParameters { float heatingRate; - float coolingTimeConstant; + float coolingRate; float deadTime; - float gain; + unsigned int numCycles; }; LocalHeater(unsigned int heaterNum) noexcept; @@ -68,7 +68,7 @@ private: TemperatureError ReadTemperature() noexcept; // Read and store the temperature of this heater void DoTuningStep() noexcept; // Called on each temperature sample when auto tuning void CalculateModel(HeaterParameters& params) noexcept; // Calculate G, td and tc from the accumulated readings - void ReportModel() noexcept; + void SetAndReportModel(bool usingFans) noexcept; float GetExpectedHeatingRate() const noexcept; // Get the minimum heating rate we expect void RaiseHeaterFault(const char *format, ...) noexcept; -- cgit v1.2.3