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
07a32852
Commit
07a32852
authored
Feb 04, 2025
by
王金亮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix: 根据代码评审意见修改,蓝牙断连前先判断是否有蓝牙连接,获取最新蓝牙设备列表后,不再存入peer_addr中
parent
0bf6fdee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
app_BT_User.c
qianjiang/main/app_BT_User.c
+5
-2
No files found.
qianjiang/main/app_BT_User.c
View file @
07a32852
...
...
@@ -7,6 +7,7 @@
#include "bt_app_main.h"
#include "esp_gap_bt_api.h"
#include <string.h>
#include "app_Ble_User.h"
extern
esp_bd_addr_t
peer_addr
;
#define TAG "APP_BLE_USER"
...
...
@@ -139,7 +140,10 @@ void BT_User_Process(void )
/* */
uint8_t
ODO_Clear_BLEinfo
(
void
)
{
esp_hf_client_disconnect
(
peer_addr
);
if
(
Ble_User
.
Ble_Sts
==
Ble_Conn
)
{
esp_hf_client_disconnect
(
peer_addr
);
}
uint8_t
ret
=
0
;
uint8_t
bond_dev_num
=
esp_bt_gap_get_bond_device_num
();
...
...
@@ -149,7 +153,6 @@ uint8_t ODO_Clear_BLEinfo(void )
if
(
dev_list
!=
NULL
)
{
esp_bt_gap_get_bond_device_list
(
&
bond_dev_num
,
dev_list
);
memcpy
(
peer_addr
,
dev_list
[
0
],
6
);
if
(
bond_dev_num
>
0
)
{
...
...
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