Skip to content

Commit 27ecf23

Browse files
Apply suggestions from code review by @lucasssvaz
Co-authored-by: Lucas Saavedra Vaz <[email protected]>
1 parent f321d43 commit 27ecf23

File tree

8 files changed

+17
-3
lines changed

8 files changed

+17
-3
lines changed

libraries/Zigbee/examples/Zigbee_Color_Dimmer_Switch/Zigbee_Color_Dimmer_Switch.ino

+3
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,9 @@ ZigbeeColorDimmerSwitch zbSwitch = ZigbeeColorDimmerSwitch(SWITCH_ENDPOINT_NUMBE
4949
void setup() {
5050

5151
Serial.begin(115200);
52+
while (!Serial) {
53+
delay(10);
54+
}
5255

5356
//Init button switch
5457
pinMode(SWITCH_PIN, INPUT);

libraries/Zigbee/examples/Zigbee_On_Off_Light/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Currently, this example supports the following targets.
1818
### Configure the Project
1919

2020
Set the LED GPIO by changing the `LED_PIN` definition. By default, the LED_PIN is `RGB_BUILTIN`.
21-
By default, the `neoPixelWrite` function is used to control the LED. You can change it to digitalWrite to control a simple LED.
21+
By default, the `rgbLedWrite` function is used to control the LED. You can change it to digitalWrite to control a simple LED.
2222

2323
#### Using Arduino IDE
2424

libraries/Zigbee/examples/Zigbee_On_Off_Switch/Zigbee_On_Off_Switch.ino

+3
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ static void enableGpioInterrupt(bool enabled) {
9696
void setup() {
9797

9898
Serial.begin(115200);
99+
while (!Serial) {
100+
delay(10);
101+
}
99102

100103
//Optional: set Zigbee device name and model
101104
zbSwitch.setManufacturerAndModel("Espressif", "ZigbeeSwitch");

libraries/Zigbee/examples/Zigbee_Scan_Networks/Zigbee_Scan_Networks.ino

+3
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ void printScannedNetworks(uint16_t networksFound) {
7575

7676
void setup() {
7777
Serial.begin(115200);
78+
while (!Serial) {
79+
delay(10);
80+
}
7881

7982
// Initialize Zigbee stack without any EPs just for scanning
8083
Zigbee.begin(role);

libraries/Zigbee/examples/Zigbee_Temperature_Sensor/Zigbee_Temperature_Sensor.ino

+3
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@ static void temp_sensor_value_update(void *arg) {
5454
void setup() {
5555

5656
Serial.begin(115200);
57+
while (!Serial) {
58+
delay(10);
59+
}
5760

5861
// Init button switch
5962
pinMode(BUTTON_PIN, INPUT);

libraries/Zigbee/examples/Zigbee_Thermostat/Zigbee_Thermostat.ino

+3
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ void recieveSensorConfig(float min_temp, float max_temp, float tolerance) {
6060
/********************* Arduino functions **************************/
6161
void setup() {
6262
Serial.begin(115200);
63+
while (!Serial) {
64+
delay(10);
65+
}
6366

6467
// Init button switch
6568
pinMode(BUTTON_PIN, INPUT);

libraries/Zigbee/library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=Zigbee
2-
version=1.0.0
2+
version=3.0.5
33
author=P-R-O-C-H-Y
44
maintainer=Jan Procházka <[email protected]>
55
sentence=Enables zigbee connection with the ESP32

libraries/Zigbee/src/ep/ZigbeeSwitch.cpp

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ void ZigbeeSwitch::bindCb(esp_zb_zdp_status_t zdo_status, void *user_ctx) {
2626
zb_device_params_t *light = (zb_device_params_t *)user_ctx;
2727
log_i("The light originating from address(0x%x) on endpoint(%d)", light->short_addr, light->endpoint);
2828
_instance->_bound_devices.push_back(light);
29-
//free(light);
3029
}
3130
_is_bound = true;
3231
}

0 commit comments

Comments
 (0)