-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Level cluster Step/Move commands reverted to random value after transition #7879
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
bzbarsky-apple
merged 2 commits into
project-chip:master
from
tima-q:level_control_step_move_fix
Jun 25, 2021
Merged
Level cluster Step/Move commands reverted to random value after transition #7879
bzbarsky-apple
merged 2 commits into
project-chip:master
from
tima-q:level_control_step_move_fix
Jun 25, 2021
Conversation
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
…hing transition. Fixed by adding fill-in of unused 'storedLevel' for these commands.
Size increase report for "gn_qpg6100-example-build" from ed677f0
Full report output
|
woody-apple
approved these changes
Jun 24, 2021
mspang
approved these changes
Jun 24, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@selissia could you take a look at this, please?
typo fix Co-authored-by: Boris Zbarsky <[email protected]>
jmartinez-silabs
approved these changes
Jun 25, 2021
saurabhst
approved these changes
Jun 25, 2021
selissia
approved these changes
Jun 25, 2021
Done, approved. |
bzbarsky-apple
approved these changes
Jun 25, 2021
nikita-s-wrk
pushed a commit
to nikita-s-wrk/connectedhomeip
that referenced
this pull request
Sep 23, 2021
…ition (project-chip#7879) * Level cluster Step/Move commands reverted to random value after finishing transition. Fixed by adding fill-in of unused 'storedLevel' for these commands. * Update src/app/clusters/level-control/level-control.cpp typo fix Co-authored-by: Boris Zbarsky <[email protected]> Co-authored-by: Boris Zbarsky <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
A
Step
command did not execute as expected.The transition happens, but when reaching the desired value it fell back to the original one.
After examination of the level-control-server.cpp code it seems a variable
storedLevel
is the source.This variable is part of the state for the LevelControl cluster in case an Effect is requested (07-5123-04 (ZigBee Cluster Library doc), section 3.10.2.1.1.). The currentLevel is backed up there to restore after the effect has finished.
Backup point:
connectedhomeip/src/app/clusters/level-control/level-control.cpp
Line 938 in ed677f0
Restore point after transition:
connectedhomeip/src/app/clusters/level-control/level-control.cpp
Line 260 in ed677f0
An
INVALID_STORED_LEVEL
is set in other commands (MoveToLevel
/...) to skip the revert step.For example:
connectedhomeip/src/app/clusters/level-control/level-control.cpp
Line 414 in ed677f0
However, in case of
Step
/Move
command this variable was not initialized to prevent this reverting/setting.Change overview
Assigning INVALID_STORED_LEVEL to the
storedLevel
variable where missing.Testing
Setup:
Scenario:
zclread LevelControl CurrentLevel 101 1 0