diff options
author | David Crocker <dcrocker@eschertech.com> | 2021-03-23 13:47:22 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2021-03-23 13:47:22 +0300 |
commit | c565f35304b0d872d8671584dd6341ce13a82bbf (patch) | |
tree | d9d17a0179b474dd18447fa981c86faa46b2866f /src/Heating/Heater.h | |
parent | b51ef940738b4311d8b20700e0953140fc4f46e3 (diff) |
Added M303 Y and F parameters
Diffstat (limited to 'src/Heating/Heater.h')
-rw-r--r-- | src/Heating/Heater.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Heating/Heater.h b/src/Heating/Heater.h index 7a08444c..c5b088b7 100644 --- a/src/Heating/Heater.h +++ b/src/Heating/Heater.h @@ -62,7 +62,8 @@ public: float GetStandbyTemperature() const noexcept { return standbyTemperature; } GCodeResult Activate(const StringRef& reply) noexcept; // Switch from idle to active void Standby() noexcept; // Switch from active to idle - GCodeResult StartAutoTune(GCodeBuffer& gb, const StringRef& reply, FansBitmap fans) THROWS(GCodeException); // Start an auto tune cycle for this heater + GCodeResult StartAutoTune(GCodeBuffer& gb, const StringRef& reply, FansBitmap fans) THROWS(GCodeException); + // Start an auto tune cycle for this heater void GetAutoTuneStatus(const StringRef& reply) const noexcept; // Get the auto tune status or last result void GetFaultDetectionParameters(float& pMaxTempExcursion, float& pMaxFaultTime) const noexcept @@ -124,7 +125,7 @@ protected: virtual GCodeResult UpdateModel(const StringRef& reply) noexcept = 0; virtual GCodeResult UpdateFaultDetectionParameters(const StringRef& reply) noexcept = 0; virtual GCodeResult UpdateHeaterMonitors(const StringRef& reply) noexcept = 0; - virtual GCodeResult StartAutoTune(const StringRef& reply, FansBitmap fans, float targetTemp, float pwm, bool seenA, float ambientTemp) noexcept = 0; + virtual GCodeResult StartAutoTune(const StringRef& reply, bool seenA, float ambientTemp) noexcept = 0; int GetSensorNumber() const noexcept { return sensorNumber; } void SetSensorNumber(int sn) noexcept; @@ -146,7 +147,7 @@ protected: static constexpr unsigned int TuningHeaterMaxIdleCycles = 10; static constexpr unsigned int MinTuningHeaterCycles = 5; static constexpr unsigned int MaxTuningHeaterCycles = 25; - static constexpr float TuningHysteresis = 5.0; + static constexpr float DefaultTuningHysteresis = 5.0; static constexpr float TuningPeakTempDrop = 2.0; // must be well below TuningHysteresis static constexpr float FeedForwardMultiplier = 1.3; // how much we over-compensate feedforward to allow for heat reservoirs during tuning static constexpr float HeaterSettledCoolingTimeRatio = 0.93; @@ -154,6 +155,9 @@ protected: // Variables used during heater tuning static float tuningPwm; // the PWM to use, 0..1 static float tuningTargetTemp; // the target temperature + static float tuningHysteresis; + static float tuningFanPwm; + static DeviationAccumulator tuningStartTemp; // the temperature when we turned on the heater static uint32_t tuningBeginTime; // when we started the tuning process static DeviationAccumulator dHigh; |