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

feat(matter): adds esp_matter:: namespace to attribute_t #10807

Merged
merged 6 commits into from
Jan 7, 2025

Conversation

SuGlider
Copy link
Collaborator

@SuGlider SuGlider commented Jan 5, 2025

Description of Change

When compiling an Arduino project that uses the Matter library (v3.1.0) together with M5Unified (v0.2.2) on M5Stack Atom, I encounter a compilation error caused by an ambiguous reference to attribute_t. It appears that the Matter library defines attribute_t in esp_matter_core.h, and M5Unified (via M5GFX) also declares attribute_t as an enum in enum.hpp.

This PR fixes this issue by forcing the namespace esp_matter:: into attribute_t matter type name.

Tests scenarios

Using M5Stack Libraries:

#include <M5Unified.h>
#include <Matter.h>

void setup() {
  M5.begin();
  Matter.begin();

  // ...
}

void loop() {
  M5.update();
  // ...
}

Related links

Fixes #10804

Copy link
Contributor

github-actions bot commented Jan 5, 2025

Warnings
⚠️ Please consider squashing your 6 commits (simplifying branch history).

👋 Hello SuGlider, we appreciate your contribution to this project!


Click to see more instructions ...


This automated output is generated by the PR linter DangerJS, which checks if your Pull Request meets the project's requirements and helps you fix potential issues.

DangerJS is triggered with each push event to a Pull Request and modify the contents of this comment.

Please consider the following:
- Danger mainly focuses on the PR structure and formatting and can't understand the meaning behind your code or changes.
- Danger is not a substitute for human code reviews; it's still important to request a code review from your colleagues.
- Resolve all warnings (⚠️ ) before requesting a review from human reviewers - they will appreciate it.
- To manually retry these Danger checks, please navigate to the Actions tab and re-run last Danger workflow.

Review and merge process you can expect ...


We do welcome contributions in the form of bug reports, feature requests and pull requests.

1. An internal issue has been created for the PR, we assign it to the relevant engineer.
2. They review the PR and either approve it or ask you for changes or clarifications.
3. Once the GitHub PR is approved we do the final review, collect approvals from core owners and make sure all the automated tests are passing.
- At this point we may do some adjustments to the proposed change, or extend it by adding tests or documentation.
4. If the change is approved and passes the tests it is merged into the default branch.

Generated by 🚫 dangerJS against 0ab998e

Copy link
Contributor

github-actions bot commented Jan 5, 2025

Test Results

 62 files   62 suites   5m 40s ⏱️
 21 tests  21 ✅ 0 💤 0 ❌
154 runs  154 ✅ 0 💤 0 ❌

Results for commit 0ab998e.

♻️ This comment has been updated with latest results.

Copy link
Contributor

github-actions bot commented Jan 5, 2025

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.

MemoryFLASH [bytes]FLASH [%]RAM [bytes]RAM [%]
TargetDECINCDECINCDECINCDECINC
ESP32S3000.000.00000.000.00
ESP32S2000.000.00000.000.00
ESP32C3000.000.00000.000.00
ESP32C6000.000.00000.000.00
ESP320⚠️ +160.000.00000.000.00
Click to expand the detailed deltas report [usage change in BYTES]
TargetESP32S3ESP32S2ESP32C3ESP32C6ESP32
ExampleFLASHRAMFLASHRAMFLASHRAMFLASHRAMFLASHRAM
Matter/examples/MatterColorLight0000000000
Matter/examples/MatterCommissionTest0000000000
Matter/examples/MatterComposedLights0000000000
Matter/examples/MatterContactSensor0000000000
Matter/examples/MatterDimmableLight0000000000
Matter/examples/MatterEnhancedColorLight0000000000
Matter/examples/MatterFan0000000000
Matter/examples/MatterHumiditySensor0000000000
Matter/examples/MatterMinimum0000000000
Matter/examples/MatterOccupancySensor0000000000
Matter/examples/MatterOnIdentify0000000000
Matter/examples/MatterOnOffLight0000000000
Matter/examples/MatterOnOffPlugin0000000000
Matter/examples/MatterPressureSensor0000000000
Matter/examples/MatterSmartButon0000000000
Matter/examples/MatterTemperatureLight0000000000
Matter/examples/MatterTemperatureSensor00000000⚠️ +160
Matter/examples/WiFiProvWithinMatter0000000000

@SuGlider SuGlider added this to the 3.1.0 milestone Jan 5, 2025
@SuGlider SuGlider added Area: Libraries Issue is related to Library support. Area: Matter Issues and Feature Request about Matter Protocol labels Jan 5, 2025
@SuGlider SuGlider self-assigned this Jan 5, 2025
@me-no-dev me-no-dev added the Status: Pending Merge Pull Request is ready to be merged label Jan 6, 2025
@rftafas rftafas modified the milestones: 3.1.0, 3.1.1 Jan 6, 2025
@me-no-dev me-no-dev merged commit 2cb0819 into master Jan 7, 2025
86 checks passed
@me-no-dev me-no-dev deleted the m5stack_matter_conflict branch January 7, 2025 10:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Libraries Issue is related to Library support. Area: Matter Issues and Feature Request about Matter Protocol Status: Pending Merge Pull Request is ready to be merged
Projects
Development

Successfully merging this pull request may close these issues.

Name conflict with attribute_t when using M5Unified library alongside Matter library
5 participants