From b75f3b14644b1dcc5aeb8170d1e1b6d4a9f8e52e Mon Sep 17 00:00:00 2001 From: David Crocker Date: Sun, 24 Jan 2021 15:10:05 +0000 Subject: More work on remote heater tuning --- src/Heating/LocalHeater.h | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) (limited to 'src/Heating/LocalHeater.h') diff --git a/src/Heating/LocalHeater.h b/src/Heating/LocalHeater.h index 80afa0ad..02fde4f9 100644 --- a/src/Heating/LocalHeater.h +++ b/src/Heating/LocalHeater.h @@ -25,14 +25,6 @@ class LocalHeater : public Heater static const size_t NumPreviousTemperatures = 4; // How many samples we average the temperature derivative over public: - struct HeaterParameters - { - float heatingRate; - float coolingRate; - float deadTime; - unsigned int numCycles; - }; - LocalHeater(unsigned int heaterNum) noexcept; ~LocalHeater() noexcept; @@ -46,12 +38,12 @@ public: float GetTemperature() const noexcept override; // Get the latest temperature float GetAveragePWM() const noexcept override; // Return the running average PWM to the heater. Answer is a fraction in [0, 1]. float GetAccumulator() const noexcept override; // Return the integral accumulator - void GetAutoTuneStatus(const StringRef& reply) const noexcept override; // Get the auto tune status or last result void Suspend(bool sus) noexcept override; // Suspend the heater to conserve power or while doing Z probing - void PrintCoolingFanPwmChanged(float pwmChange) noexcept override; + void FeedForwardAdjustment(float fanPwmChange, float extrusionChange) noexcept override; #if SUPPORT_CAN_EXPANSION void UpdateRemoteStatus(CanAddress src, const CanHeaterReport& report) noexcept override { } + void UpdateHeaterTuning(CanAddress src, const CanMessageHeaterTuningReport& msg) noexcept override { } #endif protected: @@ -67,8 +59,6 @@ private: void SetHeater(float power) const noexcept; // Power is a fraction in [0,1] 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 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