File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -138,14 +138,15 @@ static void bt_av_hdl_a2d_evt(uint16_t event, void *p_param)
138138 esp_bt_gap_set_scan_mode (ESP_BT_CONNECTABLE , ESP_BT_GENERAL_DISCOVERABLE );
139139 }
140140
141+ if (!(uxBits & BT_A2DP_IDLE_BIT )) {
141142#ifdef CONFIG_ENABLE_AUDIO_PROMPT
142- audio_player_play_file (MP3_FILE_IDX_DISCONNECTED );
143+ audio_player_play_file (MP3_FILE_IDX_DISCONNECTED );
143144#endif
144145#ifdef CONFIG_ENABLE_LED
145- led_set_mode (LED_MODE_IDX_BLINK_M0 );
146+ led_set_mode (LED_MODE_IDX_BLINK_M0 );
146147#endif
147-
148- xEventGroupSetBits ( user_event_group , BT_A2DP_IDLE_BIT );
148+ xEventGroupSetBits ( user_event_group , BT_A2DP_IDLE_BIT );
149+ }
149150 } else if (a2d -> conn_stat .state == ESP_A2D_CONNECTION_STATE_CONNECTED ) {
150151 xEventGroupClearBits (user_event_group , BT_A2DP_IDLE_BIT );
151152
You can’t perform that action at this time.
0 commit comments