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

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

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