From 51b15ea90deb909c2051312aca0aa4ffac3337fa Mon Sep 17 00:00:00 2001 From: Foxushka <135865149+Foxushka@users.noreply.github.com> Date: Wed, 30 Aug 2023 18:49:05 +0000 Subject: [PATCH] Fix Chameleon crashes in BLE pairing --- firmware/application/src/ble_main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/firmware/application/src/ble_main.c b/firmware/application/src/ble_main.c index ba09a8e..bca49a2 100644 --- a/firmware/application/src/ble_main.c +++ b/firmware/application/src/ble_main.c @@ -708,11 +708,11 @@ void saadc_event_handler(nrf_drv_saadc_evt_t const *p_event) { // if battery service is notification enable, we can send msg to device. err_code = ble_bas_battery_level_update(&m_bas, percentage_batt_lvl, BLE_CONN_HANDLE_ALL); if ((err_code != NRF_SUCCESS) && - (err_code != NRF_ERROR_INVALID_STATE) && - (err_code != NRF_ERROR_RESOURCES) && - (err_code != NRF_ERROR_BUSY) && - (err_code != BLE_ERROR_GATTS_SYS_ATTR_MISSING) - ) { + (err_code != NRF_ERROR_INVALID_STATE) && + (err_code != NRF_ERROR_RESOURCES) && + (err_code != NRF_ERROR_BUSY) && + (err_code != NRF_ERROR_FORBIDDEN) && + (err_code != BLE_ERROR_GATTS_SYS_ATTR_MISSING)) { APP_ERROR_HANDLER(err_code); }