Skip to content

Commit

Permalink
Allow toggle nwk steering from button
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerivec committed Nov 21, 2024
1 parent d5b2b94 commit aa4acd2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/zigbee_router/app.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,13 @@ static void button_event_handler(sl_zigbee_af_event_t *event)
}
} else if (state == SL_ZIGBEE_NO_NETWORK) {
if (button_long_press) {
sl_zigbee_app_debug_println("Btn long press: nwk down: reboot btl");
bootloader_rebootAndInstall();
} else {
if (!sl_zigbee_af_event_is_scheduled(&commissioning_event)) {
if (sl_zigbee_af_event_is_scheduled(&commissioning_event)) {
sl_zigbee_app_debug_println("Btn press: nwk down: stop nwk steering");
sl_zigbee_af_event_set_inactive(&commissioning_event);
} else {
sl_zigbee_app_debug_println("Btn press: nwk down: start nwk steering");
sl_zigbee_af_event_set_active(&commissioning_event);
}
Expand Down

0 comments on commit aa4acd2

Please sign in to comment.