Skip to content

Commit

Permalink
fix(zigbee): fix formatting of defines
Browse files Browse the repository at this point in the history
  • Loading branch information
P-R-O-C-H-Y committed Dec 13, 2024
1 parent a7e2e64 commit 6bc971c
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 54 deletions.
36 changes: 18 additions & 18 deletions libraries/Zigbee/src/ep/ZigbeeCarbonDioxideSensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,24 @@
#include "ha/esp_zigbee_ha_standard.h"

// clang-format off
#define ZIGBEE_DEFAULT_CARBON_DIOXIDE_SENSOR_CONFIG() \
{ \
.basic_cfg = \
{ \
.zcl_version = ESP_ZB_ZCL_BASIC_ZCL_VERSION_DEFAULT_VALUE, \
.power_source = ESP_ZB_ZCL_BASIC_POWER_SOURCE_DEFAULT_VALUE, \
}, \
.identify_cfg = \
{ \
.identify_time = ESP_ZB_ZCL_IDENTIFY_IDENTIFY_TIME_DEFAULT_VALUE, \
}, \
.carbon_dioxide_meas_cfg = \
{ \
.measured_value = 0.0, \
.min_measured_value = 0.0, \
.max_measured_value = 1.0, \
}, \
}
#define ZIGBEE_DEFAULT_CARBON_DIOXIDE_SENSOR_CONFIG() \
{ \
.basic_cfg = \
{ \
.zcl_version = ESP_ZB_ZCL_BASIC_ZCL_VERSION_DEFAULT_VALUE, \
.power_source = ESP_ZB_ZCL_BASIC_POWER_SOURCE_DEFAULT_VALUE, \
}, \
.identify_cfg = \
{ \
.identify_time = ESP_ZB_ZCL_IDENTIFY_IDENTIFY_TIME_DEFAULT_VALUE, \
}, \
.carbon_dioxide_meas_cfg = \
{ \
.measured_value = 0.0, \
.min_measured_value = 0.0, \
.max_measured_value = 1.0, \
}, \
}
// clang-format on

typedef struct zigbee_carbon_dioxide_sensor_cfg_s {
Expand Down
36 changes: 18 additions & 18 deletions libraries/Zigbee/src/ep/ZigbeeFlowSensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,24 @@
#include "ha/esp_zigbee_ha_standard.h"

// clang-format off
#define ZIGBEE_DEFAULT_FLOW_SENSOR_CONFIG() \
{ \
.basic_cfg = \
{ \
.zcl_version = ESP_ZB_ZCL_BASIC_ZCL_VERSION_DEFAULT_VALUE, \
.power_source = ESP_ZB_ZCL_BASIC_POWER_SOURCE_DEFAULT_VALUE, \
}, \
.identify_cfg = \
{ \
.identify_time = ESP_ZB_ZCL_IDENTIFY_IDENTIFY_TIME_DEFAULT_VALUE, \
}, \
.flow_meas_cfg = \
{ \
.measured_value = 0, \
.min_value = 0, \
.max_value = 0x7FFF, \
}, \
}
#define ZIGBEE_DEFAULT_FLOW_SENSOR_CONFIG() \
{ \
.basic_cfg = \
{ \
.zcl_version = ESP_ZB_ZCL_BASIC_ZCL_VERSION_DEFAULT_VALUE, \
.power_source = ESP_ZB_ZCL_BASIC_POWER_SOURCE_DEFAULT_VALUE, \
}, \
.identify_cfg = \
{ \
.identify_time = ESP_ZB_ZCL_IDENTIFY_IDENTIFY_TIME_DEFAULT_VALUE, \
}, \
.flow_meas_cfg = \
{ \
.measured_value = 0, \
.min_value = 0, \
.max_value = 0x7FFF, \
}, \
}
// clang-format on

typedef struct zigbee_flow_sensor_cfg_s {
Expand Down
36 changes: 18 additions & 18 deletions libraries/Zigbee/src/ep/ZigbeeOccupancySensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,24 @@
#include "ha/esp_zigbee_ha_standard.h"

// clang-format off
#define ZIGBEE_DEFAULT_OCCUPANCY_SENSOR_CONFIG() \
{ \
.basic_cfg = \
{ \
.zcl_version = ESP_ZB_ZCL_BASIC_ZCL_VERSION_DEFAULT_VALUE, \
.power_source = ESP_ZB_ZCL_BASIC_POWER_SOURCE_DEFAULT_VALUE, \
}, \
.identify_cfg = \
{ \
.identify_time = ESP_ZB_ZCL_IDENTIFY_IDENTIFY_TIME_DEFAULT_VALUE, \
}, \
.occupancy_meas_cfg = \
{ \
.occupancy = ESP_ZB_ZCL_OCCUPANCY_SENSING_OCCUPANCY_UNOCCUPIED, \
.sensor_type = ESP_ZB_ZCL_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE_PIR, \
.sensor_type_bitmap = (1 << ESP_ZB_ZCL_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE_PIR), \
}, \
}
#define ZIGBEE_DEFAULT_OCCUPANCY_SENSOR_CONFIG() \
{ \
.basic_cfg = \
{ \
.zcl_version = ESP_ZB_ZCL_BASIC_ZCL_VERSION_DEFAULT_VALUE, \
.power_source = ESP_ZB_ZCL_BASIC_POWER_SOURCE_DEFAULT_VALUE, \
}, \
.identify_cfg = \
{ \
.identify_time = ESP_ZB_ZCL_IDENTIFY_IDENTIFY_TIME_DEFAULT_VALUE, \
}, \
.occupancy_meas_cfg = \
{ \
.occupancy = ESP_ZB_ZCL_OCCUPANCY_SENSING_OCCUPANCY_UNOCCUPIED, \
.sensor_type = ESP_ZB_ZCL_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE_PIR, \
.sensor_type_bitmap = (1 << ESP_ZB_ZCL_OCCUPANCY_SENSING_OCCUPANCY_SENSOR_TYPE_PIR), \
}, \
}
// clang-format on

typedef struct zigbee_occupancy_sensor_cfg_s {
Expand Down

0 comments on commit 6bc971c

Please sign in to comment.