Commit 1d30a564 authored by 张金硕's avatar 张金硕

feat:新增os和mcu版本号接口函数

parent 95d96032
......@@ -13,7 +13,35 @@ _QRCODE_RECT QRCode_Rect;
const uint8_t HJBlueToothName[9]= {"HJ750"};
uint8_t UUIDConfigBuf[22] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00};
//"600032023120100000995"
uint8_t OSVersionASCLLList[20] =
{
0x56,0x00,
0x30,0x00,
0x30,0x00,
0x2E,0x00,
0x30,0x00,
0x30,0x00,
0x30,0x00,
0x30,0x00,
0x30,0x00,
0x30,0x00,
};
uint8_t MCUVersionASCLLList[26] =
{
0x56,0x00,
0x30,0x00,
0x30,0x00,
0x2E,0x00,
0x30,0x00,
0x30,0x00,
0x30,0x00,
0x30,0x00,
0x30,0x00,
0x30,0x00,
0x30,0x00,
0x30,0x00,
0x30,0x00,
};
void TextService(void);
......@@ -123,7 +151,7 @@ TEXT_STRUCT TextPara[TEXT_NUM_TOTAL] =
{TEXT_NUM_INFORMATION_SWVERSION, 0x4013, 0},
{TEXT_NUM_INFORMATION_HW, 0x4014, 0}, //23F 23E
{TEXT_NUM_INFORMATION_OS, 0x4015, 0},
{TEXT_NUM_INFORMATION_HMI, 0x4016, 0},
{TEXT_NUM_INFORMATION_MCU, 0x4016, 0},
{TEXT_NUM_ROAD_NAME, 0x4022, 0},
};
......@@ -135,12 +163,43 @@ uint8_t CurBlueToothPhoneName[100];
uint8_t BlueToothName[40];
uint8_t LastBlueToothName[20];
uint8_t PhoneNumberTotal[20];
uint8_t InformationOSVersion[20];
uint8_t InformationMCUVersion[26];
void TextService(void)
{
if(TextInit == 0)
{
TextInit = 1;
OSVersionASCLLList[0] = DATA_Version[0];
OSVersionASCLLList[2] = DATA_Version[1];
OSVersionASCLLList[4] = DATA_Version[2];
OSVersionASCLLList[6] = DATA_Version[3];
OSVersionASCLLList[8] = DATA_Version[4];
OSVersionASCLLList[10] = DATA_Version[5];
OSVersionASCLLList[12] = DATA_Version[6];
OSVersionASCLLList[14] = DATA_Version[7];
OSVersionASCLLList[16] = 0x48;
OSVersionASCLLList[18] = 0x4A;
MCUVersionASCLLList[0] = DATA_Version[0];
MCUVersionASCLLList[2] = DATA_Version[1];
MCUVersionASCLLList[4] = DATA_Version[2];
MCUVersionASCLLList[6] = DATA_Version[3];
MCUVersionASCLLList[8] = DATA_Version[4];
MCUVersionASCLLList[10] = DATA_Version[5];
MCUVersionASCLLList[12] = DATA_Version[6];
MCUVersionASCLLList[14] = DATA_Version[7];
MCUVersionASCLLList[16] = 0x2E;
MCUVersionASCLLList[18] = SW_Version[0];
MCUVersionASCLLList[20] = 0x2E;
MCUVersionASCLLList[22] = SW_Version[1];
MCUVersionASCLLList[24] = SW_Version[2];
memset(InformationOSVersion, 0, sizeof(InformationOSVersion));
memset(InformationMCUVersion, 0, sizeof(InformationMCUVersion));
memset(PhoneNumber, 0, sizeof(PhoneNumber));
memset(LastPhoneNumber, 0, sizeof(LastPhoneNumber));
memset(LastBlueToothPhoneName, 0, sizeof(LastBlueToothPhoneName));
......@@ -148,6 +207,18 @@ void TextService(void)
memset(BlueToothName, 0, sizeof(BlueToothName));
memset(LastBlueToothName, 0, sizeof(LastBlueToothName));
memset(PhoneNumberTotal, 0, sizeof(PhoneNumberTotal));
for (uint8_t i = 0; i < sizeof(OSVersionASCLLList); i++)
{
InformationOSVersion[i] = OSVersionASCLLList[i];
}
TextPara[TEXT_NUM_INFORMATION_OS].Vaild = 0x01;
for (uint8_t i = 0; i < sizeof(MCUVersionASCLLList); i++)
{
InformationMCUVersion[i] = MCUVersionASCLLList[i];
}
TextPara[TEXT_NUM_INFORMATION_MCU].Vaild = 0x01;
}
if (BlueToothPhoneData.BlueToothSignalSate == BlueTooth_Connection)
{
......
......@@ -12,7 +12,7 @@ typedef enum {
TEXT_NUM_INFORMATION_SWVERSION,
TEXT_NUM_INFORMATION_HW,
TEXT_NUM_INFORMATION_OS,
TEXT_NUM_INFORMATION_HMI,
TEXT_NUM_INFORMATION_MCU,
TEXT_NUM_ROAD_NAME,
TEXT_NUM_TOTAL,
} TEXT_NUM_ENUM;
......@@ -23,7 +23,11 @@ typedef struct {
uint16_t Vaild;
}TEXT_STRUCT;
#define INFORMATION_VERSION_DATE "20240915"
#define SW_EXTERNAL_VERSION "100"
static const uint8_t DATA_Version[8] = {INFORMATION_VERSION_DATE};
static const uint8_t SW_Version[3] = {SW_EXTERNAL_VERSION};
/*QRCode X Y height Width*/
......@@ -41,6 +45,8 @@ extern uint8_t PhoneNumber[40];
extern uint8_t CurBlueToothPhoneName[100];
extern uint8_t BlueToothName[40];
extern uint8_t PhoneNumberTotal[20];
extern uint8_t InformationOSVersion[20];
extern uint8_t InformationMCUVersion[26];
extern TEXT_STRUCT TextPara[];
#endif
\ No newline at end of file
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