From 3c2094db2d07a8d1df04d78dca89cde3195a17bf Mon Sep 17 00:00:00 2001 From: rbaron Date: Fri, 9 Dec 2022 20:01:46 +0100 Subject: [PATCH] Add GitHub action --- .github/workflows/b-parasite.yml | 8 +++++++- code/nrf-connect/samples/zigbee/Kconfig | 4 ++-- code/nrf-connect/samples/zigbee/prj.conf | 3 +++ code/nrf-connect/samples/zigbee/src/main.c | 3 ++- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/workflows/b-parasite.yml b/.github/workflows/b-parasite.yml index a4cac62..4a165a8 100644 --- a/.github/workflows/b-parasite.yml +++ b/.github/workflows/b-parasite.yml @@ -71,4 +71,10 @@ jobs: with: sample-dir: code/nrf-connect/samples/ble board: bparasite_nrf52833 - output-bin: ble_nrf52833_default.hex \ No newline at end of file + output-bin: ble_nrf52833_default.hex + - name: Build zigbee_nrf528340_default.hex + uses: ./.github/actions/build_and_upload + with: + sample-dir: code/nrf-connect/samples/zigbee + board: bparasite_nrf52840 + output-bin: zigbee_nrf52840_default.hex \ No newline at end of file diff --git a/code/nrf-connect/samples/zigbee/Kconfig b/code/nrf-connect/samples/zigbee/Kconfig index 93136ee..f604209 100644 --- a/code/nrf-connect/samples/zigbee/Kconfig +++ b/code/nrf-connect/samples/zigbee/Kconfig @@ -2,8 +2,8 @@ source "Kconfig.zephyr" config PRST_ZB_SLEEP_DURATION_SEC int "Sleep duration between waking up and reading sensors (in seconds)" - default 300 + default 60 config PRST_ZB_PARENT_POLL_INTERVAL_SEC int "Interval for when b-parasite polls its parent for data (in seconds)" - default 300 \ No newline at end of file + default 60 \ No newline at end of file diff --git a/code/nrf-connect/samples/zigbee/prj.conf b/code/nrf-connect/samples/zigbee/prj.conf index 4a91f5d..552b18f 100644 --- a/code/nrf-connect/samples/zigbee/prj.conf +++ b/code/nrf-connect/samples/zigbee/prj.conf @@ -41,3 +41,6 @@ CONFIG_ZIGBEE_CHANNEL_SELECTION_MODE_MULTI=y # Enable API for powering down unused RAM parts. # https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.7.1/nrf/ug_zigbee_configuring.html#power-saving-during-sleep CONFIG_RAM_POWER_DOWN_LIBRARY=y + +# Config options in Kconfig. +# CONFIG_PRST_ZB_SLEEP_DURATION_SEC=5 diff --git a/code/nrf-connect/samples/zigbee/src/main.c b/code/nrf-connect/samples/zigbee/src/main.c index 1dca231..f5b87e2 100644 --- a/code/nrf-connect/samples/zigbee/src/main.c +++ b/code/nrf-connect/samples/zigbee/src/main.c @@ -167,7 +167,8 @@ int main(void) { RET_IF_ERR(prst_led_flash(2)); - zb_zdo_pim_set_long_poll_interval(CONFIG_PRST_ZB_PARENT_POLL_INTERVAL_SEC); + zb_zdo_pim_set_long_poll_interval( + ZB_TIME_ONE_SECOND * CONFIG_PRST_ZB_PARENT_POLL_INTERVAL_SEC); power_down_unused_ram(); zigbee_enable();