@@ -120,11 +120,11 @@ void ZigbeeThermostat::zbAttributeRead(uint16_t cluster_id, const esp_zb_zcl_att
120120 if (cluster_id == ESP_ZB_ZCL_CLUSTER_ID_TEMP_MEASUREMENT) {
121121 if (attribute->id == ESP_ZB_ZCL_ATTR_TEMP_MEASUREMENT_VALUE_ID && attribute->data .type == ESP_ZB_ZCL_ATTR_TYPE_S16) {
122122 int16_t value = attribute->data .value ? *(int16_t *)attribute->data .value : 0 ;
123- if (_on_temp_recieve ) {
124- _on_temp_recieve (zb_s16_to_temperature (value));
123+ if (_on_temp_receive ) {
124+ _on_temp_receive (zb_s16_to_temperature (value));
125125 }
126- if (_on_temp_recieve_with_source ) {
127- _on_temp_recieve_with_source (zb_s16_to_temperature (value), src_endpoint, src_address);
126+ if (_on_temp_receive_with_source ) {
127+ _on_temp_receive_with_source (zb_s16_to_temperature (value), src_endpoint, src_address);
128128 }
129129 }
130130 if (attribute->id == ESP_ZB_ZCL_ATTR_TEMP_MEASUREMENT_MIN_VALUE_ID && attribute->data .type == ESP_ZB_ZCL_ATTR_TYPE_S16) {
@@ -161,7 +161,7 @@ void ZigbeeThermostat::getTemperature() {
161161 read_req.clusterID = ESP_ZB_ZCL_CLUSTER_ID_TEMP_MEASUREMENT;
162162
163163 uint16_t attributes[] = {ESP_ZB_ZCL_ATTR_TEMP_MEASUREMENT_VALUE_ID};
164- read_req.attr_number = ZB_ARRAY_LENTH (attributes);
164+ read_req.attr_number = ZB_ARRAY_LENGHT (attributes);
165165 read_req.attr_field = attributes;
166166
167167 log_i (" Sending 'read temperature' command" );
@@ -179,7 +179,7 @@ void ZigbeeThermostat::getTemperature(uint16_t group_addr) {
179179 read_req.clusterID = ESP_ZB_ZCL_CLUSTER_ID_TEMP_MEASUREMENT;
180180
181181 uint16_t attributes[] = {ESP_ZB_ZCL_ATTR_TEMP_MEASUREMENT_VALUE_ID};
182- read_req.attr_number = ZB_ARRAY_LENTH (attributes);
182+ read_req.attr_number = ZB_ARRAY_LENGHT (attributes);
183183 read_req.attr_field = attributes;
184184
185185 log_i (" Sending 'read temperature' command to group address 0x%x" , group_addr);
@@ -198,7 +198,7 @@ void ZigbeeThermostat::getTemperature(uint8_t endpoint, uint16_t short_addr) {
198198 read_req.clusterID = ESP_ZB_ZCL_CLUSTER_ID_TEMP_MEASUREMENT;
199199
200200 uint16_t attributes[] = {ESP_ZB_ZCL_ATTR_TEMP_MEASUREMENT_VALUE_ID};
201- read_req.attr_number = ZB_ARRAY_LENTH (attributes);
201+ read_req.attr_number = ZB_ARRAY_LENGHT (attributes);
202202 read_req.attr_field = attributes;
203203
204204 log_i (" Sending 'read temperature' command to endpoint %d, address 0x%x" , endpoint, short_addr);
@@ -217,7 +217,7 @@ void ZigbeeThermostat::getTemperature(uint8_t endpoint, esp_zb_ieee_addr_t ieee_
217217 memcpy (read_req.zcl_basic_cmd .dst_addr_u .addr_long , ieee_addr, sizeof (esp_zb_ieee_addr_t ));
218218
219219 uint16_t attributes[] = {ESP_ZB_ZCL_ATTR_TEMP_MEASUREMENT_VALUE_ID};
220- read_req.attr_number = ZB_ARRAY_LENTH (attributes);
220+ read_req.attr_number = ZB_ARRAY_LENGHT (attributes);
221221 read_req.attr_field = attributes;
222222
223223 log_i (
@@ -239,7 +239,7 @@ void ZigbeeThermostat::getSensorSettings() {
239239 uint16_t attributes[] = {
240240 ESP_ZB_ZCL_ATTR_TEMP_MEASUREMENT_MIN_VALUE_ID, ESP_ZB_ZCL_ATTR_TEMP_MEASUREMENT_MAX_VALUE_ID, ESP_ZB_ZCL_ATTR_TEMP_MEASUREMENT_TOLERANCE_ID
241241 };
242- read_req.attr_number = ZB_ARRAY_LENTH (attributes);
242+ read_req.attr_number = ZB_ARRAY_LENGHT (attributes);
243243 read_req.attr_field = attributes;
244244
245245 log_i (" Sending 'read sensor settings' command" );
@@ -253,7 +253,7 @@ void ZigbeeThermostat::getSensorSettings() {
253253 return ;
254254 } else {
255255 // Call the callback function when all attributes are read
256- _on_config_recieve (_min_temp, _max_temp, _tolerance);
256+ _on_config_receive (_min_temp, _max_temp, _tolerance);
257257 }
258258}
259259
@@ -268,7 +268,7 @@ void ZigbeeThermostat::getSensorSettings(uint16_t group_addr) {
268268 uint16_t attributes[] = {
269269 ESP_ZB_ZCL_ATTR_TEMP_MEASUREMENT_MIN_VALUE_ID, ESP_ZB_ZCL_ATTR_TEMP_MEASUREMENT_MAX_VALUE_ID, ESP_ZB_ZCL_ATTR_TEMP_MEASUREMENT_TOLERANCE_ID
270270 };
271- read_req.attr_number = ZB_ARRAY_LENTH (attributes);
271+ read_req.attr_number = ZB_ARRAY_LENGHT (attributes);
272272 read_req.attr_field = attributes;
273273
274274 log_i (" Sending 'read sensor settings' command to group address 0x%x" , group_addr);
@@ -282,7 +282,7 @@ void ZigbeeThermostat::getSensorSettings(uint16_t group_addr) {
282282 return ;
283283 } else {
284284 // Call the callback function when all attributes are read
285- _on_config_recieve (_min_temp, _max_temp, _tolerance);
285+ _on_config_receive (_min_temp, _max_temp, _tolerance);
286286 }
287287}
288288
@@ -298,7 +298,7 @@ void ZigbeeThermostat::getSensorSettings(uint8_t endpoint, uint16_t short_addr)
298298 uint16_t attributes[] = {
299299 ESP_ZB_ZCL_ATTR_TEMP_MEASUREMENT_MIN_VALUE_ID, ESP_ZB_ZCL_ATTR_TEMP_MEASUREMENT_MAX_VALUE_ID, ESP_ZB_ZCL_ATTR_TEMP_MEASUREMENT_TOLERANCE_ID
300300 };
301- read_req.attr_number = ZB_ARRAY_LENTH (attributes);
301+ read_req.attr_number = ZB_ARRAY_LENGHT (attributes);
302302 read_req.attr_field = attributes;
303303
304304 log_i (" Sending 'read sensor settings' command to endpoint %d, address 0x%x" , endpoint, short_addr);
@@ -312,7 +312,7 @@ void ZigbeeThermostat::getSensorSettings(uint8_t endpoint, uint16_t short_addr)
312312 return ;
313313 } else {
314314 // Call the callback function when all attributes are read
315- _on_config_recieve (_min_temp, _max_temp, _tolerance);
315+ _on_config_receive (_min_temp, _max_temp, _tolerance);
316316 }
317317}
318318
@@ -328,7 +328,7 @@ void ZigbeeThermostat::getSensorSettings(uint8_t endpoint, esp_zb_ieee_addr_t ie
328328 uint16_t attributes[] = {
329329 ESP_ZB_ZCL_ATTR_TEMP_MEASUREMENT_MIN_VALUE_ID, ESP_ZB_ZCL_ATTR_TEMP_MEASUREMENT_MAX_VALUE_ID, ESP_ZB_ZCL_ATTR_TEMP_MEASUREMENT_TOLERANCE_ID
330330 };
331- read_req.attr_number = ZB_ARRAY_LENTH (attributes);
331+ read_req.attr_number = ZB_ARRAY_LENGHT (attributes);
332332 read_req.attr_field = attributes;
333333
334334 log_i (
@@ -345,7 +345,7 @@ void ZigbeeThermostat::getSensorSettings(uint8_t endpoint, esp_zb_ieee_addr_t ie
345345 return ;
346346 } else {
347347 // Call the callback function when all attributes are read
348- _on_config_recieve (_min_temp, _max_temp, _tolerance);
348+ _on_config_receive (_min_temp, _max_temp, _tolerance);
349349 }
350350}
351351
@@ -367,7 +367,7 @@ void ZigbeeThermostat::setTemperatureReporting(uint16_t min_interval, uint16_t m
367367 .reportable_change = (void *)&report_change,
368368 },
369369 };
370- report_cmd.record_number = ZB_ARRAY_LENTH (records);
370+ report_cmd.record_number = ZB_ARRAY_LENGHT (records);
371371 report_cmd.record_field = records;
372372
373373 log_i (" Sending 'configure reporting' command" );
@@ -395,7 +395,7 @@ void ZigbeeThermostat::setTemperatureReporting(uint16_t group_addr, uint16_t min
395395 .reportable_change = (void *)&report_change,
396396 },
397397 };
398- report_cmd.record_number = ZB_ARRAY_LENTH (records);
398+ report_cmd.record_number = ZB_ARRAY_LENGHT (records);
399399 report_cmd.record_field = records;
400400
401401 log_i (" Sending 'configure reporting' command to group address 0x%x" , group_addr);
@@ -424,7 +424,7 @@ void ZigbeeThermostat::setTemperatureReporting(uint8_t endpoint, uint16_t short_
424424 .reportable_change = (void *)&report_change,
425425 },
426426 };
427- report_cmd.record_number = ZB_ARRAY_LENTH (records);
427+ report_cmd.record_number = ZB_ARRAY_LENGHT (records);
428428 report_cmd.record_field = records;
429429
430430 log_i (" Sending 'configure reporting' command to endpoint %d, address 0x%x" , endpoint, short_addr);
@@ -453,7 +453,7 @@ void ZigbeeThermostat::setTemperatureReporting(uint8_t endpoint, esp_zb_ieee_add
453453 .reportable_change = (void *)&report_change,
454454 },
455455 };
456- report_cmd.record_number = ZB_ARRAY_LENTH (records);
456+ report_cmd.record_number = ZB_ARRAY_LENGHT (records);
457457 report_cmd.record_field = records;
458458
459459 log_i (
0 commit comments