Skip to content

Commit 7d465f3

Browse files
committed
feat(matter): fix commentaries related to feature changes and log messages
1 parent 31dc520 commit 7d465f3

12 files changed

+23
-23
lines changed

libraries/Matter/src/MatterEndpoints/MatterColorLight.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ bool MatterColorLight::setOnOff(bool newState) {
206206
return false;
207207
}
208208

209-
// avoid processing the a "no-change"
209+
// avoid processing if there was no change
210210
if (onOffState == newState) {
211211
return true;
212212
}
@@ -256,7 +256,7 @@ bool MatterColorLight::setColorHSV(espHsvColor_t _hsvColor) {
256256
return false;
257257
}
258258

259-
// avoid processing the a "no-change"
259+
// avoid processing if there was no change
260260
if (colorHSV.h == _hsvColor.h && colorHSV.s == _hsvColor.s && colorHSV.v == _hsvColor.v) {
261261
return true;
262262
}

libraries/Matter/src/MatterEndpoints/MatterColorTemperatureLight.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ bool MatterColorTemperatureLight::setOnOff(bool newState) {
138138
return false;
139139
}
140140

141-
// avoid processing the a "no-change"
141+
// avoid processing if there was no change
142142
if (onOffState == newState) {
143143
return true;
144144
}
@@ -179,7 +179,7 @@ bool MatterColorTemperatureLight::setBrightness(uint8_t newBrightness) {
179179
return false;
180180
}
181181

182-
// avoid processing the a "no-change"
182+
// avoid processing if there was no change
183183
if (brightnessLevel == newBrightness) {
184184
return true;
185185
}
@@ -210,7 +210,7 @@ bool MatterColorTemperatureLight::setColorTemperature(uint16_t newTemperature) {
210210
return false;
211211
}
212212

213-
// avoid processing the a "no-change"
213+
// avoid processing if there was no change
214214
if (colorTemperatureLevel == newTemperature) {
215215
return true;
216216
}

libraries/Matter/src/MatterEndpoints/MatterContactSensor.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ bool MatterContactSensor::setContact(bool _contactState) {
6969
return false;
7070
}
7171

72-
// avoid processing the a "no-change"
72+
// avoid processing if there was no change
7373
if (contactState == _contactState) {
7474
return true;
7575
}

libraries/Matter/src/MatterEndpoints/MatterDimmableLight.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ bool MatterDimmableLight::setOnOff(bool newState) {
114114
return false;
115115
}
116116

117-
// avoid processing the a "no-change"
117+
// avoid processing if there was no change
118118
if (onOffState == newState) {
119119
return true;
120120
}
@@ -155,7 +155,7 @@ bool MatterDimmableLight::setBrightness(uint8_t newBrightness) {
155155
return false;
156156
}
157157

158-
// avoid processing the a "no-change"
158+
// avoid processing if there was no change
159159
if (brightnessLevel == newBrightness) {
160160
return true;
161161
}

libraries/Matter/src/MatterEndpoints/MatterEnhancedColorLight.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ bool MatterEnhancedColorLight::setOnOff(bool newState) {
226226
return false;
227227
}
228228

229-
// avoid processing the a "no-change"
229+
// avoid processing if there was no change
230230
if (onOffState == newState) {
231231
return true;
232232
}
@@ -267,7 +267,7 @@ bool MatterEnhancedColorLight::setBrightness(uint8_t newBrightness) {
267267
return false;
268268
}
269269

270-
// avoid processing the a "no-change"
270+
// avoid processing if there was no change
271271
if (brightnessLevel == newBrightness) {
272272
return true;
273273
}
@@ -298,7 +298,7 @@ bool MatterEnhancedColorLight::setColorTemperature(uint16_t newTemperature) {
298298
return false;
299299
}
300300

301-
// avoid processing the a "no-change"
301+
// avoid processing if there was no change
302302
if (colorTemperatureLevel == newTemperature) {
303303
return true;
304304
}
@@ -338,7 +338,7 @@ bool MatterEnhancedColorLight::setColorHSV(espHsvColor_t _hsvColor) {
338338
return false;
339339
}
340340

341-
// avoid processing the a "no-change"
341+
// avoid processing if there was no change
342342
if (colorHSV.h == _hsvColor.h && colorHSV.s == _hsvColor.s && colorHSV.v == _hsvColor.v) {
343343
return true;
344344
}

