mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
fix(nimble): Fixed assert issue in proximity_sensor example
This commit is contained in:
parent
d7bf5a1eac
commit
71ad2918aa
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2017-2023 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2017-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -183,12 +183,14 @@ ble_prox_prph_gap_event(struct ble_gap_event *event, void *arg)
|
||||
event->connect.status == 0 ? "established" : "failed",
|
||||
event->connect.status);
|
||||
|
||||
/* resume advertising */
|
||||
if (event->connect.status != 0) {
|
||||
/* Connection failed, resume advertising */
|
||||
#if CONFIG_EXAMPLE_EXTENDED_ADV
|
||||
ext_ble_prox_prph_advertise();
|
||||
ext_ble_prox_prph_advertise();
|
||||
#else
|
||||
ble_prox_prph_advertise();
|
||||
ble_prox_prph_advertise();
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
|
||||
case BLE_GAP_EVENT_DISCONNECT:
|
||||
|
Loading…
Reference in New Issue
Block a user