-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow target value updates to be skipped (#25860)
* Added CHIP_ERROR_IN_PROGRESS error code * If delegate->HandleStopMotion returns CHIP_ERROR_IN_PROGRESS, the target value will not be set. The attributes "TargetPositionLiftPercent100ths" and "TargetPositionTiltPercent100ths" will be updated to the attribute value of their coresponding current values. But the attribute value and the real state may be differ. It may have a delay in updating the real state to the attribute value. It results in the target value mismatched with the real value we want. emberAfWindowCoveringClusterStopMotionCallback set the target value to an out-dated value first. And then, when the hardware reports its state later, the corrected value will be updated again. The subscribers will receive two attribute "Report", the first one has an incorrect value, and the second one has the correct value. This patch fix this issue by allowing applications skip the first update on the target value. When the application code wants to update the target value by itself, it can return CHIP_ERROR_IN_PROGRESS in HandleStopMotion. Then it updates the target value later. And then the first incorrect value will no longer be reported to subscribers. Signed-off-by: Zhai Zhaoxuan <[email protected]>
- Loading branch information
Showing
5 changed files
with
35 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters