diff options
author | David Crocker <dcrocker@eschertech.com> | 2019-07-21 21:52:20 +0300 |
---|---|---|
committer | David Crocker <dcrocker@eschertech.com> | 2019-07-21 21:52:20 +0300 |
commit | 62d5270b85d83836b705597690e4a110a66ba9f0 (patch) | |
tree | 36ada13d836019797742405c3bab7db040ae8a20 /src/Fans/Fan.h | |
parent | 625bdb8073f1c6a230fe1b73e896025d1191767f (diff) |
Sensors are configurted separately from heaters
Sensors are now configured separately from heaters. The M305 command is withdrawn and replaced by M308. M950 is extended to sspecify the sensor number when defining a heater.
Diffstat (limited to 'src/Fans/Fan.h')
-rw-r--r-- | src/Fans/Fan.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Fans/Fan.h b/src/Fans/Fan.h index 928dfd6d..4678418a 100644 --- a/src/Fans/Fan.h +++ b/src/Fans/Fan.h @@ -16,7 +16,8 @@ class GCodeBuffer; class Fan { public: - typedef uint32_t HeatersMonitoredBitmap; // needs to be wide enough for 8 real heaters + 10 virtual heaters + static constexpr unsigned int MaxFanSensorNumber = 31; // the highest sensor number that a fan can monitor + typedef uint32_t SensorsMonitoredBitmap; // needs to be wide enough for 0..MaxFanSensorNumber Fan(); @@ -35,8 +36,8 @@ public: bool AssignPorts(const char *pinNames, const StringRef& reply); void SetPwm(float speed); void SetPwmFrequency(PwmFrequency freq) { port.SetFrequency(freq); } - bool HasMonitoredHeaters() const { return heatersMonitored != 0; } - void SetHeatersMonitored(HeatersMonitoredBitmap h); + bool HasMonitoredSensors() const { return sensorsMonitored != 0; } + void SetSensorsMonitored(SensorsMonitoredBitmap h); const char *GetName() const { return name.c_str(); } void AppendPortDetails(const StringRef& str) { port.AppendDetails(str); } @@ -75,7 +76,7 @@ private: volatile uint32_t fanInterval; // written by ISR, read outside the ISR // More fan control variables - HeatersMonitoredBitmap heatersMonitored; + SensorsMonitoredBitmap sensorsMonitored; String<MaxFanNameLength> name; bool isConfigured; bool blipping; |