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
40545edd
Commit
40545edd
authored
Sep 11, 2024
by
薛小虎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改自动重连函数,解决内存泄漏问题;修改为每30s自动重连一次
parent
1a210b50
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
app_BT_User.c
qianjiang/main/app_BT_User.c
+4
-4
bt_app_main.c
qianjiang/main/bt_app_main.c
+5
-0
No files found.
qianjiang/main/app_BT_User.c
View file @
40545edd
...
...
@@ -11,13 +11,13 @@ extern esp_bd_addr_t peer_addr;
BT_User_Control_Struct
BT_User
;
#define BT_ReConn_T 300
0
#define BT_ReConn_T 300
void
BT_User_Init
(
void
)
{
BT_User
.
BT_Sts
=
BT_Idle
;
BT_User
.
Call_Sts
=
Call_Idle
;
BT_User
.
ReconnTime
=
BT_ReConn_T
-
50
0
;
BT_User
.
ReconnTime
=
BT_ReConn_T
-
50
;
BT_User
.
HF_Ctrl
=
HF_Idle
;
}
...
...
@@ -26,7 +26,7 @@ void BT_Connect_Event_Pro(void )
{
BT_User
.
BT_Sts
=
BT_Conn
;
BT_User
.
Call_Sts
=
Call_Idle
;
BT_User
.
ReconnTime
=
BT_ReConn_T
-
50
0
;
BT_User
.
ReconnTime
=
BT_ReConn_T
-
50
;
BT_User
.
HF_Ctrl
=
HF_Idle
;
// printf("TB CONN\r\n");
}
...
...
@@ -36,7 +36,7 @@ void BT_DisConnect_Event_Pro(void )
{
BT_User
.
BT_Sts
=
BT_Idle
;
BT_User
.
Call_Sts
=
Call_Idle
;
BT_User
.
ReconnTime
=
BT_ReConn_T
-
50
0
;
BT_User
.
ReconnTime
=
BT_ReConn_T
-
50
;
BT_User
.
HF_Ctrl
=
HF_Idle
;
// printf("TB DISCONN\r\n");
}
...
...
qianjiang/main/bt_app_main.c
View file @
40545edd
...
...
@@ -56,6 +56,11 @@ uint8_t app_BT_Get_BondDev(void )
}
}
if
(
dev_list
!=
NULL
)
{
free
(
dev_list
);
}
ret
=
1
;
}
else
...
...
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