Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
TianYing_ty100
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
TY
TianYing_ty100
Commits
f18a97b3
Commit
f18a97b3
authored
Jun 19, 2024
by
李俭双
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:增加ESP32版本号接收
parent
88e9a606
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
1 deletion
+7
-1
BlueTooth.h
Firmware/Source/Application/BLUETOOTH/BlueTooth.h
+3
-1
Protocol_User.c
Firmware/Source/Application/BLUETOOTH/Protocol_User.c
+4
-0
No files found.
Firmware/Source/Application/BLUETOOTH/BlueTooth.h
View file @
f18a97b3
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
#define MCU_ESP32_0x20 0x20 //蓝牙模组启动后,MCU回复ID
#define MCU_ESP32_0x20 0x20 //蓝牙模组启动后,MCU回复ID
#define ESP32_MCU_0x01 0x01 //ESP32发送蓝牙导航信息的ID
#define ESP32_MCU_0x01 0x01 //ESP32发送蓝牙导航信息的ID
#define ESP32_MCU_0x12 0x12 //低功耗蓝牙启动状态及蓝牙名称
#define ESP32_MCU_0x12 0x12 //低功耗蓝牙启动状态及蓝牙名称
#define ESP32_MCU_0x05 0x05 //esp32版本号
#define MCU_ESP32_0x03 0x03 //MCU发送UUID
#define MCU_ESP32_0x03 0x03 //MCU发送UUID
#define ESP32_MCU_0x02 0x02 //ESP32发送重启请求
#define ESP32_MCU_0x02 0x02 //ESP32发送重启请求
#define MCU_ESP32_0x04 0x04 //MCU发送重启命令
#define MCU_ESP32_0x04 0x04 //MCU发送重启命令
...
@@ -26,7 +27,8 @@ typedef struct __attribute__((aligned(4)))
...
@@ -26,7 +27,8 @@ typedef struct __attribute__((aligned(4)))
uint8_t
Navigation_Code
;
/*蓝牙导向编码*/
uint8_t
Navigation_Code
;
/*蓝牙导向编码*/
uint32_t
Navigation_Mileage
;
/*剩余里程*/
uint32_t
Navigation_Mileage
;
/*剩余里程*/
uint8_t
BLE_St
;
uint8_t
BLE_St
;
uint8_t
ESP32_Reset
;
uint8_t
ESP32_Reset
;
uint8_t
ESP32_SWV
;
}
BlueTooth_t
;
}
BlueTooth_t
;
typedef
enum
__attribute__
((
aligned
(
4
)))
typedef
enum
__attribute__
((
aligned
(
4
)))
...
...
Firmware/Source/Application/BLUETOOTH/Protocol_User.c
View file @
f18a97b3
...
@@ -182,6 +182,10 @@ static void Protocol_UartHandle(const Protocol_Data_t *pData)
...
@@ -182,6 +182,10 @@ static void Protocol_UartHandle(const Protocol_Data_t *pData)
{
{
BlueTooth
.
BLE_St
=
pData
->
Data
[
0
];
BlueTooth
.
BLE_St
=
pData
->
Data
[
0
];
}
}
else
if
(
pData
->
CmdID
==
ESP32_MCU_0x05
)
{
BlueTooth
.
ESP32_SWV
=
pData
->
Data
[
0
];
}
else
if
(
pData
->
CmdID
==
ESP32_MCU_0x02
)
else
if
(
pData
->
CmdID
==
ESP32_MCU_0x02
)
{
{
BlueTooth
.
ESP32_Reset
=
pData
->
Data
[
0
];
BlueTooth
.
ESP32_Reset
=
pData
->
Data
[
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