libraries/Matter/src/MatterEndpoints/MatterFan.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ bool MatterFan::setMode(FanMode_t newMode, bool performUpdate) {
118118
log_w("Matter Fan device has not begun.");
119119
return false;
120120
}
121-
// avoid processing the a "no-change"
121+
// avoid processing if there was no change
122122
if (currentFanMode == newMode) {
123123
return true;
124124
}
@@ -159,7 +159,7 @@ bool MatterFan::setSpeedPercent(uint8_t newPercent, bool performUpdate) {
159159
log_w("Matter Fan device has not begun.");
160160
return false;
161161
}
162-
// avoid processing the a "no-change"
162+
// avoid processing if there was no change
163163
if (currentPercent == newPercent) {
164164
return true;
165165
}
@@ -193,7 +193,7 @@ bool MatterFan::setOnOff(bool newState, bool performUpdate) {
193193
log_w("Matter Fan device has not begun.");
194194
return false;
195195
}
196-
// avoid processing the a "no-change"
196+
// avoid processing if there was no change
197197
if (getOnOff() == newState) {
198198
return true;
199199
}

libraries/Matter/src/MatterEndpoints/MatterHumiditySensor.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ bool MatterHumiditySensor::setRawHumidity(uint16_t _rawHumidity) {
8282
return false;
8383
}
8484

85-
// avoid processing the a "no-change"
85+
// avoid processing if there was no change
8686
if (rawHumidity == _rawHumidity) {
8787
return true;
8888
}
@@ -98,7 +98,7 @@ bool MatterHumiditySensor::setRawHumidity(uint16_t _rawHumidity) {
9898
bool ret;
9999
ret = updateAttributeVal(RelativeHumidityMeasurement::Id, RelativeHumidityMeasurement::Attributes::MeasuredValue::Id, &humidityVal);
100100
if (!ret) {
101-
log_e("Failed to update Fan Speed Percent Attribute.");
101+
log_e("Failed to update Humidity Sensor Attribute.");
102102
return false;
103103
}
104104
rawHumidity = _rawHumidity;

libraries/Matter/src/MatterEndpoints/MatterOccupancySensor.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ bool MatterOccupancySensor::setOccupancy(bool _occupancyState) {
8080
return false;
8181
}
8282

83-
// avoid processing the a "no-change"
83+
// avoid processing if there was no change
8484
if (occupancyState == _occupancyState) {
8585
return true;
8686
}

libraries/Matter/src/MatterEndpoints/MatterOnOffLight.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ bool MatterOnOffLight::setOnOff(bool newState) {
9494
return false;
9595
}
9696

97-
// avoid processing the a "no-change"
97+
// avoid processing if there was no change
9898
if (onOffState == newState) {
9999
return true;
100100
}

libraries/Matter/src/MatterEndpoints/MatterOnOffPlugin.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ bool MatterOnOffPlugin::setOnOff(bool newState) {
9393
return false;
9494
}
9595

96-
// avoid processing the a "no-change"
96+
// avoid processing if there was no change
9797
if (onOffState == newState) {
9898
return true;
9999
}

libraries/Matter/src/MatterEndpoints/MatterPressureSensor.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ bool MatterPressureSensor::setRawPressure(int16_t _rawPressure) {
7070
return false;
7171
}
7272

73-
// avoid processing the a "no-change"
73+
// avoid processing if there was no change
7474
if (rawPressure == _rawPressure) {
7575
return true;
7676
}

libraries/Matter/src/MatterEndpoints/MatterTemperatureSensor.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ bool MatterTemperatureSensor::setRawTemperature(int16_t _rawTemperature) {
7070
return false;
7171
}
7272

73-
// avoid processing the a "no-change"
73+
// avoid processing if there was no change
7474
if (rawTemperature == _rawTemperature) {
7575
return true;
7676
}
@@ -86,7 +86,7 @@ bool MatterTemperatureSensor::setRawTemperature(int16_t _rawTemperature) {
8686
bool ret;
8787
ret = updateAttributeVal(TemperatureMeasurement::Id, TemperatureMeasurement::Attributes::MeasuredValue::Id, &temperatureVal);
8888
if (!ret) {
89-
log_e("Failed to update Fan Speed Percent Attribute.");
89+
log_e("Failed to update Temperature Sensor Attribute.");
9090
return false;
9191
}
9292
rawTemperature = _rawTemperature;

0 commit comments

Comments
 (0)