Update LED L3 after applying config #80
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "atse:update-l3-led-on-config-apply"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
There's still a case where the L3 LED doesn't match the PID status, and that is when a saved config with an engaged PID is loaded.
Make sure LED L3 updates to match the config PID status after loading configs.
@ -61,1 +62,4 @@
let _ = channels.adc.set_postfilter(channel as u8, adc_postfilter);
// Update L3 if PID status changed
if channels.pid_engaged() {
I think this solution is laying on too high level, because directly depends on the call of one command.
I would either set them when pid is getting engaged from any place, or check the status in the main loop similar to automatic fan control and set leds accordingly.
Yes, repeatedly writing a gpio in the main loop shouldn't use a lot of CPU and would make the code simpler.
Pull request closed