Skip to content

Commit 27ab18e

Browse files
ci(pre-commit): Apply automatic fixes
1 parent e118e02 commit 27ab18e

File tree

8 files changed

+766
-687
lines changed

8 files changed

+766
-687
lines changed

docs/en/matter/ep_temperature_controlled_cabinet.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,4 +294,3 @@ Temperature Controlled Cabinet (Level Mode)
294294
A separate example demonstrates the temperature_level mode with dynamic level updates. The temperature level automatically cycles through all supported levels every 1 second in both directions (increasing and decreasing), allowing Matter controllers to observe real-time changes. The example also monitors and logs when the initial level is reached or overpassed in each direction.
295295

296296
See ``MatterTemperatureControlledCabinetLevels`` example for the temperature level mode implementation.
297-

libraries/Matter/examples/MatterTemperatureControlledCabinet/MatterTemperatureControlledCabinet.ino

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414

1515
/*
1616
* This example demonstrates the Temperature Number mode of the Matter Temperature Controlled Cabinet Device.
17-
*
17+
*
1818
* This example will create a Matter Device which can be commissioned and controlled from a Matter Environment APP.
1919
* Additionally the ESP32 will send debug messages indicating the Matter activity.
2020
* Turning DEBUG Level ON may be useful to following Matter Accessory and Controller messages.
2121
*
2222
* The example will create a Matter Temperature Controlled Cabinet Device using temperature_number feature.
2323
* The Temperature Controlled Cabinet can be controlled via Matter controllers to set
2424
* temperature setpoint with min/max limits and optional step control.
25-
*
25+
*
2626
* This mode is mutually exclusive with temperature_level mode.
2727
* See MatterTemperatureControlledCabinetLevels example for temperature level control.
2828
*/
@@ -104,10 +104,10 @@ void updateTemperatureSetpoint() {
104104
double minTemp = TemperatureCabinet.getMinTemperature();
105105
double maxTemp = TemperatureCabinet.getMaxTemperature();
106106
double step = TemperatureCabinet.getStep();
107-
107+
108108
// Calculate next setpoint based on direction and step
109109
bool directionChanged = false;
110-
110+
111111
if (tempState.increasing) {
112112
tempState.currentSetpoint += step;
113113
if (tempState.currentSetpoint >= maxTemp) {
@@ -123,25 +123,24 @@ void updateTemperatureSetpoint() {
123123
directionChanged = true;
124124
}
125125
}
126-
126+
127127
// Check if setpoint has been reached or overpassed
128128
checkSetpointReached(tempState.currentSetpoint, tempState.increasing, directionChanged);
129-
129+
130130
// Update the temperature setpoint
131131
if (TemperatureCabinet.setTemperatureSetpoint(tempState.currentSetpoint)) {
132-
Serial.printf("Temperature setpoint updated to: %.02f°C (Range: %.02f°C to %.02f°C)\r\n",
133-
tempState.currentSetpoint, minTemp, maxTemp);
132+
Serial.printf("Temperature setpoint updated to: %.02f°C (Range: %.02f°C to %.02f°C)\r\n", tempState.currentSetpoint, minTemp, maxTemp);
134133
} else {
135134
Serial.printf("Failed to update temperature setpoint to: %.02f°C\r\n", tempState.currentSetpoint);
136135
}
137136
}
138137

139138
// Print current temperature status
140139
void printTemperatureStatus() {
141-
Serial.printf("Current Temperature Setpoint: %.02f°C (Range: %.02f°C to %.02f°C)\r\n",
142-
TemperatureCabinet.getTemperatureSetpoint(),
143-
TemperatureCabinet.getMinTemperature(),
144-
TemperatureCabinet.getMaxTemperature());
140+
Serial.printf(
141+
"Current Temperature Setpoint: %.02f°C (Range: %.02f°C to %.02f°C)\r\n", TemperatureCabinet.getTemperatureSetpoint(),
142+
TemperatureCabinet.getMinTemperature(), TemperatureCabinet.getMaxTemperature()
143+
);
145144
}
146145

147146
// Handle button press for decommissioning

libraries/Matter/examples/MatterTemperatureControlledCabinet/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ The MatterTemperatureControlledCabinet example consists of the following main co
172172

173173
1. **`setup()`**: Initializes hardware (button), configures Wi-Fi (if needed), sets up the Matter Temperature Controlled Cabinet endpoint with initial temperature configuration, and waits for Matter commissioning.
174174

175-
2. **`loop()`**:
175+
2. **`loop()`**:
176176
- **Dynamic Temperature Updates**: Automatically changes the temperature setpoint every 1 second, cycling between the minimum and maximum temperature limits using the configured step value. This demonstrates the temperature control functionality and allows Matter controllers to observe real-time changes.
177177
- **Setpoint Reached Detection**: Monitors when the initial setpoint is reached or overpassed in each direction and prints a notification message once per direction.
178178
- Periodically prints the current temperature setpoint (every 5 seconds)
@@ -213,4 +213,3 @@ The example demonstrates the following API methods:
213213
## License
214214

215215
This example is licensed under the Apache License, Version 2.0.
216-

libraries/Matter/examples/MatterTemperatureControlledCabinet/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ fqbn_append: PartitionScheme=huge_app
22

33
requires:
44
- CONFIG_ESP_MATTER_ENABLE_DATA_MODEL=y
5-

libraries/Matter/examples/MatterTemperatureControlledCabinetLevels/MatterTemperatureControlledCabinetLevels.ino

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414

1515
/*
1616
* This example demonstrates the Temperature Level mode of the Matter Temperature Controlled Cabinet Device.
17-
*
17+
*
1818
* This example will create a Matter Device which can be commissioned and controlled from a Matter Environment APP.
1919
* Additionally the ESP32 will send debug messages indicating the Matter activity.
2020
* Turning DEBUG Level ON may be useful to following Matter Accessory and Controller messages.
2121
*
2222
* The example will create a Matter Temperature Controlled Cabinet Device using temperature_level feature.
2323
* The Temperature Controlled Cabinet can be controlled via Matter controllers to set
2424
* temperature levels from a predefined array of supported levels.
25-
*
25+
*
2626
* This mode is mutually exclusive with temperature_number mode.
2727
* See MatterTemperatureControlledCabinet example for temperature setpoint control.
2828
*/
@@ -71,12 +71,7 @@ struct LevelControlState {
7171
};
7272

7373
static LevelControlState levelState = {
74-
.initialized = false,
75-
.increasing = true,
76-
.currentLevelIndex = 0,
77-
.initialLevel = 0,
78-
.levelReachedIncreasing = false,
79-
.levelReachedDecreasing = false
74+
.initialized = false, .increasing = true, .currentLevelIndex = 0, .initialLevel = 0, .levelReachedIncreasing = false, .levelReachedDecreasing = false
8075
};
8176

8277
// Initialize level control state
@@ -117,7 +112,7 @@ void checkLevelReached(uint8_t newLevel, bool isIncreasing, bool directionChange
117112
void updateTemperatureLevel() {
118113
// Cycle through supported levels in both directions
119114
bool directionChanged = false;
120-
115+
121116
if (levelState.increasing) {
122117
levelState.currentLevelIndex++;
123118
if (levelState.currentLevelIndex >= levelCount) {
@@ -134,12 +129,12 @@ void updateTemperatureLevel() {
134129
levelState.currentLevelIndex--;
135130
}
136131
}
137-
132+
138133
uint8_t newLevel = supportedLevels[levelState.currentLevelIndex];
139-
134+
140135
// Check if initial level has been reached or overpassed
141136
checkLevelReached(newLevel, levelState.increasing, directionChanged);
142-
137+
143138
// Update the temperature level
144139
if (TemperatureCabinet.setSelectedTemperatureLevel(newLevel)) {
145140
Serial.printf("Temperature level updated to: %u (Supported Levels: ", newLevel);
@@ -212,7 +207,7 @@ void setup() {
212207
// - supportedLevels: Array of temperature level values (0-255)
213208
// - levelCount: Number of levels in the array
214209
// - initialLevel: Initial selected temperature level
215-
//
210+
//
216211
// Note: This mode is mutually exclusive with temperature_number mode.
217212
// See MatterTemperatureControlledCabinet example for temperature setpoint control.
218213
if (!TemperatureCabinet.begin(supportedLevels, levelCount, initialLevel)) {

libraries/Matter/examples/MatterTemperatureControlledCabinetLevels/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ The MatterTemperatureControlledCabinetLevels example consists of the following m
172172
173173
1. **`setup()`**: Initializes hardware (button), configures Wi-Fi (if needed), sets up the Matter Temperature Controlled Cabinet endpoint with temperature level configuration, and waits for Matter commissioning.
174174
175-
2. **`loop()`**:
175+
2. **`loop()`**:
176176
- **Dynamic Level Updates**: Automatically cycles through all supported temperature levels every 1 second in both directions (increasing and decreasing). This demonstrates the temperature level control functionality and allows Matter controllers to observe real-time changes.
177177
- **Level Reached Detection**: Monitors when the initial level is reached or overpassed in each direction and prints a notification message once per direction.
178178
- Periodically prints the current temperature level (every 5 seconds)
@@ -213,4 +213,3 @@ The example demonstrates the following API methods:
213213
## License
214214
215215
This example is licensed under the Apache License, Version 2.0.
216-

0 commit comments

Comments
 (0)