Commit f18a97b3 authored by 李俭双's avatar 李俭双

🐞 fix:增加ESP32版本号接收

parent 88e9a606
......@@ -10,6 +10,7 @@
#define MCU_ESP32_0x20 0x20 //蓝牙模组启动后,MCU回复ID
#define ESP32_MCU_0x01 0x01 //ESP32发送蓝牙导航信息的ID
#define ESP32_MCU_0x12 0x12 //低功耗蓝牙启动状态及蓝牙名称
#define ESP32_MCU_0x05 0x05 //esp32版本号
#define MCU_ESP32_0x03 0x03 //MCU发送UUID
#define ESP32_MCU_0x02 0x02 //ESP32发送重启请求
#define MCU_ESP32_0x04 0x04 //MCU发送重启命令
......@@ -27,6 +28,7 @@ typedef struct __attribute__((aligned(4)))
uint32_t Navigation_Mileage;/*剩余里程*/
uint8_t BLE_St;
uint8_t ESP32_Reset;
uint8_t ESP32_SWV;
} BlueTooth_t;
typedef enum __attribute__((aligned(4)))
......
......@@ -182,6 +182,10 @@ static void Protocol_UartHandle(const Protocol_Data_t *pData)
{
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 )
{
BlueTooth.ESP32_Reset = pData->Data[0];
......
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