Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Q
QJ_500-7c
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
时昊
QJ_500-7c
Commits
a710f4bb
Commit
a710f4bb
authored
May 05, 2024
by
薛小虎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 添加蓝牙导航掉线函数
parent
c588759b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
2 deletions
+23
-2
app_Ble_User.c
qianjiang/main/app_Ble_User.c
+20
-1
app_Ble_User.h
qianjiang/main/app_Ble_User.h
+2
-0
main_user.c
qianjiang/main/main_user.c
+1
-1
No files found.
qianjiang/main/app_Ble_User.c
View file @
a710f4bb
...
...
@@ -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
;
...
...
qianjiang/main/app_Ble_User.h
View file @
a710f4bb
...
...
@@ -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
qianjiang/main/main_user.c
View file @
a710f4bb
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment