1515 *
1616 *
1717 */
18- typedef struct zigbee_dimmable_light_cfg_s {
18+ typedef struct zigbee_dimmable_light_cfg_s
19+ {
1920 esp_zb_basic_cluster_cfg_t basic_cfg; /* !< Basic cluster configuration, @ref esp_zb_basic_cluster_cfg_s */
2021 esp_zb_identify_cluster_cfg_t identify_cfg; /* !< Identify cluster configuration, @ref esp_zb_identify_cluster_cfg_s */
2122 esp_zb_groups_cluster_cfg_t groups_cfg; /* !< Groups cluster configuration, @ref esp_zb_groups_cluster_cfg_s */
@@ -29,6 +30,7 @@ typedef struct zigbee_dimmable_light_cfg_s {
2930 * Added here as not supported by ESP Zigbee library.
3031 *
3132 */
33+ // clang-format off
3234#define ZIGBEE_DEFAULT_DIMMABLE_LIGHT_CONFIG () \
3335 { \
3436 .basic_cfg = \
@@ -61,27 +63,33 @@ typedef struct zigbee_dimmable_light_cfg_s {
6163 .current_level = ESP_ZB_ZCL_LEVEL_CONTROL_CURRENT_LEVEL_DEFAULT_VALUE, \
6264 }, \
6365 }
66+ // clang-format on
6467
65- class ZigbeeDimmableLight : public ZigbeeEP {
68+ class ZigbeeDimmableLight : public ZigbeeEP
69+ {
6670public:
6771 ZigbeeDimmableLight (uint8_t endpoint);
6872 ~ZigbeeDimmableLight ();
6973
70- void onLightChange (void (*callback)(bool , uint8_t )) {
74+ void onLightChange (void (*callback)(bool , uint8_t ))
75+ {
7176 _on_light_change = callback;
7277 }
73- void restoreLight () {
78+ void restoreLight ()
79+ {
7480 lightChanged ();
7581 }
7682
7783 void setLightState (bool state);
7884 void setLightLevel (uint8_t level);
7985 void setLight (bool state, uint8_t level);
8086
81- bool getLightState () {
87+ bool getLightState ()
88+ {
8289 return _current_state;
8390 }
84- uint8_t getLightLevel () {
91+ uint8_t getLightLevel ()
92+ {
8593 return _current_level;
8694 }
8795
@@ -108,4 +116,4 @@ class ZigbeeDimmableLight : public ZigbeeEP {
108116 uint8_t _current_level;
109117};
110118
111- #endif // SOC_IEEE802154_SUPPORTED
119+ #endif // SOC_IEEE802154_SUPPORTED
0 commit comments