Skip to content

Commit 3e0d084

Browse files
ci(pre-commit): Apply automatic fixes
1 parent f7c25b1 commit 3e0d084

File tree

4 files changed

+265
-291
lines changed

4 files changed

+265
-291
lines changed

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

+9-3
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ bool setLightState(bool state, uint8_t brightness, uint16_t temperature_Mireds)
4747

4848
if (state) {
4949
#ifdef RGB_BUILTIN
50-
CtColor_t ct = { temperature_Mireds };
50+
CtColor_t ct = {temperature_Mireds};
5151
RgbColor_t rgb_ct = CTToRgb(ct);
5252
// simple intensity correction
5353
float brightnessPercent = (float)brightness / MatterColorTemperatureLight::MAX_BRIGHTNESS;
@@ -130,7 +130,10 @@ void setup() {
130130
// This may be a restart of a already commissioned Matter accessory
131131
if (Matter.isDeviceCommissioned()) {
132132
Serial.println("Matter Node is commissioned and connected to Wi-Fi. Ready for use.");
133-
Serial.printf("Initial state: %s | brightness: %d | Color Temperature: %d mireds \r\n", CW_WW_Light ? "ON" : "OFF", CW_WW_Light.getBrightness(), CW_WW_Light.getColorTemperature());
133+
Serial.printf(
134+
"Initial state: %s | brightness: %d | Color Temperature: %d mireds \r\n", CW_WW_Light ? "ON" : "OFF", CW_WW_Light.getBrightness(),
135+
CW_WW_Light.getColorTemperature()
136+
);
134137
// configure the Light based on initial on-off state and brightness
135138
CW_WW_Light.updateAccessory();
136139
}
@@ -158,7 +161,10 @@ void loop() {
158161
Serial.println("Matter Node not commissioned yet. Waiting for commissioning.");
159162
}
160163
}
161-
Serial.printf("Initial state: %s | brightness: %d | Color Temperature: %d mireds \r\n", CW_WW_Light ? "ON" : "OFF", CW_WW_Light.getBrightness(), CW_WW_Light.getColorTemperature());
164+
Serial.printf(
165+
"Initial state: %s | brightness: %d | Color Temperature: %d mireds \r\n", CW_WW_Light ? "ON" : "OFF", CW_WW_Light.getBrightness(),
166+
CW_WW_Light.getColorTemperature()
167+
);
162168
// configure the Light based on initial on-off state and brightness
163169
CW_WW_Light.updateAccessory();
164170
Serial.println("Matter Node is commissioned and connected to Wi-Fi. Ready for use.");

Diff for: libraries/Matter/src/MatterEndpoints/MatterColorTemperatureLight.h

+6-6
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@
2121

2222
class MatterColorTemperatureLight : public MatterEndPoint {
2323
public:
24-
static const uint8_t MAX_BRIGHTNESS = 255;
24+
static const uint8_t MAX_BRIGHTNESS = 255;
2525
static const uint16_t MAX_COLOR_TEMPERATURE = 500;
2626
static const uint16_t MIN_COLOR_TEMPERATURE = 100;
2727
// main color temperature values
28-
static const uint16_t COOL_WHITE_COLOR_TEMPERATURE = 142;
29-
static const uint16_t DAYLIGHT_WHITE_COLOR_TEMPERATURE = 181;
30-
static const uint16_t WHITE_COLOR_TEMPERATURE = 250;
31-
static const uint16_t SOFT_WHITE_COLOR_TEMPERATURE = 370;
32-
static const uint16_t WARM_WHITE_COLOR_TEMPERATURE = 454;
28+
static const uint16_t COOL_WHITE_COLOR_TEMPERATURE = 142;
29+
static const uint16_t DAYLIGHT_WHITE_COLOR_TEMPERATURE = 181;
30+
static const uint16_t WHITE_COLOR_TEMPERATURE = 250;
31+
static const uint16_t SOFT_WHITE_COLOR_TEMPERATURE = 370;
32+
static const uint16_t WARM_WHITE_COLOR_TEMPERATURE = 454;
3333

3434
MatterColorTemperatureLight();
3535
~MatterColorTemperatureLight();

0 commit comments

Comments
 (0)