Commit 31e1853f authored by 薛小虎's avatar 薛小虎

test:UART任务添加心跳打印

parent 4ac0ea63
...@@ -28,7 +28,7 @@ void BT_Connect_Event_Pro(void ) ...@@ -28,7 +28,7 @@ void BT_Connect_Event_Pro(void )
BT_User.Call_Sts = Call_Idle; BT_User.Call_Sts = Call_Idle;
BT_User.ReconnTime = BT_ReConn_T - 500; BT_User.ReconnTime = BT_ReConn_T - 500;
BT_User.HF_Ctrl = HF_Idle; BT_User.HF_Ctrl = HF_Idle;
printf("TB CONN\r\n"); // printf("TB CONN\r\n");
} }
...@@ -38,7 +38,7 @@ void BT_DisConnect_Event_Pro(void ) ...@@ -38,7 +38,7 @@ void BT_DisConnect_Event_Pro(void )
BT_User.Call_Sts = Call_Idle; BT_User.Call_Sts = Call_Idle;
BT_User.ReconnTime = BT_ReConn_T - 500; BT_User.ReconnTime = BT_ReConn_T - 500;
BT_User.HF_Ctrl = HF_Idle; BT_User.HF_Ctrl = HF_Idle;
printf("TB DISCONN\r\n"); // printf("TB DISCONN\r\n");
} }
void BT_User_Process(void ) void BT_User_Process(void )
...@@ -88,13 +88,13 @@ void BT_User_Process(void ) ...@@ -88,13 +88,13 @@ void BT_User_Process(void )
BT_User.ReconnTime++; BT_User.ReconnTime++;
if(BT_User.ReconnTime >= BT_ReConn_T) if(BT_User.ReconnTime >= BT_ReConn_T)
{ {
printf("Connect Start.................\n"); // printf("Connect Start.................\n");
if(app_BT_Get_BondDev() == 1) if(app_BT_Get_BondDev() == 1)
{ {
esp_hf_client_connect(peer_addr); esp_hf_client_connect(peer_addr);
} }
printf("Connect Over\n"); // printf("Connect Over\n");
BT_User.ReconnTime = 0; BT_User.ReconnTime = 0;
} }
......
...@@ -414,7 +414,7 @@ void Ble_MsgRec_Navi_Analysis(void ) ...@@ -414,7 +414,7 @@ void Ble_MsgRec_Navi_Analysis(void )
aaa |= Ble_Navi_Data.Navi_Dte[0]; aaa |= Ble_Navi_Data.Navi_Dte[0];
printf("navi sts = %x; navi turn = %d; navi dest = %ld\n", Ble_Navi_Data.Navi_Sts, Ble_Navi_Data.Navi_Turn, aaa); // printf("navi sts = %x; navi turn = %d; navi dest = %ld\n", Ble_Navi_Data.Navi_Sts, Ble_Navi_Data.Navi_Turn, aaa);
// printf("Navi sts %d Navi_Turn %x Navi_Dte0 %x Navi_Dte1 %x Navi_Dte2 %x Navi_Dte3 %x\r\n", // printf("Navi sts %d Navi_Turn %x Navi_Dte0 %x Navi_Dte1 %x Navi_Dte2 %x Navi_Dte3 %x\r\n",
......
...@@ -87,7 +87,7 @@ int bsp_Uart_Send_Data(uint8_t * data , unsigned int len) ...@@ -87,7 +87,7 @@ int bsp_Uart_Send_Data(uint8_t * data , unsigned int len)
} }
uint16_t testcnt1;
static void Uart_Rx_Task(void *arg) static void Uart_Rx_Task(void *arg)
{ {
uint8_t* data = (uint8_t*) malloc(RX_BUF_SIZE+1); uint8_t* data = (uint8_t*) malloc(RX_BUF_SIZE+1);
...@@ -101,6 +101,16 @@ static void Uart_Rx_Task(void *arg) ...@@ -101,6 +101,16 @@ static void Uart_Rx_Task(void *arg)
UART_Put(data[i]); UART_Put(data[i]);
} }
} }
if(testcnt1 <= 150)
{
testcnt1++;
}
else
{
testcnt1 = 0;
ESP_LOGI("UART", "HEART");
}
} }
free(data); free(data);
} }
......
...@@ -95,8 +95,10 @@ static void Sys_Run_Tasks(void *arg) ...@@ -95,8 +95,10 @@ static void Sys_Run_Tasks(void *arg)
{ {
testcnt = 0; testcnt = 0;
printf("BT_User.BT_Sts = %d\r\n", BT_User.BT_Sts); // printf("BT_User.BT_Sts = %d\r\n", BT_User.BT_Sts);
printf("Ble_User.Ble_Sts = %d\r\n", Ble_User.Ble_Sts); // printf("Ble_User.Ble_Sts = %d\r\n", Ble_User.Ble_Sts);
ESP_LOGI("SYS RUN", "HEART");
// esp_log_buffer_hex(TAG, peer_addr, 6); // esp_log_buffer_hex(TAG, peer_addr, 6);
......
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