-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Thermostat ScheduleTypes Attribute: Add supporting delegate method #41160
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
base: master
Are you sure you want to change the base?
Thermostat ScheduleTypes Attribute: Add supporting delegate method #41160
Conversation
PR #41160: Size comparison from d1d4399 to 4aa48f8 Full report (6 builds for cc32xx, nrfconnect, realtek, stm32)
|
PR #41160: Size comparison from d1d4399 to 524aa54 Full report (37 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #41160 +/- ##
==========================================
- Coverage 50.94% 50.94% -0.01%
==========================================
Files 1378 1378
Lines 100698 100751 +53
Branches 13058 13070 +12
==========================================
+ Hits 51302 51326 +24
- Misses 49396 49425 +29 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
PR #41160: Size comparison from d1d4399 to a34bf33 Full report (37 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
|
PR #41160: Size comparison from d1d4399 to 303f504 Full report (37 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
|
PR #41160: Size comparison from d1d4399 to 265e1b5 Full report (37 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
|
callback attribute acceptedCommandList; | ||
callback attribute attributeList; | ||
ram attribute featureMap default = 0x123; | ||
ram attribute featureMap default = 419; |
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.
maybe make this hex ... decimal for a bit set is even harder to figure out
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.
This file was generated by the zap scripts. Do I need to do anything special when using the zap tool?
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.
If I compare it with another example (air-purifier), FanControl
featureMap
is also written in decimal rather than hexadecimal.
connectedhomeip/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter
Lines 3103 to 3124 in d1d4399
server cluster FanControl { | |
ram attribute fanMode default = 0; | |
ram attribute fanModeSequence default = 2; | |
ram attribute percentSetting default = 0; | |
ram attribute percentCurrent default = 0; | |
ram attribute speedMax default = 10; | |
ram attribute speedSetting default = 0; | |
ram attribute speedCurrent default = 0; | |
ram attribute rockSupport default = 0x01; | |
ram attribute rockSetting default = 0x00; | |
ram attribute windSupport default = 0x03; | |
ram attribute windSetting default = 0x00; | |
ram attribute airflowDirection default = 0; | |
callback attribute generatedCommandList; | |
callback attribute acceptedCommandList; | |
callback attribute attributeList; | |
ram attribute featureMap default = 63; | |
ram attribute clusterRevision default = 4; | |
handle command Step; | |
} | |
} |
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.
In the end, should we use hexadecimal or decimal notation?
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.
This should be autogenerated by the zap_regen_all script and not hand edited (so whatever the tool does should be allowed).
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.
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.
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.
I think you can edit the 'Default' value and @andy31415's comment was make this hex rather than decimal. Since Features are a bitmap in the spec it's easier to work out which features we're supporting.
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.
Using the ZAP tool, I set the Default value to 0x1A3
ram attribute featureMap default = 0x1A3;
I will have a look at updating the ZAP tool to put a hex value into this field for anyone else that runs into this problem.
PR #41160: Size comparison from d1d4399 to a444c47 Full report (37 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
|
PR #41160: Size comparison from d1d4399 to e8fede9 Full report (37 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
|
PR #41160: Size comparison from 1ceedce to c244b71 Full report (36 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nxp, psoc6, qpg, realtek, stm32, telink)
|
examples/thermostat/thermostat-common/src/thermostat-delegate-impl.cpp
Outdated
Show resolved
Hide resolved
PR #41160: Size comparison from 16876bc to 0df7671 Full report (37 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
|
PR #41160: Size comparison from 1b2d06a to af7588f Full report (37 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
|
PR #41160: Size comparison from 7b16617 to 7a9c3a5 Full report (37 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
|
Is there anything else I need to do in order to move this PR along? |
In order for it to merge it needs 2 'approvers' (who are in a list of pull approvers) - and the CI needs to build cleanly, and all comments need to be resolved. It's best if the person who raised the comment clicks "Resolve comment" but sometimes they forget to come back and re-review. I've asked @andy31415 and @ReneJosefsen to take another look (click the circular arrows icon next to their name if you have that option). |
PR #41160: Size comparison from 5a37876 to c229301 Full report (37 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
|
callback attribute acceptedCommandList; | ||
callback attribute attributeList; | ||
ram attribute featureMap default = 0x123; | ||
ram attribute featureMap default = 419; |
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.
make this hex rather than decimal:
ram attribute featureMap default = 419; | |
ram attribute featureMap default = 0x1a3; |
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.
This is done.
"singleton": 0, | ||
"bounded": 0, | ||
"defaultValue": "0x123", | ||
"defaultValue": "419", |
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.
make this hex rather than decimal:
"defaultValue": "419", | |
"defaultValue": "0x1a3", |
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.
This is done.
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.
Thanks. Now we are ready.
PR #41160: Size comparison from 5a37876 to 1934547 Full report (37 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
|
Summary
In this PR, I have added a new
GetScheduleTypeAtIndex
function to theThermostatDelegate
.I updated the Read function to invoke this callback for the ScheduleTypes attribute, replaced the default empty list.
This is my first PR to connectedhomeip, so all feedback is welcome! My goal is to implement the full Matter Schedule in a series of PRs.
Related issues
N/A
Testing
Added Python test: TC_TSTAT_4_4.py yamlNote
I'm would like to add python TC_TSTAT tests for this feature, but I think that's outside the scope of a non-CSA member.
Manual Testing
I used
matter-repl
to test the new attribute against the thermostat Linux exampleThis returned the new ScheduleTypes attribute, populated with the two values set in the example's delegate
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