@@ -20,7 +20,7 @@ ZigbeeEP::ZigbeeEP(uint8_t endpoint) {
20
20
_cluster_list = nullptr ;
21
21
_on_identify = nullptr ;
22
22
_read_model = NULL ;
23
- _read_manufacturer = NULL ;
23
+ _read_manufacturer = NULL ;
24
24
_time_status = 0 ;
25
25
if (!lock) {
26
26
lock = xSemaphoreCreateBinary ();
@@ -51,7 +51,7 @@ bool ZigbeeEP::setManufacturerAndModel(const char *name, const char *model) {
51
51
if (basic_cluster == nullptr ) {
52
52
log_e (" Failed to get basic cluster" );
53
53
return false ;
54
- }
54
+ }
55
55
// Store the length as the first element
56
56
zb_name[0 ] = static_cast <char >(name_length); // Cast size_t to char
57
57
zb_model[0 ] = static_cast <char >(model_length);
@@ -172,7 +172,7 @@ char *ZigbeeEP::readManufacturer(uint8_t endpoint, uint16_t short_addr, esp_zb_i
172
172
free (_read_manufacturer);
173
173
}
174
174
_read_manufacturer = NULL ;
175
-
175
+
176
176
esp_zb_lock_acquire (portMAX_DELAY);
177
177
esp_zb_zcl_read_attr_cmd_req (&read_req);
178
178
esp_zb_lock_release ();
@@ -206,7 +206,7 @@ char *ZigbeeEP::readModel(uint8_t endpoint, uint16_t short_addr, esp_zb_ieee_add
206
206
read_req.attr_number = ZB_ARRAY_LENTH (attributes);
207
207
read_req.attr_field = attributes;
208
208
209
- if (_read_model != NULL ) {
209
+ if (_read_model != NULL ) {
210
210
free (_read_model);
211
211
}
212
212
_read_model = NULL ;
@@ -250,7 +250,7 @@ void ZigbeeEP::zbReadBasicCluster(const esp_zb_zcl_attribute_t *attribute) {
250
250
/* Basic cluster attributes */
251
251
if (attribute->id == ESP_ZB_ZCL_ATTR_BASIC_MANUFACTURER_NAME_ID && attribute->data .type == ESP_ZB_ZCL_ATTR_TYPE_CHAR_STRING && attribute->data .value ) {
252
252
zbstring_t *zbstr = (zbstring_t *)attribute->data .value ;
253
- char *_read_manufacturer = (char *) malloc (zbstr->len + 1 );
253
+ char *_read_manufacturer = (char *)malloc (zbstr->len + 1 );
254
254
if (_read_manufacturer == NULL ) {
255
255
log_e (" Failed to allocate memory for manufacturer data" );
256
256
xSemaphoreGive (lock);
@@ -263,7 +263,7 @@ void ZigbeeEP::zbReadBasicCluster(const esp_zb_zcl_attribute_t *attribute) {
263
263
}
264
264
if (attribute->id == ESP_ZB_ZCL_ATTR_BASIC_MODEL_IDENTIFIER_ID && attribute->data .type == ESP_ZB_ZCL_ATTR_TYPE_CHAR_STRING && attribute->data .value ) {
265
265
zbstring_t *zbstr = (zbstring_t *)attribute->data .value ;
266
- char *_read_model = (char *) malloc (zbstr->len + 1 );
266
+ char *_read_model = (char *)malloc (zbstr->len + 1 );
267
267
if (_read_model == NULL ) {
268
268
log_e (" Failed to allocate memory for model data" );
269
269
xSemaphoreGive (lock);
0 commit comments