Commit 12e76fcb authored by 时昊's avatar 时昊

feat:修改串口发送蓝牙数据,直接转发,不经过数组拷贝

parent 45c248c4
......@@ -346,12 +346,12 @@ uint8_t arraysEqual(uint8_t arr1[], uint8_t arr2[], uint8_t size)
return 1; // 相等,返回1(或true)
}
extern uint8_t ID01[64];
extern uint8_t ID01_Len;
uint8_t ID01_Backup[64] = {0};
// extern uint8_t ID01[64];
// extern uint8_t ID01_Len;
// uint8_t ID01_Backup[64] = {0};
void Uart_Send_Id01_Pro(void)
{
uint8_t i = 0;
// uint8_t i = 0;
// //if(Ble_User.Tpms_Updat)
// {
// // ID01[0] = Ble_Tpms_Data.Tpms_Sts;
......@@ -364,9 +364,9 @@ void Uart_Send_Id01_Pro(void)
// for(i = 0; i < ID01_Len; i++)
// {
// //ID01[i] = scan_result->scan_rst.ble_adv[i];
// printf("胎压数据:%x \r\n",ID01[i]);
// printf("胎压数据:%x \n",ID01[i]);
// }
// // printf("胎压标定:%x \r\n",ID01[11]);
// // ID01[0] = 0xFF;//胎压状态
// // ID01[1] = 1;//前轮高字节气压值
......@@ -384,10 +384,10 @@ void Uart_Send_Id01_Pro(void)
// //printf("send 相等 \r\n");
// }
// else
{
Protocol_Send(0x01,ID01,ID01_Len);
//memcpy(ID01_Backup, ID01, 64);
}
// {
// // Protocol_Send(0x01,ID01,ID01_Len);
// //memcpy(ID01_Backup, ID01, 64);
// }
......@@ -404,14 +404,25 @@ void Uart_Send_Id02_Pro(void)
uint8_t ID02[22] = {0x00};
uint8_t i = 0;
ID02[0] = BT_User.Call_Sts;
if(Iphone_Num[0] < 0x30)
{
ID02[1] = number_length - 1;
for ( i = 0; i < number_length -1; i++)
{
ID02[i+2] = Iphone_Num[i+1] - 0x30;
}
}
else
{
ID02[1] = number_length;
for ( i = 0; i < number_length; i++)
{
ID02[i+2] = Iphone_Num[i] - 0x30;
}
}
Protocol_Send(0x02, ID02, number_length+2);//给底板发送电话状态,用这个标志位显示电话号
//printf("电话长度:%x \r\n",number_length);
}
......@@ -442,7 +453,7 @@ void Prot_Send_Msg_Process(void )
//printf("send 0x02 \r\n");
}
}
Uart_Send_Id01_Pro();
//Uart_Send_Id01_Pro();
}
//BAT32A239
......
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