-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[Scenes]Added the level-control cluster handler for scenes EFS #28836
[Scenes]Added the level-control cluster handler for scenes EFS #28836
Conversation
PR #28836: Size comparison from bd8c01f to fcc8ea7 Increases above 0.2%:
Increases (26 builds for bl702, bl702l, cyw30739, efr32, esp32, linux, nrfconnect, psoc6, telink)
Decreases (12 builds for bl602, bl702, bl702l, cc32xx, psoc6, telink)
Full report (62 builds for bl602, bl702, bl702l, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
PR #28836: Size comparison from bd8c01f to 4b87d42 Increases above 0.2%:
Increases (15 builds for cyw30739, efr32, esp32, linux, nrfconnect, psoc6)
Decreases (13 builds for bl702, bl702l, cc32xx, esp32, linux, psoc6)
Full report (44 builds for bl602, bl702, bl702l, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg)
|
PR #28836: Size comparison from bd8c01f to 74ca620 Increases above 0.2%:
Increases (21 builds for cyw30739, efr32, esp32, linux, nrfconnect, psoc6, telink)
Decreases (13 builds for bl702, bl702l, cc32xx, esp32, linux, psoc6)
Full report (62 builds for bl602, bl702, bl702l, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
PR #28836: Size comparison from bd8c01f to 0c19af7 Increases above 0.2%:
Increases (24 builds for cyw30739, efr32, esp32, linux, nrfconnect, psoc6, telink)
Decreases (25 builds for bl702, bl702l, cc32xx, efr32, esp32, linux, psoc6, qpg, telink)
Full report (62 builds for bl602, bl702, bl702l, cc32xx, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
…ct-chip#28836) * Added the level-control cluster handler for scenes EFS * Updated the Null value handling and handling of absence of frequency feature * optimsed ifdef in on-on handler * Applied change to allow attribute count increase in the futur
VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == Attributes::MaxLevel::Get(endpoint, &maxLevel), CHIP_ERROR_READ_FAILED); | ||
|
||
pairs[0].attributeID = Attributes::CurrentLevel::Id; | ||
pairs[0].attributeValue = (!level.IsNull()) ? level.Value() : maxLevel + 1; |
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 will be broken if the scene is then recalled with a different maxlevel for some reason.
Is there a reason this is not using the existing attribute-storage-null-handling.h facilities which would let us encode null in an integer?
: Commands::MoveToLevel::Id; | ||
|
||
status = moveToLevelHandler( | ||
endpoint, command, level, app::DataModel::MakeNullable<uint16_t>(static_cast<uint16_t>(timeMs / 100)), |
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.
Why do you need both the cast and the explicit template argument? You shouldn't need both...
: Commands::MoveToLevel::Id; | ||
|
||
status = moveToLevelHandler( | ||
endpoint, command, level, app::DataModel::MakeNullable<uint16_t>(static_cast<uint16_t>(timeMs / 100)), |
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.
But if the level was null when we stored the scene... won't this just ignore the moveToLevelHandler call, at least when MaxLevel is 254? This looks broken.
@@ -289,7 +289,13 @@ class DefaultOnOffSceneHandler : public scenes::DefaultSceneHandlerImpl | |||
return err; | |||
} | |||
|
|||
OnOffServer::Instance().scheduleTimerCallbackMs(sceneEventControl(endpoint), timeMs); | |||
#ifdef EMBER_AF_PLUGIN_LEVEL_CONTROL | |||
if (!(LevelControlWithOnOffFeaturePresent(endpoint) && |
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 needs some documentation explaining why this logic is here.
…ct-chip#28836) * Added the level-control cluster handler for scenes EFS * Updated the Null value handling and handling of absence of frequency feature * optimsed ifdef in on-on handler * Applied change to allow attribute count increase in the futur
Now scenes will be able to take action on level control clusters.