Commit 118b0c1f authored by 王金亮's avatar 王金亮

🐞 fix:此处修改无用,改为之前的版本

parent a6cbe34f
...@@ -252,9 +252,11 @@ void bt_app_hf_client_cb(esp_hf_client_cb_event_t event, esp_hf_client_cb_param_ ...@@ -252,9 +252,11 @@ void bt_app_hf_client_cb(esp_hf_client_cb_event_t event, esp_hf_client_cb_param_
if(param->conn_stat.state == 0) if(param->conn_stat.state == 0)
{ {
BT_DisConnect_Event_Pro();
} }
else if(param->conn_stat.state == 2) else if(param->conn_stat.state == 2)
{ {
BT_Connect_Event_Pro();
} }
break; break;
} }
......
...@@ -186,16 +186,19 @@ void esp_bt_gap_cb(esp_bt_gap_cb_event_t event, esp_bt_gap_cb_param_t *param) ...@@ -186,16 +186,19 @@ void esp_bt_gap_cb(esp_bt_gap_cb_event_t event, esp_bt_gap_cb_param_t *param)
case ESP_BT_GAP_ACL_CONN_CMPL_STAT_EVT: case ESP_BT_GAP_ACL_CONN_CMPL_STAT_EVT:
if (param->acl_conn_cmpl_stat.stat == ESP_BT_STATUS_SUCCESS) // ESP_LOGE(BT_HF_TAG, "BT CONN");
// printf("stat :%d \r\n",param->acl_conn_cmpl_stat.stat);
if (param->acl_conn_cmpl_stat.stat == ESP_BT_STATUS_HCI_SUCCESS)
{ {
BT_Connect_Event_Pro(); // BT_Connect_Event_Pro();
ESP_LOGI(BT_HF_TAG, "BT CONN"); ESP_LOGI(BT_HF_TAG, "BT CONN");
} }
break; break;
/* when ACL disconnection completed, this event comes */ /* when ACL disconnection completed, this event comes */
case ESP_BT_GAP_ACL_DISCONN_CMPL_STAT_EVT: case ESP_BT_GAP_ACL_DISCONN_CMPL_STAT_EVT:
ESP_LOGW(BT_HF_TAG, "BT DISCONN REASON %x", param->acl_disconn_cmpl_stat.reason); // ESP_LOGW(BT_HF_TAG, "BT DISCONN REASON %x", param->acl_disconn_cmpl_stat.reason);
BT_DisConnect_Event_Pro(); // BT_DisConnect_Event_Pro();
BT_User.BT_DisConnReason = param->acl_disconn_cmpl_stat.reason; BT_User.BT_DisConnReason = param->acl_disconn_cmpl_stat.reason;
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment