diff options
author | David Crocker <dcrocker@eschertech.com> | 2021-11-20 22:55:00 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2021-11-20 22:55:00 +0300 |
commit | 87efb232ad022318edfa2b9e2d1fde096e8b1323 (patch) | |
tree | 20fad91cf8ac0b852dea06ff45fa3195bc217f66 /src/Heating/LocalHeater.h | |
parent | 8c307452cfdc46f5f63a3f84ef10f5325ef72a75 (diff) |
Changed heater model to support non-Newtonian cooling
Diffstat (limited to 'src/Heating/LocalHeater.h')
-rw-r--r-- | src/Heating/LocalHeater.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Heating/LocalHeater.h b/src/Heating/LocalHeater.h index 5dc2c6bd..fd31dde9 100644 --- a/src/Heating/LocalHeater.h +++ b/src/Heating/LocalHeater.h @@ -21,7 +21,7 @@ class HeaterMonitor; class LocalHeater : public Heater { - static const size_t NumPreviousTemperatures = 8; // How many samples we average the temperature derivative over + static const size_t NumPreviousTemperatures = 4; // How many samples we average the temperature derivative over public: LocalHeater(unsigned int heaterNum) noexcept; @@ -76,6 +76,8 @@ private: float lastPwm; // The last PWM value set for this heater float averagePWM; // The running average of the PWM, after scaling. volatile float extrusionBoost; // The amount of extrusion feedforward to apply + float lastTemperatureValue; // the last temperature we recorded while heating up + uint32_t lastTemperatureMillis; // when we recorded the last temperature uint32_t timeSetHeating; // When we turned on the heater uint32_t lastSampleTime; // Time when the temperature was last sampled by Spin() |