Commit 68c9a9f1 authored by 李茂军's avatar 李茂军

解决冲突

parents 2fc7171c 79378b94
...@@ -9,5 +9,6 @@ idf_component_register(SRCS "mcudata.c" "app_BT_User.c" "bt_app_main.c" "bt_app_ ...@@ -9,5 +9,6 @@ idf_component_register(SRCS "mcudata.c" "app_BT_User.c" "bt_app_main.c" "bt_app_
"app_Ble_User.c" "app_Ble_User.c"
"main_user.c" "main_user.c"
"../source/wifi" "../source/wifi"
"gattc_demo.c"
INCLUDE_DIRS "." INCLUDE_DIRS "."
EMBED_TXTFILES ${project_dir}/server_certs/ca_cert.pem) EMBED_TXTFILES ${project_dir}/server_certs/ca_cert.pem)
...@@ -215,7 +215,7 @@ extern void wifiServiceStart(void); ...@@ -215,7 +215,7 @@ extern void wifiServiceStart(void);
uint32_t SwitchMode=0; uint32_t SwitchMode=0;
static void Protocol_UartHandle(const Protocol_Data_t *pData)//esp接收底板数据 static void Protocol_UartHandle(const Protocol_Data_t *pData)//esp接收底板数据
{ {
if ( pData->CmdID == 0x20 )//收到底板发送的数据后,传状态 if ( pData->CmdID == 0x20 )//收到底板发送的数据后,才会发送0x12,0x01,0x02的id
{ {
//printf("0x20 is get\r\n"); //printf("0x20 is get\r\n");
if(Prot_User.State < Prot_Start) if(Prot_User.State < Prot_Start)
...@@ -243,22 +243,22 @@ static void Protocol_UartHandle(const Protocol_Data_t *pData)//esp接收底板 ...@@ -243,22 +243,22 @@ static void Protocol_UartHandle(const Protocol_Data_t *pData)//esp接收底板
BT_User.HF_Ctrl = pData->Data[0];//esp32接收到的数据 BT_User.HF_Ctrl = pData->Data[0];//esp32接收到的数据
} }
if(strncmp((const char *) ble_uerid, (const char *)&(pData->Data[1]), 32) != 0) // if(strncmp((const char *) ble_uerid, (const char *)&(pData->Data[1]), 32) != 0)
{ // {
memcpy(( uint8_t * )ble_uerid, (uint8_t *)&(pData->Data[1]), 32); // memcpy(( uint8_t * )ble_uerid, (uint8_t *)&(pData->Data[1]), 32);
} // }
// esp_log_buffer_hex(TAG, ble_uerid, 32); // // esp_log_buffer_hex(TAG, ble_uerid, 32);
// esp_log_buffer_hex(TAG, &(pData->Data[1]), 32); // // esp_log_buffer_hex(TAG, &(pData->Data[1]), 32);
if(Ble_User.UseridUpdate == 0) // if(Ble_User.UseridUpdate == 0)
{ // {
bsp_Ble_Init(); // bsp_Ble_Init();
printf("get uuid and init ble!!! \r\n"); // printf("get uuid and init ble!!! \r\n");
} // }
Ble_User.UseridUpdate = 0xAA; // Ble_User.UseridUpdate = 0xAA;
} }
} }
} }
...@@ -334,19 +334,26 @@ void Uart_Send_Id12_Pro(void )//收到底板回复的0x20后,发送蓝牙类型 ...@@ -334,19 +334,26 @@ void Uart_Send_Id12_Pro(void )//收到底板回复的0x20后,发送蓝牙类型
void Uart_Send_Id01_Pro(void) void Uart_Send_Id01_Pro(void)
{ {
uint8_t ID01[6] = {0x00,0x00,0x00,0x00,0x00,0x00}; uint8_t ID01[7] = {0x00,0x00,0x00,0x00,0x00,0x00};
if(Ble_User.Tpms_Updat) //if(Ble_User.Tpms_Updat)
{ {
ID01[0] = Ble_Tpms_Data.Tpms_Sts; // ID01[0] = Ble_Tpms_Data.Tpms_Sts;
ID01[1] = Ble_Tpms_Data.Tpms_Turn; // ID01[1] = Ble_Tpms_Data.Tpms_Turn;
ID01[2] = Ble_Tpms_Data.Tpms_Dte[0]; // ID01[2] = Ble_Tpms_Data.Tpms_Dte[0];
ID01[3] = Ble_Tpms_Data.Tpms_Dte[1]; // ID01[3] = Ble_Tpms_Data.Tpms_Dte[1];
ID01[4] = Ble_Tpms_Data.Tpms_Dte[2]; // ID01[4] = Ble_Tpms_Data.Tpms_Dte[2];
ID01[5] = Ble_Tpms_Data.Tpms_Dte[3]; // ID01[5] = Ble_Tpms_Data.Tpms_Dte[3];
ID01[0] = 0xFF;//胎压状态
ID01[1] = 1;//前轮高字节气压值
ID01[2] = 200;//前轮低字节气压值
ID01[3] = 0x28;//前轮胎压温度
ID01[4] = 1;//后轮高字节气压值
ID01[5] = 45;//后轮低字节气压值
ID01[6] = 0xAB;//后轮胎压温度
//printf("转向编码:%d\r\n",Ble_Tpms_Data.Tpms_Turn); //printf("转向编码:%d\r\n",Ble_Tpms_Data.Tpms_Turn);
} }
Protocol_Send(0x01,ID01,6); Protocol_Send(0x01,ID01,7);
} }
...@@ -369,20 +376,21 @@ void Prot_Send_Msg_Process(void ) ...@@ -369,20 +376,21 @@ void Prot_Send_Msg_Process(void )
// printf("send 0x10 \r\n"); // printf("send 0x10 \r\n");
} }
if(Prot_User.State >= Prot_Start) //printf("Prot_User.State = %d\r\n",Prot_User.State);
if(Prot_User.State >= Prot_Start)//收到底板发送的0x20后,才执行
{ {
if(Prot_User.TimeDelay == 0) if(Prot_User.TimeDelay == 0)
{ {
Uart_Send_Id12_Pro(); Uart_Send_Id12_Pro();
Prot_User.TimeDelay++; Prot_User.TimeDelay++;
// printf("send 0x12 \r\n"); //printf("send 0x12 \r\n");
} }
else else
{ {
Uart_Send_Id01_Pro(); Uart_Send_Id01_Pro();
Uart_Send_Id02_Pro(); Uart_Send_Id02_Pro();
Prot_User.TimeDelay = 0; Prot_User.TimeDelay = 0;
//printf("send 0x01 0x02 \r\n"); //printf("send 0x01 0x02 \r\n");
} }
} }
} }
......
...@@ -75,62 +75,7 @@ uint8_t Ble_Get_User_Info(void ) ...@@ -75,62 +75,7 @@ uint8_t Ble_Get_User_Info(void )
{ {
uint8_t i = 0; uint8_t i = 0;
uint8_t ret = 0; uint8_t ret = 0;
// for(i = 24; i<32;i++)
// {
// ble_uerid[i] = 0x30+i-24;
// ble_pwd[i] = 0x30+i-24;
// }
// ble_uerid[0] = 'v';
// ble_uerid[1] = 'i';
// ble_uerid[2] = 'v';
// ble_uerid[3] = 'a';
// ble_uerid[4] = 'v';
// ble_uerid[5] = 'i';
// ble_uerid[6] = 'v';
// ble_uerid[7] = 'a';
// ble_uerid[8] = 'v';
// ble_uerid[9] = 'i';
// ble_uerid[10] = 'v';
// ble_uerid[11] = 'a';
// ble_uerid[12] = 'v';
// ble_uerid[13] = 'i';
// ble_uerid[14] = 'v';
// ble_uerid[15] = 'a';
// ble_uerid[16] = 'v';
// ble_uerid[17] = 'i';
// ble_uerid[18] = 'v';
// ble_uerid[19] = 'a';
// ble_uerid[20] = 'v';
// ble_uerid[21] = 'i';
// ble_uerid[22] = 'v';
// ble_uerid[23] = 'a';
// ble_pwd[0] = 'C';
// ble_pwd[1] = 'C';
// ble_pwd[2] = 'N';
// ble_pwd[3] = 'C';
// ble_pwd[4] = 'v';
// ble_pwd[5] = 'i';
// ble_pwd[6] = 'v';
// ble_pwd[7] = 'a';
// ble_pwd[8] = 'v';
// ble_pwd[9] = 'i';
// ble_pwd[10] = 'v';
// ble_pwd[11] = 'a';
// ble_pwd[12] = 'v';
// ble_pwd[13] = 'i';
// ble_pwd[14] = 'v';
// ble_pwd[15] = 'a';
// ble_pwd[16] = 'v';
// ble_pwd[17] = 'i';
// ble_pwd[18] = 'v';
// ble_pwd[19] = 'a';
// ble_pwd[20] = 'v';
// ble_pwd[21] = 'i';
// ble_pwd[22] = 'v';
// ble_pwd[23] = 'a';
if(Ble_User.UseridUpdate) if(Ble_User.UseridUpdate)
{ {
......
...@@ -9,4 +9,5 @@ ...@@ -9,4 +9,5 @@
void bsp_BT_Init(void); void bsp_BT_Init(void);
uint8_t app_BT_Get_BondDev(void ); uint8_t app_BT_Get_BondDev(void );
void app_tpms_main(void);
#endif #endif
\ No newline at end of file
This diff is collapsed.
...@@ -155,7 +155,8 @@ void app_main(void) ...@@ -155,7 +155,8 @@ void app_main(void)
Ble_User_Init(); Ble_User_Init();
Get_Mac_Init(); Get_Mac_Init();
bsp_BT_Init(); bsp_BT_Init();
bsp_Ble_Init(); // bsp_Ble_Init();
app_tpms_main();
bsp_Uart_Init(); bsp_Uart_Init();
printf("KL30 INIT OVER~~~~~~\r\n"); printf("KL30 INIT OVER~~~~~~\r\n");
...@@ -167,8 +168,8 @@ void app_main(void) ...@@ -167,8 +168,8 @@ void app_main(void)
void delele_tasks(void) void delele_tasks(void)
{ {
vTaskSuspend(Sys_Run_Taskshdl); // vTaskSuspend(Sys_Run_Taskshdl);
vTaskSuspend(Ble_User_Task_hdl); // vTaskSuspend(Ble_User_Task_hdl);
bt_app_task_shut_down( ); // bt_app_task_shut_down( );
vTaskDelay(pdMS_TO_TICKS(100)); // vTaskDelay(pdMS_TO_TICKS(100));
} }
...@@ -308,8 +308,8 @@ CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 ...@@ -308,8 +308,8 @@ CONFIG_ESPTOOLPY_MONITOR_BAUD=115200
# CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE is not set # CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE is not set
# CONFIG_PARTITION_TABLE_TWO_OTA is not set # CONFIG_PARTITION_TABLE_TWO_OTA is not set
CONFIG_PARTITION_TABLE_CUSTOM=y CONFIG_PARTITION_TABLE_CUSTOM=y
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="QJ500_7C_partitions_two_ota.csv" CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="RT200T-2_partitions_two_ota.csv"
CONFIG_PARTITION_TABLE_FILENAME="QJ500_7C_partitions_two_ota.csv" CONFIG_PARTITION_TABLE_FILENAME="RT200T-2_partitions_two_ota.csv"
CONFIG_PARTITION_TABLE_OFFSET=0xA000 CONFIG_PARTITION_TABLE_OFFSET=0xA000
CONFIG_PARTITION_TABLE_MD5=y CONFIG_PARTITION_TABLE_MD5=y
# end of Partition Table # end of Partition Table
...@@ -317,7 +317,7 @@ CONFIG_PARTITION_TABLE_MD5=y ...@@ -317,7 +317,7 @@ CONFIG_PARTITION_TABLE_MD5=y
# #
# Example Configuration # Example Configuration
# #
CONFIG_EXAMPLE_FIRMWARE_UPGRADE_URL="http://192.168.137.1:3200/Qj500-7C.bin" CONFIG_EXAMPLE_FIRMWARE_UPGRADE_URL="http://192.168.137.1:3200/RT200T-2.bin"
# CONFIG_EXAMPLE_USE_CERT_BUNDLE is not set # CONFIG_EXAMPLE_USE_CERT_BUNDLE is not set
CONFIG_EXAMPLE_SKIP_COMMON_NAME_CHECK=y CONFIG_EXAMPLE_SKIP_COMMON_NAME_CHECK=y
# CONFIG_EXAMPLE_FIRMWARE_UPGRADE_BIND_IF is not set # CONFIG_EXAMPLE_FIRMWARE_UPGRADE_BIND_IF is not set
...@@ -1355,7 +1355,7 @@ CONFIG_LOG_TIMESTAMP_SOURCE_RTOS=y ...@@ -1355,7 +1355,7 @@ CONFIG_LOG_TIMESTAMP_SOURCE_RTOS=y
# #
# LWIP # LWIP
# #
CONFIG_LWIP_LOCAL_HOSTNAME="QJ500-7C" CONFIG_LWIP_LOCAL_HOSTNAME="RT200T-2"
# CONFIG_LWIP_NETIF_API is not set # CONFIG_LWIP_NETIF_API is not set
CONFIG_LWIP_TCPIP_TASK_PRIO=18 CONFIG_LWIP_TCPIP_TASK_PRIO=18
# CONFIG_LWIP_TCPIP_CORE_LOCKING is not set # CONFIG_LWIP_TCPIP_CORE_LOCKING is not set
......
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