From dadf2c2232d483514af6f7344e04bcac798caed4 Mon Sep 17 00:00:00 2001 From: Rodrigo Garcia Date: Mon, 9 Dec 2024 09:47:18 -0300 Subject: [PATCH] fix(matter): ci codespell fixes to commentaties --- libraries/Matter/examples/MatterFan/MatterFan.ino | 8 ++++---- libraries/Matter/src/MatterEndPoint.h | 6 +++--- libraries/Matter/src/MatterEndpoints/MatterFan.cpp | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/libraries/Matter/examples/MatterFan/MatterFan.ino b/libraries/Matter/examples/MatterFan/MatterFan.ino index d124e8a9232..ac26550f2b6 100644 --- a/libraries/Matter/examples/MatterFan/MatterFan.ino +++ b/libraries/Matter/examples/MatterFan/MatterFan.ino @@ -90,19 +90,19 @@ void setup() { Fan.begin(0, MatterFan::FAN_MODE_OFF, MatterFan::FAN_MODE_SEQ_OFF_HIGH); // callback functions would control Fan motor - // the Matter Controller will send new data whenver the User APP or Automation request + // the Matter Controller will send new data whenever the User APP or Automation request // single feature callbacks take place before the generic (all features) callback // This callback will be executed whenever the speed percent matter attribute is updated Fan.onChangeSpeedPercent([](uint8_t speedPercent) { // setting speed to Zero, while the Fan is ON, shall turn the Fan OFF if (speedPercent == MatterFan::OFF_SPEED && Fan.getMode() != MatterFan::FAN_MODE_OFF) { - // ATTR_SET do not update the attribute, just SET it to avoid inifinite loop + // ATTR_SET do not update the attribute, just SET it to avoid infinite loop return Fan.setOnOff(false, Fan.ATTR_SET); } // changing the speed to higher than Zero, while the Fan is OFF, shall turn the Fan ON if (speedPercent > MatterFan::OFF_SPEED && Fan.getMode() == MatterFan::FAN_MODE_OFF) { - // ATTR_SET do not update the attribute, just SET it to avoid inifinite loop + // ATTR_SET do not update the attribute, just SET it to avoid infinite loop return Fan.setOnOff(true, Fan.ATTR_SET); } // for other case, just return true @@ -115,7 +115,7 @@ void setup() { // when the Fan is turned ON using Mode Selection, while it is OFF, shall start it by setting the speed to 50% if (Fan.getSpeedPercent() == MatterFan::OFF_SPEED && fanMode != MatterFan::FAN_MODE_OFF) { Serial.printf("Fan set to %s mode -- speed percentage will go to 50%%\r\n", Fan.getFanModeString(fanMode)); - // ATTR_SET do not update the attribute, just SET it to avoid inifinite loop + // ATTR_SET do not update the attribute, just SET it to avoid infinite loop return Fan.setSpeedPercent(50, Fan.ATTR_SET); } return true; diff --git a/libraries/Matter/src/MatterEndPoint.h b/libraries/Matter/src/MatterEndPoint.h index dd0d91b1ca2..99bff8470d3 100644 --- a/libraries/Matter/src/MatterEndPoint.h +++ b/libraries/Matter/src/MatterEndPoint.h @@ -68,7 +68,7 @@ class MatterEndPoint { return false; } if (attribute::get_val(attribute, attrVal) == ESP_OK) { - log_v("GET_VAL Suceess for cluster %d, attribute %d with value %d", cluster_id, attribute_id, attrVal->val.u32); + log_v("GET_VAL Success for cluster %d, attribute %d with value %d", cluster_id, attribute_id, attrVal->val.u32); return true; } log_e("GET_VAL FAILED! for cluster %d, attribute %d with value %d", cluster_id, attribute_id, attrVal->val.u32); @@ -82,7 +82,7 @@ class MatterEndPoint { return false; } if (attribute::set_val(attribute, attrVal) == ESP_OK) { - log_v("SET_VAL Suceess for cluster %d, attribute %d with value %d", cluster_id, attribute_id, attrVal->val.u32); + log_v("SET_VAL Success for cluster %d, attribute %d with value %d", cluster_id, attribute_id, attrVal->val.u32); return true; } log_e("SET_VAL FAILED! for cluster %d, attribute %d with value %d", cluster_id, attribute_id, attrVal->val.u32); @@ -92,7 +92,7 @@ class MatterEndPoint { // update the value of an attribute from its cluster id and attribute it bool updateAttributeVal(uint32_t cluster_id, uint32_t attribute_id, esp_matter_attr_val_t *attrVal) { if (attribute::update(endpoint_id, cluster_id, attribute_id, attrVal) == ESP_OK) { - log_v("Update Suceess for cluster %d, attribute %d with value %d", cluster_id, attribute_id, attrVal->val.u32); + log_v("Update Success for cluster %d, attribute %d with value %d", cluster_id, attribute_id, attrVal->val.u32); return true; } log_e("Update FAILED! for cluster %d, attribute %d with value %d", cluster_id, attribute_id, attrVal->val.u32); diff --git a/libraries/Matter/src/MatterEndpoints/MatterFan.cpp b/libraries/Matter/src/MatterEndpoints/MatterFan.cpp index 3992be61c09..8db6a317ead 100644 --- a/libraries/Matter/src/MatterEndpoints/MatterFan.cpp +++ b/libraries/Matter/src/MatterEndpoints/MatterFan.cpp @@ -96,7 +96,7 @@ bool MatterFan::begin(uint8_t percent, FanMode_t fanMode, FanModeSequence_t fanM endpoint_t *endpoint = fan::create(node::get(), &fan_config, ENDPOINT_FLAG_NONE, (void *)this); if (endpoint == nullptr) { - log_e("Failed to create Generic swtich endpoint"); + log_e("Failed to create Fan endpoint"); return false; } @@ -152,7 +152,7 @@ bool MatterFan::setMode(FanMode_t newMode, bool performUpdate) { return true; } -// this function will change the Fan Speed by callin the user application callback +// this function will change the Fan Speed by calling the user application callback // it is up to the application to decide to turn on, off or change the speed of the fan bool MatterFan::setSpeedPercent(uint8_t newPercent, bool performUpdate) { if (!started) {