avoid wrongly restart discovery

This commit is contained in:
jincheng 2022-06-16 14:56:29 +08:00
parent 6c5fb29c2c
commit 66e52c60f5

View File

@ -215,7 +215,9 @@ static void bt_app_gap_cb(esp_bt_gap_cb_event_t event, esp_bt_gap_cb_param_t *pa
switch (event) { switch (event) {
/* when device discovered a result, this event comes */ /* when device discovered a result, this event comes */
case ESP_BT_GAP_DISC_RES_EVT: { case ESP_BT_GAP_DISC_RES_EVT: {
if (s_a2d_state == APP_AV_STATE_DISCOVERING) {
filter_inquiry_scan_result(param); filter_inquiry_scan_result(param);
}
break; break;
} }
/* when discovery state changed, this event comes */ /* when discovery state changed, this event comes */