-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[ESP32]Add ColorControl for ESP32C3-DevKitM #8201
[ESP32]Add ColorControl for ESP32C3-DevKitM #8201
Conversation
9c7156e
to
75cf216
Compare
@wqx6 Can you please add a few actual commands for reference |
emberAfReadServerAttribute(endpointId, ZCL_COLOR_CONTROL_CLUSTER_ID, ZCL_COLOR_CONTROL_CURRENT_SATURATION_ATTRIBUTE_ID, | ||
reinterpret_cast<uint8_t *>(&saturation), sizeof(uint8_t)); |
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.
Include app/common/gen/attributes/Accessors.h
and use:
app::Clusters::ColorControl::Attributes::GetCurrentSaturation(endpointId, &saturation);
(or using namespace chip::app::Clusters::ColorControl::Attributes
and then skip the prefix, of course).
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 are two issues after including the app/common/gen/attributes/Accessors.h
- The
app/common/gen/attributes/Accessors.h
(orapp/common/gen/attributes/Accessors.cpp
) doesn't include filesapp/util/af.h
andapp/common/gen/attribute-type.h
. - The Attribute
LastConfiguredBy
of the clusterScenes
has an undefined typeZCL_EUI64_ATTRIBUTE_TYPE
.
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.
@vivien-apple See above.
@wqx6 alright, let's not worry about that for now. But in that case, can we at least remove the unnecessary reinterpret_cast
bits?
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.
Removed
emberAfReadServerAttribute(endpointId, ZCL_COLOR_CONTROL_CLUSTER_ID, ZCL_COLOR_CONTROL_CURRENT_HUE_ATTRIBUTE_ID, | ||
reinterpret_cast<uint8_t *>(&hue), sizeof(uint8_t)); |
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.
app::Clusters::ColorControl::Attributes::GetCurrentHue(endpointId, &hue);
Done |
7752526
to
b7ee706
Compare
b7ee706
to
9e474ff
Compare
use onboard RGB-LED(WS2812) for status-LED in all-clusters-app add colorcontrol cluster for ESP32C3_DevkitM
9e474ff
to
731c790
Compare
Size increase report for "esp32-example-build" from b9620ec
Full report output
|
use onboard RGB-LED(WS2812) for status-LED in all-clusters-app add colorcontrol cluster for ESP32C3_DevkitM
Problem
We should use the on-board RGB-LED instead of an external LED for ESP32C3-DevKitM.
Change overview
Testing
Tested the On/Off/Toggle, MoveToLevel, MoveToHue/MoveToSaturation commands manually.
Used the following commands to change the hue and saturation.