Update LED L3 after applying config #80

Closed
atse wants to merge 1 commits from atse:update-l3-led-on-config-apply into master

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.

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.
atse added 1 commit 2023-08-10 14:41:10 +08:00
146d3543e5 Update LED L3 after applying config
PID may be engaged or disengaged after loading config, so make sure LED
L3 updates to match.
esavkin reviewed 2023-08-10 14:46:18 +08:00
@ -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.

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.

Yes, repeatedly writing a gpio in the main loop shouldn't use a lot of CPU and would make the code simpler.
atse marked this conversation as resolved
atse closed this pull request 2023-08-10 16:56:04 +08:00

Pull request closed

Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/thermostat#80
There is no content yet.