Commit 12523274 authored by 时昊's avatar 时昊

feat:修改发送胎压数据,收到就会发送

parent ab80e4bc
......@@ -379,14 +379,14 @@ void Uart_Send_Id01_Pro(void)
// //
// }
if(arraysEqual(ID01_Backup, ID01, 64) == 1)//相等
{
//printf("send 相等 \r\n");
}
else
// if(arraysEqual(ID01_Backup, ID01, 64) == 1)//相等
// {
// //printf("send 相等 \r\n");
// }
// else
{
Protocol_Send(0x01,ID01,ID01_Len);
memcpy(ID01_Backup, ID01, 64);
//memcpy(ID01_Backup, ID01, 64);
}
......
......@@ -353,7 +353,7 @@ static void esp_gap_cb(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *par
//esp_log_buffer_hex(GATTC_TAG, scan_result->scan_rst.bda, 6);//尤其是当你需要查看设备地址、UUID ,Mac地址。
//if((scan_result->scan_rst.bda[4] == 0x22)||(scan_result->scan_rst.bda[4] == 0x1c))
{
//{
//ESP_LOGI(GATTC_TAG, "searched Adv Data Len %d, Scan Response Len %d", scan_result->scan_rst.adv_data_len, scan_result->scan_rst.scan_rsp_len);
//adv_name = esp_ble_resolve_adv_data(scan_result->scan_rst.ble_adv,ESP_BLE_AD_TYPE_NAME_CMPL, &adv_name_len);
......@@ -393,11 +393,14 @@ static void esp_gap_cb(esp_gap_ble_cb_event_t event, esp_ble_gap_cb_param_t *par
for(i = 0; i < scan_result->scan_rst.adv_data_len; i++)
{
ID01[i] = scan_result->scan_rst.ble_adv[i];
}
}
// else
// {
// memset(ID01, 0, sizeof(ID01));
// }
//printf("地址:%x \r\n",scan_result->scan_rst.bda[4]);
}
//}
#if CONFIG_EXAMPLE_DUMP_ADV_DATA_AND_SCAN_RESP
if (scan_result->scan_rst.adv_data_len > 0) {
......
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