Skip to content

Commit

Permalink
samples: demo app disable notify in dfu mode
Browse files Browse the repository at this point in the history
[KRKNWK-18804]

Signed-off-by: Krzysztof Taborowski <krzysztof.taborowski@nordicsemi.no>
  • Loading branch information
ktaborowski committed Apr 11, 2024
1 parent 529610c commit 5ecca2c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions samples/sid_end_device/src/sensor_monitoring/app.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,20 @@ static void sidewalk_btn_handler(uint32_t event)
int err = sidewalk_event_send((sidewalk_event_t)event, NULL);
if (err) {
LOG_ERR("Send event err %d", err);
return;
};

if (SID_EVENT_NORDIC_DFU == event) {
static bool in_dfu;
if (in_dfu) {
in_dfu = false;
k_timer_start(&notify_timer, K_MSEC(NOTIFY_TIMER_DURATION_MS),
K_MSEC(CONFIG_SID_END_DEVICE_NOTIFY_DATA_PERIOD_MS));
} else {
in_dfu = true;
k_timer_stop(&notify_timer);
}
}
}

static int app_buttons_init(void)
Expand Down

0 comments on commit 5ecca2c

Please sign in to comment.