Commit 67711f5a authored by 时昊's avatar 时昊

feat:修改蓝牙电话号码显示

parent 7551ea2a
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
uint8_t Iphone_Num[20] = {0xff}; uint8_t Iphone_Num[20] = {0xff};
uint8_t number_length = 0;
const char *c_hf_evt_str[] = { const char *c_hf_evt_str[] = {
"CONNECTION_STATE_EVT", /*!< connection state changed event */ "CONNECTION_STATE_EVT", /*!< connection state changed event */
...@@ -416,18 +417,18 @@ void bt_app_hf_client_cb(esp_hf_client_cb_event_t event, esp_hf_client_cb_param_ ...@@ -416,18 +417,18 @@ void bt_app_hf_client_cb(esp_hf_client_cb_event_t event, esp_hf_client_cb_param_
} }
else else
{ {
size_t number_length = strlen(param->clip.number); number_length = strlen(param->clip.number);
if (number_length > 20) if (number_length > 20)
{ {
number_length = 20; number_length = 20;
} }
memcpy(Iphone_Num, param->clip.number, number_length); memcpy(Iphone_Num, param->clip.number, number_length);
for (int i = 0; i < sizeof(Iphone_Num); i++) // for (int i = 0; i < sizeof(Iphone_Num); i++)
{ // {
// 0xcf 为无效值不显示 // // 0xcf 为无效值不显示
//ESP_LOGI(BT_HF_TAG, "--iphone number %x", Iphone_Num[i] - 0x30); // }
} //ESP_LOGI(BT_HF_TAG, "--ipnumber_length %x", number_length);
} }
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