Skip to content

Commit b4a1ec4

Browse files
committed
ota: fix missing AUDIO_PLAYER_IDLE_BIT in os_pwr_reset_wait()
1 parent c85038c commit b4a1ec4

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

main/src/user/ota.c

+8-1
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,8 @@ void ota_exec(const char *data, uint32_t len)
294294
#endif
295295
}
296296

297+
esp_bt_gap_set_scan_mode(ESP_BT_NON_CONNECTABLE, ESP_BT_NON_DISCOVERABLE);
298+
297299
EventBits_t uxBits = xEventGroupGetBits(user_event_group);
298300
if (!(uxBits & BT_A2DP_IDLE_BIT)) {
299301
esp_a2d_sink_disconnect(a2d_remote_bda);
@@ -302,7 +304,12 @@ void ota_exec(const char *data, uint32_t len)
302304
esp_ble_gatts_close(gatts_profile_tbl[PROFILE_IDX_OTA].gatts_if,
303305
gatts_profile_tbl[PROFILE_IDX_OTA].conn_id);
304306

305-
os_pwr_reset_wait(BT_A2DP_IDLE_BIT | BLE_GATTS_IDLE_BIT);
307+
os_pwr_reset_wait(
308+
BT_A2DP_IDLE_BIT | BLE_GATTS_IDLE_BIT
309+
#ifdef CONFIG_ENABLE_AUDIO_PROMPT
310+
| AUDIO_PLAYER_IDLE_BIT
311+
#endif
312+
);
306313

307314
update_handle = 0;
308315

0 commit comments

Comments
 (0)