-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[Closure] Closure Dimension command implementations for Closure Linux app #39785
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
[Closure] Closure Dimension command implementations for Closure Linux app #39785
Conversation
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.
Code Review
This pull request implements the set-target
and step
commands for the closure dimension cluster. The changes look promising, but I've found several critical issues related to potential crashes from unsafe memory access and incorrect asynchronous logic. I've also noted some areas for improvement regarding code duplication and maintainability.
PR #39785: Size comparison from 9100f28 to bd76b64 Full report (71 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
PR #39785: Size comparison from 9100f28 to 8be3489 Full report (71 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
PR #39785: Size comparison from 9151e79 to ace005a Full report (71 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
PR #39785: Size comparison from 860799f to 2d36470 Full report (71 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
PR #39785: Size comparison from 4944739 to d189f95 Full report (71 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
… app (project-chip#39785) * Restyled by whitespace * Addressign PR comments * Addressing PR comments * Addressing PR comments * set-target initial implementation for linux app * Set-target and step command code as per latest spec changes * Revert common changes * Restyled by whitespace * Restyled by clang-format * Code cleanup * Restyled by clang-format * Separate timers for all the endpoints * Restyled by clang-format * Fix issues after rebase * Restyled by whitespace * Restyled by clang-format --------- Co-authored-by: Restyled.io <commits@restyled.io> Co-authored-by: Satya Naag Bollimpalli <sabollim@silabs.com> Co-authored-by: sabollim-silabs <158290810+sabollim-silabs@users.noreply.github.com>
Summary
This PR contains the closure dimension cluster commands (set-target and step) implementation for closure linux app.
Set-target command is an asynchronous command which moves the position of the panel to the target position at a rate of 1000 units per second.
Step command is an asynchronous command which increases or decreases the position of the panel by the given number of steps. In each step, the position of panel is changed at the rate of 'stepValue', which is configured in the cluster.
Dependencies :
The GetPanelNextPosition() API is being added in this PR : #39728
The OnActionComplete APIs in Closure dimension and Closure Control are being added in this PRs : #39726 , #39718
Related issues
N/A
Testing
Build clousre sample app, commsission using chip tool and
./chip-tool closuredimension step 1 10 1 2 --Speed 2 -> SUCCESS (increases the position by 10 steps for panel2)
./chiptool closuredimention set-target 1 --Position 5000 --Latch false --Speed 2 -> SUCCESS (moves position to 5000 for panel2)
Readability checklist
The checklist below will help the reviewer finish PR review in time and keep the
code readable:
descriptive
“When in Rome…”
rule (coding style)
See: Pull Request Guidelines