15
15
*
16
16
*
17
17
*/
18
- typedef struct zigbee_dimmable_light_cfg_s {
18
+ typedef struct zigbee_dimmable_light_cfg_s
19
+ {
19
20
esp_zb_basic_cluster_cfg_t basic_cfg; /* !< Basic cluster configuration, @ref esp_zb_basic_cluster_cfg_s */
20
21
esp_zb_identify_cluster_cfg_t identify_cfg; /* !< Identify cluster configuration, @ref esp_zb_identify_cluster_cfg_s */
21
22
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 {
29
30
* Added here as not supported by ESP Zigbee library.
30
31
*
31
32
*/
33
+ // clang-format off
32
34
#define ZIGBEE_DEFAULT_DIMMABLE_LIGHT_CONFIG () \
33
35
{ \
34
36
.basic_cfg = \
@@ -61,27 +63,33 @@ typedef struct zigbee_dimmable_light_cfg_s {
61
63
.current_level = ESP_ZB_ZCL_LEVEL_CONTROL_CURRENT_LEVEL_DEFAULT_VALUE, \
62
64
}, \
63
65
}
66
+ // clang-format on
64
67
65
- class ZigbeeDimmableLight : public ZigbeeEP {
68
+ class ZigbeeDimmableLight : public ZigbeeEP
69
+ {
66
70
public:
67
71
ZigbeeDimmableLight (uint8_t endpoint);
68
72
~ZigbeeDimmableLight ();
69
73
70
- void onLightChange (void (*callback)(bool , uint8_t )) {
74
+ void onLightChange (void (*callback)(bool , uint8_t ))
75
+ {
71
76
_on_light_change = callback;
72
77
}
73
- void restoreLight () {
78
+ void restoreLight ()
79
+ {
74
80
lightChanged ();
75
81
}
76
82
77
83
void setLightState (bool state);
78
84
void setLightLevel (uint8_t level);
79
85
void setLight (bool state, uint8_t level);
80
86
81
- bool getLightState () {
87
+ bool getLightState ()
88
+ {
82
89
return _current_state;
83
90
}
84
- uint8_t getLightLevel () {
91
+ uint8_t getLightLevel ()
92
+ {
85
93
return _current_level;
86
94
}
87
95
@@ -108,4 +116,4 @@ class ZigbeeDimmableLight : public ZigbeeEP {
108
116
uint8_t _current_level;
109
117
};
110
118
111
- #endif // SOC_IEEE802154_SUPPORTED
119
+ #endif // SOC_IEEE802154_SUPPORTED
0 commit comments