You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Backport the fan-control circular callback changes to v1.4-branch (project-chip#40351)
* fan_control_server: Fix circular callback issue (project-chip#36489)
* fan_control_server: Fix circular callback issue
This PR fixes a circular callback bug in fan control server using flags
when updating SpeedSetting and PercentSetting.
Before this change, a PercentSetting write to 25% would end up circling
back to 30% as shown:
```
[MatterTest] 11-12 19:16:40.792 INFO @@@ WRITE PercentSetting to 25
[MatterTest] 11-12 19:16:40.801 INFO @@@ ATTRIB: EP1/FanControl/SpeedSetting: 3
[MatterTest] 11-12 19:16:40.802 INFO @@@ ATTRIB: EP1/FanControl/SpeedCurrent: 3
[MatterTest] 11-12 19:16:40.802 INFO @@@ ATTRIB: EP1/FanControl/PercentSetting: 30
[MatterTest] 11-12 19:16:40.802 INFO @@@ ATTRIB: EP1/FanControl/PercentCurrent: 30
```
Now it behaves as expected:
```
[MatterTest] 11-13 18:54:27.961 INFO @@@ WRITE PercentSetting to 25
[MatterTest] 11-13 18:54:27.970 INFO @@@ ATTRIB: EP1/FanControl/SpeedSetting: 3
[MatterTest] 11-13 18:54:27.970 INFO @@@ ATTRIB: EP1/FanControl/SpeedCurrent: 3
[MatterTest] 11-13 18:54:27.970 INFO @@@ ATTRIB: EP1/FanControl/PercentSetting: 25
[MatterTest] 11-13 18:54:27.971 INFO @@@ ATTRIB: EP1/FanControl/PercentCurrent: 25
```
Co-authored-by: lpbeliveau-silabs <[email protected]>
* Addressed review suggestions
---------
Co-authored-by: lpbeliveau-silabs <[email protected]>
* fan-control-server: Fix FanMode circular callback issue (project-chip#36515)
Similar to what was done for Speed and Percent, this PR fixes a bug where
a FanMode could result in a circular callback.
For example, setting the FanMode to kAuto, could trigger this issue.
---------
Co-authored-by: Sergio Soares <[email protected]>
Co-authored-by: lpbeliveau-silabs <[email protected]>
0 commit comments