Turn off LED L3 only when all channels have no PID #78
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "atse/thermostat:l3-led-fix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Change the behaviour of LED L3 to turn off only when all channels have PID disengaged, as opposed to when any channel disengages PID.
Otherwise, when disengaging PID on a Thermostat that has had both channels engaged in PID, the LED would turn off, even when PID is still engaged on the other channel.
This lets the LED better reflect the status of the Thermostat as a whole, as it would stay on as long as PID is engaged on at least one channel.
@ -189,2 +189,3 @@
channels.channel_state(channel).pid_engaged = false;
leds.g3.off();
// Only turn off LED when PID is disengaged on all channels
if !channels.channel_state(channel ^ 1).pid_engaged {
channel ^ 1
while quick, would cause weird behavior if e.g. we create a new version of the thermostat with more than two channels and re-used the code.My suggestion would be make a function in
Channels
for checking the PID state of all channels.Thanks for the suggestion, the latest force push loops through all channels to check their PID state.
Yes, we'll probably want to port this to the 4-channel EEM version. I'm not totally convinced with MQTT.
add5120f8c
tob04a61c414