Skip to content

Commit 8a66c9a

Browse files
committed
feat(matter): adjusts all examples to only include matter.h
1 parent b740654 commit 8a66c9a

File tree

4 files changed

+3
-5
lines changed

4 files changed

+3
-5
lines changed

Diff for: libraries/Matter/examples/MatterCommissionTest/MatterCommissionTest.ino

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
// List of Matter Endpoints for this Node
2020
// On/Off Light Endpoint
21-
#include <MatterEndpoints/MatterOnOffLight.h>
2221
MatterOnOffLight OnOffLight;
2322

2423
// WiFi is manually set and started

Diff for: libraries/Matter/examples/MatterComposedLights/MatterComposedLights.ino

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
// List of Matter Endpoints for this Node
2020
// There will be 3 On/Off Light Endpoints in the same Node
21-
#include <MatterEndpoints/MatterOnOffLight.h>
2221
MatterOnOffLight OnOffLight1;
2322
MatterOnOffLight OnOffLight2;
2423
MatterOnOffLight OnOffLight3;

Diff for: libraries/Matter/examples/MatterDimmableLight/MatterDimmableLight.ino

+3-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
// List of Matter Endpoints for this Node
2121
// Dimmable Light Endpoint
22-
#include <MatterEndpoints/MatterDimmableLight.h>
2322
MatterDimmableLight DimmableLight;
2423

2524
// it will keep last OnOff & Brightness state stored, using Preferences
@@ -88,8 +87,10 @@ void setup() {
8887

8988
// Initialize Matter EndPoint
9089
lastStatePref.begin("matterLight", false);
90+
// default OnOff state is ON if not stored before
9191
bool lastOnOffState = lastStatePref.getBool("lastOnOffState", true);
92-
uint8_t lastBrightness = lastStatePref.getUChar("lastBrightness", 15); // default brightness = 12%
92+
// default brightness ~= 6% (15/255)
93+
uint8_t lastBrightness = lastStatePref.getUChar("lastBrightness", 15);
9394
DimmableLight.begin(lastOnOffState, lastBrightness);
9495
// set the callback function to handle the Light state change
9596
DimmableLight.onChange(setLightState);

Diff for: libraries/Matter/examples/MatterOnOffLight/MatterOnOffLight.ino

-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
// List of Matter Endpoints for this Node
2121
// On/Off Light Endpoint
22-
#include <MatterEndpoints/MatterOnOffLight.h>
2322
MatterOnOffLight OnOffLight;
2423

2524
// it will keep last OnOff state stored, using Preferences

0 commit comments

Comments
 (0)