Skip to content

Commit 495a24f

Browse files
committed
Add check for SOC_IEEE802154_SUPPORTED
1 parent 95ff61b commit 495a24f

12 files changed

+52
-16
lines changed

libraries/Zigbee/src/ep/ZigbeeColorDimmableLight.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "ZigbeeColorDimmableLight.h"
2+
#if SOC_IEEE802154_SUPPORTED
23

34
ZigbeeColorDimmableLight::ZigbeeColorDimmableLight(uint8_t endpoint) : ZigbeeEP(endpoint) {
45
_device_id = ESP_ZB_HA_COLOR_DIMMABLE_LIGHT_DEVICE_ID;
@@ -147,4 +148,6 @@ void ZigbeeColorDimmableLight::setColorSaturation(uint8_t value) {
147148
void ZigbeeColorDimmableLight::setColorHue(uint8_t value) {
148149
//set color hue
149150
log_v("Function not overwritten, set color hue: %d", value);
150-
}
151+
}
152+
153+
#endif //SOC_IEEE802154_SUPPORTED

libraries/Zigbee/src/ep/ZigbeeColorDimmableLight.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
#pragma once
44

5+
#include "soc/soc_caps.h"
6+
#if SOC_IEEE802154_SUPPORTED
7+
58
#include "ZigbeeEP.h"
69
#include "ha/esp_zigbee_ha_standard.h"
710

@@ -28,4 +31,6 @@ class ZigbeeColorDimmableLight : public ZigbeeEP {
2831
private:
2932
void attribute_set(const esp_zb_zcl_set_attr_value_message_t *message) override;
3033

31-
};
34+
};
35+
36+
#endif //SOC_IEEE802154_SUPPORTED

libraries/Zigbee/src/ep/ZigbeeColorDimmerSwitch.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "ZigbeeColorDimmerSwitch.h"
2+
#if SOC_IEEE802154_SUPPORTED
23

34
// Initialize the static instance pointer
45
ZigbeeColorDimmerSwitch* ZigbeeColorDimmerSwitch::_instance = nullptr;
@@ -405,3 +406,4 @@ void ZigbeeColorDimmerSwitch::setLightColor(uint8_t red, uint8_t green, uint8_t
405406
}
406407
}
407408

409+
#endif //SOC_IEEE802154_SUPPORTED

libraries/Zigbee/src/ep/ZigbeeColorDimmerSwitch.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
#pragma once
44

5+
#include "soc/soc_caps.h"
6+
#if SOC_IEEE802154_SUPPORTED
7+
58
#include "ZigbeeEP.h"
69
#include "ha/esp_zigbee_ha_standard.h"
710

@@ -54,3 +57,5 @@ class ZigbeeColorDimmerSwitch : public ZigbeeEP {
5457
static void find_cb(esp_zb_zdp_status_t zdo_status, uint16_t addr, uint8_t endpoint, void *user_ctx);
5558

5659
};
60+
61+
#endif //SOC_IEEE802154_SUPPORTED

libraries/Zigbee/src/ep/ZigbeeLight.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "ZigbeeLight.h"
2+
#if SOC_IEEE802154_SUPPORTED
23

34
ZigbeeLight::ZigbeeLight(uint8_t endpoint) : ZigbeeEP(endpoint) {
45
_device_id = ESP_ZB_HA_ON_OFF_LIGHT_DEVICE_ID;
@@ -61,3 +62,5 @@ void ZigbeeLight::setOffWaitTime(uint16_t value) {
6162
//set off wait time
6263
log_v("Function not overwritten, set off wait time: %d", value);
6364
}
65+
66+
#endif //SOC_IEEE802154_SUPPORTED

libraries/Zigbee/src/ep/ZigbeeLight.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
#pragma once
44

5+
#include "soc/soc_caps.h"
6+
#if SOC_IEEE802154_SUPPORTED
7+
58
#include "ZigbeeEP.h"
69
#include "ha/esp_zigbee_ha_standard.h"
710

@@ -19,4 +22,6 @@ class ZigbeeLight : public ZigbeeEP {
1922
private:
2023
void attribute_set(const esp_zb_zcl_set_attr_value_message_t *message) override;
2124

22-
};
25+
};
26+
27+
#endif //SOC_IEEE802154_SUPPORTED

