Conversation
👋 Hello SuGlider, we appreciate your contribution to this project! 📘 Please review the project's Contributions Guide for key guidelines on code, documentation, testing, and more. 🖊️ Please also make sure you have read and signed the Contributor License Agreement for this project. Click to see more instructions ...
Review and merge process you can expect ...
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Test Results 76 files 76 suites 12m 49s ⏱️ Results for commit ea67066. ♻️ This comment has been updated with latest results. |
Memory usage test (comparing PR against master branch)The table below shows the summary of memory usage change (decrease - increase) in bytes and percentage for each target.
Click to expand the detailed deltas report [usage change in BYTES]
|
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.
LGTM
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This comment was marked as outdated.
This comment was marked as outdated.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
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.
Pull Request Overview
Adds a Matter event callback API and example to the ESP32 Arduino Matter library, enabling users to register for and handle all supported Matter device events.
- Introduce
matterEvent_t
enum andmatterEventCB
type, withonEvent()
registration API. - Wire up event dis in
app_event_cb()
and initialize the static callback variable. - Provide a complete example sketch and update
keywords.txt
for editor highlighting.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
libraries/Matter/src/MatterEndPoint.h | Modernized NULL returns to nullptr . |
libraries/Matter/src/Matter.h | Added matterEvent_t enum, matterEventCB alias and onEvent() API. |
libraries/Matter/src/Matter.cpp | Initialized _matterEventCB , dis user callback in event handler. |
libraries/Matter/keywords.txt | Registered new keywords for event types and API symbols. |
libraries/Matter/examples/MatterEvents/ci.json | Added CI config for the new example. |
libraries/Matter/examples/MatterEvents/MatterEvents.ino | New example sketch demonstrating the event callback. |
Comments suppressed due to low confidence (2)
libraries/Matter/src/Matter.h:159
- [nitpick] Add a brief Doxygen-style comment explaining the purpose and usage of
matterEventCB
and theonEvent
registration method to improve API discoverability.
using matterEventCB = std::function<void(matterEvent_t, const chip::DeviceLayer::ChipDeviceEvent*)>;
libraries/Matter/src/Matter.cpp:127
- [nitpick] Consider adding unit or integration tests for the Matter event callback mechanism to ensure that
_matterEventCB
is invoked correctly for all supportedmatterEvent_t
values.
if (ArduinoMatter::_matterEventCB != nullptr) {
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Copilot <[email protected]>
ccda9c5
into espressif:master Uh oh!
There was an error while loading. Please reload this page.
Description of Change
Adds a new feature to ESP32 Arduino Matter Library that allows users to add a Matter Event Callback function.
All possible ESP32 Matter Events are covered in this implementation.
An example sketch is provided.
Tests scenarios
Using the provided example sketch.
Related links
None