diff --git a/components/esp_matter/esp_matter_cluster.h b/components/esp_matter/esp_matter_cluster.h index 24042e4..d59e91c 100644 --- a/components/esp_matter/esp_matter_cluster.h +++ b/components/esp_matter/esp_matter_cluster.h @@ -318,8 +318,8 @@ cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags); namespace window_covering { typedef struct config { - uint16_t cluster_revision; - uint8_t type; + uint16_t cluster_revision = 5; + uint8_t type = 0; uint16_t physical_closed_limit_lift; uint16_t physical_closed_limit_tilt; nullable current_position_lift; @@ -329,19 +329,23 @@ typedef struct config { uint8_t config_status; nullable current_position_lift_percentage; nullable current_position_tilt_percentage; - nullable operational_status; + nullable operational_status = nullable(0); nullable target_position_lift_percent_100ths; nullable target_position_tilt_percent_100ths; - uint8_t end_product_type; + uint8_t end_product_type = 0; nullable current_position_lift_percent_100ths; nullable current_position_tilt_percent_100ths; uint16_t installed_open_limit_lift; uint16_t installed_closed_limit_lift; uint16_t installed_open_limit_tilt; uint16_t installed_closed_limit_tilt; - uint16_t mode; + uint16_t mode = 0; uint16_t safety_status; - config() : cluster_revision(5), type(0), operational_status(0), end_product_type(0), mode(0) {} + + config (uint8_t end_product_type = 0) + { + this->end_product_type = end_product_type; + } } config_t; cluster_t *create(endpoint_t *endpoint, config_t *config, uint8_t flags);