libraries/Zigbee/src/ep/ZigbeeSwitch.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "ZigbeeSwitch.h"
2+
#if SOC_IEEE802154_SUPPORTED
23

34
// Initialize the static instance pointer
45
ZigbeeSwitch* ZigbeeSwitch::_instance = nullptr;
@@ -237,3 +238,5 @@ void ZigbeeSwitch::lightOnWithTimedOff(uint8_t on_off_control, uint16_t time_on,
237238
log_e("Light not bound");
238239
}
239240
}
241+
242+
#endif //SOC_IEEE802154_SUPPORTED

libraries/Zigbee/src/ep/ZigbeeSwitch.h

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
#pragma once
44

5+
#include "soc/soc_caps.h"
6+
#if SOC_IEEE802154_SUPPORTED
7+
58
#include "ZigbeeEP.h"
69
#include "ha/esp_zigbee_ha_standard.h"
710

@@ -37,13 +40,4 @@ class ZigbeeSwitch : public ZigbeeEP {
3740

3841
};
3942

40-
//NOTE:
41-
/* ON/OFF switch commands for light control */
42-
// typedef enum {
43-
// ESP_ZB_ZCL_CMD_ON_OFF_OFF_ID = 0x00, /*!< "Turn off" command. */
44-
// ESP_ZB_ZCL_CMD_ON_OFF_ON_ID = 0x01, /*!< "Turn on" command. */
45-
// ESP_ZB_ZCL_CMD_ON_OFF_TOGGLE_ID = 0x02, /*!< "Toggle state" command. */
46-
// ESP_ZB_ZCL_CMD_ON_OFF_OFF_WITH_EFFECT_ID = 0x40, /*!< "Off with effect" command. */
47-
// ESP_ZB_ZCL_CMD_ON_OFF_ON_WITH_RECALL_GLOBAL_SCENE_ID = 0x41, /*!< "On with recall global scene" command. */
48-
// ESP_ZB_ZCL_CMD_ON_OFF_ON_WITH_TIMED_OFF_ID = 0x42, /*!< "On with timed off" command. */
49-
// } esp_zb_zcl_on_off_cmd_id_t;
43+
#endif //SOC_IEEE802154_SUPPORTED

libraries/Zigbee/src/ep/ZigbeeTempSensor.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#include "ZigbeeTempSensor.h"
2+
#if SOC_IEEE802154_SUPPORTED
23

34
ZigbeeTempSensor::ZigbeeTempSensor(uint8_t endpoint) : ZigbeeEP(endpoint) {
45
_device_id = ESP_ZB_HA_TEMPERATURE_SENSOR_DEVICE_ID;
@@ -86,4 +87,6 @@ void ZigbeeTempSensor::reportTemperature() {
8687
esp_zb_zcl_report_attr_cmd_req(&report_attr_cmd);
8788
esp_zb_lock_release();
8889
log_v("Temperature report sent");
89-
}
90+
}
91+
92+
#endif //SOC_IEEE802154_SUPPORTED

libraries/Zigbee/src/ep/ZigbeeTempSensor.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
#pragma once
44

5+
#include "soc/soc_caps.h"
6+
#if SOC_IEEE802154_SUPPORTED
7+
58
#include "ZigbeeEP.h"
69
#include "ha/esp_zigbee_ha_standard.h"
710

@@ -22,4 +25,6 @@ class ZigbeeTempSensor : public ZigbeeEP {
2225
// Set the reporting interval for temperature measurement in seconds and delta (temp change in 0,01 °C)
2326
void setReporting(uint16_t min_interval, uint16_t max_interval, float delta);
2427
void reportTemperature();
25-
};
28+
};
29+
30+
#endif //SOC_IEEE802154_SUPPORTED

0 commit comments

Comments
 (0)