Skip to content
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

Added constructors for cluster config structures with const members (CON-389) #298

Merged
merged 2 commits into from
Apr 6, 2023

Conversation

Diegorro98
Copy link
Contributor

Solved the problem where end_product_type couldn't be customized at the start of the application (Fixes #280)

Because end_product_type now is const in order to follow Matter specification and the value can not be changed after the cluster instance has been initialized, now there are two constructors that allows to create a window covering endpoint configuration with a cluster configuration that has a custom end_product_type, so you can create it just like this:
window_covering_device::config_t config(static_cast<uint8_t>(chip::app::Clusters::WindowCovering::EndProductType::kTiltOnlyInteriorBlind));

This also has been done for pump and pump_configuration_and_control.

Also updated documentation to explain these special cases as suggested @shubhamdp.

@github-actions github-actions bot changed the title Added constructors for cluster config structures with const members Added constructors for cluster config structures with const members (CON-389) Mar 31, 2023
Copy link
Contributor

@shubhamdp shubhamdp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Diegorro98 PR looks good to me, left few minor comments.

Also, Can you please add the Fixes https://github.com/espressif/esp-matter/issues/280 to one of your commit please. This will automatically close this PR and the issue once this gets merged internally.

components/esp_matter/esp_matter_cluster.h Outdated Show resolved Hide resolved
components/esp_matter/esp_matter_cluster.h Outdated Show resolved Hide resolved
components/esp_matter/esp_matter_endpoint.h Outdated Show resolved Hide resolved
@Diegorro98
Copy link
Contributor Author

@shubhamdp Thank you for your answer 😊. Requested changes done!

@shubhamdp
Copy link
Contributor

@Diegorro98 Thanks a lot for the PR. I have trigged the build pipeline on this PR, once that is green, this will be merged.

@espressif-bot espressif-bot merged commit 3d643be into espressif:main Apr 6, 2023
@dhrishi
Copy link
Collaborator

dhrishi commented Apr 6, 2023

@Diegorro98 Thanks for your contribution. The PR has now been merged to Github

@Diegorro98 Diegorro98 deleted the bugfix/const_constructors branch April 6, 2023 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

I can't create a Window Covering device with a custom end_product_type (CON-363)
4 participants