Commit a710f4bb authored by 薛小虎's avatar 薛小虎

fix: 添加蓝牙导航掉线函数

parent c588759b
......@@ -393,9 +393,25 @@ void Ble_MsgRec_Navi_Analysis(void )
Ble_Navi_Data.Navi_Sts, Ble_Navi_Data.Navi_Turn, Ble_Navi_Data.Navi_Dte[0], Ble_Navi_Data.Navi_Dte[1], Ble_Navi_Data.Navi_Dte[2],Ble_Navi_Data.Navi_Dte[3]);
Ble_User.Navi_Updat = 1;
Ble_User.Navi_T = 0;
}
void Ble_MsgRec_Navi_Timeout(void )
{
if(Ble_User.Navi_Updat)
{
Ble_User.Navi_T++;
if(Ble_User.Navi_T >= 100)
{
Ble_User.Navi_Updat = 0;
Ble_User.Navi_T = 0;
}
}
else
{
Ble_User.Navi_T = 0;
}
}
......@@ -411,6 +427,7 @@ void Ble_Connect_Event_Pro(void )
Ble_User.Ble_Sts = Ble_Conn;
Ble_User.Request_Navi = 0;
Ble_User.Navi_Updat = 0;
Ble_User.Navi_T = 0;
Ble_Clear_Tx_Buffer();
Ble_Clear_Rx_Buffer();
......@@ -422,6 +439,7 @@ void Ble_DisConnect_Event_Pro(void )
Ble_User.Ble_Sts = Ble_Idle;
Ble_User.Request_Navi = 0;
Ble_User.Navi_Updat = 0;
Ble_User.Navi_T = 0;
RecCtrl.RecLen = 0;
RecCtrl.TotalLen = 0;
......@@ -480,6 +498,7 @@ void Ble_User_Init(void )
Ble_User.Ble_Sts = Ble_Idle;
Ble_User.Request_Navi = 0;
Ble_User.Navi_Updat = 0;
Ble_User.Navi_T = 0;
Ble_User.UseridUpdate = 0;
RecCtrl.RecLen = 0;
......
......@@ -27,6 +27,7 @@ typedef struct
uint8_t Ble_Sts;
uint8_t Request_Navi;
uint8_t Navi_Updat;
uint8_t Navi_T;
uint8_t UseridUpdate;
}Ble_User_Control_Struct;
......@@ -222,5 +223,6 @@ void Ble_Connect_Event_Pro(void );
void Ble_DisConnect_Event_Pro(void );
void Ble_User_Init(void );
void Ble_Msg_RequestNavi_RLY(void );
void Ble_MsgRec_Navi_Timeout(void );
#endif
\ No newline at end of file
......@@ -80,7 +80,7 @@ static void Sys_Run_Tasks(void *arg)
if(SYS_RUN_TASK_100MS)
{
Ble_MsgRec_Navi_Timeout();
}
if(SYS_RUN_TASK_1000MS)
......
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