@@ -120,11 +120,11 @@ void ZigbeeThermostat::zbAttributeRead(uint16_t cluster_id, const esp_zb_zcl_att
120
120
if (cluster_id == ESP_ZB_ZCL_CLUSTER_ID_TEMP_MEASUREMENT) {
121
121
if (attribute->id == ESP_ZB_ZCL_ATTR_TEMP_MEASUREMENT_VALUE_ID && attribute->data .type == ESP_ZB_ZCL_ATTR_TYPE_S16) {
122
122
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));
125
125
}
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);
128
128
}
129
129
}
130
130
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() {
161
161
read_req.clusterID = ESP_ZB_ZCL_CLUSTER_ID_TEMP_MEASUREMENT;
162
162
163
163
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);
165
165
read_req.attr_field = attributes;
166
166
167
167
log_i (" Sending 'read temperature' command" );
@@ -179,7 +179,7 @@ void ZigbeeThermostat::getTemperature(uint16_t group_addr) {
179
179
read_req.clusterID = ESP_ZB_ZCL_CLUSTER_ID_TEMP_MEASUREMENT;
180
180
181
181
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);
183
183
read_req.attr_field = attributes;
184
184
185
185
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) {
198
198
read_req.clusterID = ESP_ZB_ZCL_CLUSTER_ID_TEMP_MEASUREMENT;
199
199
200
200
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);
202
202
read_req.attr_field = attributes;
203
203
204
204
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_
217
217
memcpy (read_req.zcl_basic_cmd .dst_addr_u .addr_long , ieee_addr, sizeof (esp_zb_ieee_addr_t ));
218
218
219
219
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);
221
221
read_req.attr_field = attributes;
222
222
223
223
log_i (
@@ -239,7 +239,7 @@ void ZigbeeThermostat::getSensorSettings() {
239
239
uint16_t attributes[] = {
240
240
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
241
241
};
242
- read_req.attr_number = ZB_ARRAY_LENTH (attributes);
242
+ read_req.attr_number = ZB_ARRAY_LENGHT (attributes);
243
243
read_req.attr_field = attributes;
244
244
245
245
log_i (" Sending 'read sensor settings' command" );
@@ -253,7 +253,7 @@ void ZigbeeThermostat::getSensorSettings() {
253
253
return ;
254
254
} else {
255
255
// 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);
257
257
}
258
258
}
259
259
@@ -268,7 +268,7 @@ void ZigbeeThermostat::getSensorSettings(uint16_t group_addr) {
268
268
uint16_t attributes[] = {
269
269
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
270
270
};
271
- read_req.attr_number = ZB_ARRAY_LENTH (attributes);
271
+ read_req.attr_number = ZB_ARRAY_LENGHT (attributes);
272
272
read_req.attr_field = attributes;
273
273
274
274
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) {
282
282
return ;
283
283
} else {
284
284
// 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);
286
286
}
287
287
}
288
288
@@ -298,7 +298,7 @@ void ZigbeeThermostat::getSensorSettings(uint8_t endpoint, uint16_t short_addr)
298
298
uint16_t attributes[] = {
299
299
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
300
300
};
301
- read_req.attr_number = ZB_ARRAY_LENTH (attributes);
301
+ read_req.attr_number = ZB_ARRAY_LENGHT (attributes);
302
302
read_req.attr_field = attributes;
303
303
304
304
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)
312
312
return ;
313
313
} else {
314
314
// 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);
316
316
}
317
317
}
318
318
@@ -328,7 +328,7 @@ void ZigbeeThermostat::getSensorSettings(uint8_t endpoint, esp_zb_ieee_addr_t ie
328
328
uint16_t attributes[] = {
329
329
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
330
330
};
331
- read_req.attr_number = ZB_ARRAY_LENTH (attributes);
331
+ read_req.attr_number = ZB_ARRAY_LENGHT (attributes);
332
332
read_req.attr_field = attributes;
333
333
334
334
log_i (
@@ -345,7 +345,7 @@ void ZigbeeThermostat::getSensorSettings(uint8_t endpoint, esp_zb_ieee_addr_t ie
345
345
return ;
346
346
} else {
347
347
// 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);
349
349
}
350
350
}
351
351
@@ -367,7 +367,7 @@ void ZigbeeThermostat::setTemperatureReporting(uint16_t min_interval, uint16_t m
367
367
.reportable_change = (void *)&report_change,
368
368
},
369
369
};
370
- report_cmd.record_number = ZB_ARRAY_LENTH (records);
370
+ report_cmd.record_number = ZB_ARRAY_LENGHT (records);
371
371
report_cmd.record_field = records;
372
372
373
373
log_i (" Sending 'configure reporting' command" );
@@ -395,7 +395,7 @@ void ZigbeeThermostat::setTemperatureReporting(uint16_t group_addr, uint16_t min
395
395
.reportable_change = (void *)&report_change,
396
396
},
397
397
};
398
- report_cmd.record_number = ZB_ARRAY_LENTH (records);
398
+ report_cmd.record_number = ZB_ARRAY_LENGHT (records);
399
399
report_cmd.record_field = records;
400
400
401
401
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_
424
424
.reportable_change = (void *)&report_change,
425
425
},
426
426
};
427
- report_cmd.record_number = ZB_ARRAY_LENTH (records);
427
+ report_cmd.record_number = ZB_ARRAY_LENGHT (records);
428
428
report_cmd.record_field = records;
429
429
430
430
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
453
453
.reportable_change = (void *)&report_change,
454
454
},
455
455
};
456
- report_cmd.record_number = ZB_ARRAY_LENTH (records);
456
+ report_cmd.record_number = ZB_ARRAY_LENGHT (records);
457
457
report_cmd.record_field = records;
458
458
459
459
log_i (
0 commit comments