Commit 63e53a2b authored by 张金硕's avatar 张金硕

feat:新增故障信息界面长按enter键10s进入OTA升级的功能(现一部的库有问题,二维码刷出来的是个白框)

parent 1df233b0
...@@ -728,6 +728,16 @@ ...@@ -728,6 +728,16 @@
<FileType>5</FileType> <FileType>5</FileType>
<FilePath>..\..\..\..\Source\Application\FaultCode.h</FilePath> <FilePath>..\..\..\..\Source\Application\FaultCode.h</FilePath>
</File> </File>
<File>
<FileName>BlueTooth.c</FileName>
<FileType>1</FileType>
<FilePath>..\..\..\..\Source\Application\BlueTooth.c</FilePath>
</File>
<File>
<FileName>BlueTooth.h</FileName>
<FileType>5</FileType>
<FilePath>..\..\..\..\Source\Application\BlueTooth.h</FilePath>
</File>
</Files> </Files>
</Group> </Group>
<Group> <Group>
...@@ -1008,11 +1018,6 @@ ...@@ -1008,11 +1018,6 @@
<FileType>5</FileType> <FileType>5</FileType>
<FilePath>..\..\..\..\Source\Component\System_Monitor\System_Monitor_User.h</FilePath> <FilePath>..\..\..\..\Source\Component\System_Monitor\System_Monitor_User.h</FilePath>
</File> </File>
<File>
<FileName>System_Monitor.lib</FileName>
<FileType>4</FileType>
<FilePath>..\..\..\..\Source\Component\System_Monitor\System_Monitor.lib</FilePath>
</File>
</Files> </Files>
</Group> </Group>
<Group> <Group>
......
#include "Components.h" #include "Components.h"
uint8_t OTA_Update_Count = 0;
const uint8_t HJBlueToothName[9]= {"HJ_750TFT"}; const uint8_t HJBlueToothName[9]= {"HJ_750TFT"};
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}; 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};
void BlueToothService() void BlueToothService()
{ {
// _PICID_Struct PicObj;
// PicObj.qr_logo_id = Pic_0020;
// PicObj.qr_pic_id = Pic_0002;
// PicObj.update_pic_id = 0;
// PicObj.second_menu = 0;
// PicObj.navigation_task_id = 0;
// PackedTransfer_DisplayPhoneMirrorQRcode(1, PicObj);
SetBlueToothName((uint8_t *)HJBlueToothName, sizeof(HJBlueToothName)); SetBlueToothName((uint8_t *)HJBlueToothName, sizeof(HJBlueToothName));
SetUUIDData((char *)UUIDConfigBuf, 22); SetUUIDData((char *)UUIDConfigBuf, 22);
// _QRCODE_RECT QRCode_Rect; // _QRCODE_RECT QRCode_Rect;
...@@ -20,3 +15,36 @@ void BlueToothService() ...@@ -20,3 +15,36 @@ void BlueToothService()
// QRCode_Rect.width = QRCode_WIDTH; // QRCode_Rect.width = QRCode_WIDTH;
// SetScreenType(QRCode_TYPE, QRCode_Rect); // SetScreenType(QRCode_TYPE, QRCode_Rect);
} }
void UpdateGraphics(void)
{
_PICID_Struct PicObj;
PicObj.qr_logo_id = 0;
PicObj.main_pic_id = Pic_0382;
PicObj.qr_pic_id = Pic_0316;
PicObj.update_pic_id = Pic_0193;
PicObj.second_menu = 0;
PicObj.navigation_task_id = 0;
PackedTransfer_DisplayPhoneMirrorQRcode(0, PicObj);
}
void OTAUpdateService(void)
{
_QRCODE_RECT QRCode_Rect;
QRCode_Rect.x = 457;
QRCode_Rect.y = 137;
QRCode_Rect.height = 240;
QRCode_Rect.width = 240;
if(OTA_Update_Flag == 1)
{
OTA_Update_Count++;
if(OTA_Update_Count < 5)
{
SetUpdateCtrl(1,QRCode_Rect);
}
}
else
{
SetUpdateCtrl(0,QRCode_Rect);
OTA_Update_Count=0;
}
}
...@@ -10,5 +10,7 @@ ...@@ -10,5 +10,7 @@
extern void BlueToothService(void); extern void BlueToothService(void);
extern void OTAUpdateService(void);
void UpdateGraphics(void);
#endif #endif
\ No newline at end of file
...@@ -4121,8 +4121,16 @@ void AMT630H_GUI_ReadPosittion_Display(void) ...@@ -4121,8 +4121,16 @@ void AMT630H_GUI_ReadPosittion_Display(void)
AMT630H_GUI_Language_Setting(MENU_ITEM_LANGUAGE_ENGLISH); AMT630H_GUI_Language_Setting(MENU_ITEM_LANGUAGE_ENGLISH);
break; break;
case MENU_ITEM_FAULT_INFORMATION: /*27 故障信息*/ case MENU_ITEM_FAULT_INFORMATION: /*27 故障信息*/
if(OTA_Update_Flag == 0)
{
AMT630H_GUI_SETTING(); AMT630H_GUI_SETTING();
AMT630H_GUI_Fault_Information(); AMT630H_GUI_Fault_Information();
}
else
{
SetPagePic(GRAPHICS_PAGE_0, Pic_0653_54_499);
SetPagePic(GRAPHICS_PAGE_0, Pic_0193_0_0);
}
break; break;
case MENU_ITEM_PHONE_CONNECT: /*28 手机互联*/ case MENU_ITEM_PHONE_CONNECT: /*28 手机互联*/
AMT630H_GUI_SETTING(); AMT630H_GUI_SETTING();
......
...@@ -62,6 +62,7 @@ void Key_Operation_Right(Key_Event_en_t enKeyEvent)//确认 ...@@ -62,6 +62,7 @@ void Key_Operation_Right(Key_Event_en_t enKeyEvent)//确认
break; break;
case KEY_EVENT_LONG_PRESS_4: //10s case KEY_EVENT_LONG_PRESS_4: //10s
//TYW_RESET_ODO(); //TYW_RESET_ODO();
Get_Into_OTA_Update_Mode();
break; break;
case KEY_EVENT_OFF_TO_ON: case KEY_EVENT_OFF_TO_ON:
break; break;
...@@ -158,10 +159,16 @@ void Key_Wakeup_Init_EXample(void) ...@@ -158,10 +159,16 @@ void Key_Wakeup_Init_EXample(void)
void Key_TimeOut_Service(void) void Key_TimeOut_Service(void)
{ {
if(OTA_Update_Flag == 0)
{
if((MenuData.Back_Time_Left_Flag == 1)&&(MenuData.Back_Time_Right_Flag == 1)) if((MenuData.Back_Time_Left_Flag == 1)&&(MenuData.Back_Time_Right_Flag == 1))
{ {
Menu_Service(MENU_KEY_TIMEOUT); Menu_Service(MENU_KEY_TIMEOUT);
} }
}
else
{
}
} }
void Key_Auto_Save(void) void Key_Auto_Save(void)
...@@ -274,6 +281,14 @@ void Key_Event_Short_Press_Right(void)//确认 ...@@ -274,6 +281,14 @@ void Key_Event_Short_Press_Right(void)//确认
} }
} }
uint8_t OTA_Update_Flag = 0;
void Get_Into_OTA_Update_Mode(void)
{
if(Menu_Get_Current_Cursor_Information() == MENU_ITEM_FAULT_INFORMATION)
{
OTA_Update_Flag = ! OTA_Update_Flag;
}
}
void KEY_LEFT_EVENT_NONE_Service(void) void KEY_LEFT_EVENT_NONE_Service(void)
{ {
MenuData.Back_Time_Left++; MenuData.Back_Time_Left++;
......
...@@ -47,6 +47,7 @@ typedef struct ...@@ -47,6 +47,7 @@ typedef struct
uint8_t Clock_Flash; uint8_t Clock_Flash;
}_Menu_Data; }_Menu_Data;
extern uint8_t OTA_Update_Flag;
extern uint8_t ClearODO_Flag; extern uint8_t ClearODO_Flag;
extern uint8_t g_u8Cursor_Posittion; extern uint8_t g_u8Cursor_Posittion;
extern RTC_CounterTypeDef counter_val; extern RTC_CounterTypeDef counter_val;
...@@ -59,6 +60,7 @@ Key_Status_en_t Key_Status_Read_Left(void); ...@@ -59,6 +60,7 @@ Key_Status_en_t Key_Status_Read_Left(void);
Key_Status_en_t Key_Status_Read_Right(void); Key_Status_en_t Key_Status_Read_Right(void);
void Key_Event_Short_Press_Left(void); void Key_Event_Short_Press_Left(void);
void Key_Event_Short_Press_Right(void); void Key_Event_Short_Press_Right(void);
void Get_Into_OTA_Update_Mode(void);
void KEY_RIGHT_EVENT_NONE_Service(void); void KEY_RIGHT_EVENT_NONE_Service(void);
void KEY_LEFT_EVENT_NONE_Service(void); void KEY_LEFT_EVENT_NONE_Service(void);
void Key_Auto_Save(void); void Key_Auto_Save(void);
......
...@@ -53,6 +53,7 @@ void Sys_20ms_Tasks(void) ...@@ -53,6 +53,7 @@ void Sys_20ms_Tasks(void)
void Sys_50ms_Tasks(void) void Sys_50ms_Tasks(void)
{ {
// BlueToothService(); // BlueToothService();
UpdateGraphics();
Telltales_Management(); Telltales_Management();
g_u8Cursor_Posittion = Menu_Get_Current_Cursor_Information(); g_u8Cursor_Posittion = Menu_Get_Current_Cursor_Information();
...@@ -82,7 +83,7 @@ void Sys_100ms_Tasks(void) ...@@ -82,7 +83,7 @@ void Sys_100ms_Tasks(void)
Coolant_Cal_Sevice(100u); Coolant_Cal_Sevice(100u);
Services_Mileage_Callback(); Services_Mileage_Callback();
// Data_Mileage_Clear(); // Data_Mileage_Clear();
OTAUpdateService();
RTE_GPIO_Config(RTE_GPIO_PORT05_PIN04, GpioOut_High); RTE_GPIO_Config(RTE_GPIO_PORT05_PIN04, GpioOut_High);
//BackLight_Process(); //BackLight_Process();
//TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, 100); //TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, 100);
......
#new Option #new Option
#Sun Aug 18 11:51:19 CST 2024 #Sun Aug 18 15:35:55 CST 2024
IsSort=true IsSort=true
MergeFlashIsCompression=false MergeFlashIsCompression=false
ChangeAppFilePath= ChangeAppFilePath=
MergeCanXLSPath= MergeCanXLSPath=
RH850_D1M1AGPIOJSONpath= RH850_D1M1AGPIOJSONpath=
DBFFilePath= DBFFilePath=
MergeCrcTtpe=21 MergeCrcTtpe=29
MergeBootFilePath=D\:\\git\\haojin750tft\\Firmware\\utility\\Boot_Release\\HaoJin_750TFT_HJYB-7500TFT_BV1.03_20240816.hex MergeBootFilePath=D\:\\git\\haojin750tft\\Firmware\\utility\\Boot_Release\\HaoJin_750TFT_HJYB-7500TFT_BV1.03_20240816.hex
IsMergeChangeAddress=false IsMergeChangeAddress=false
MergeFlashOutPutFilePath= MergeFlashOutPutFilePath=
...@@ -47,7 +47,7 @@ IsMergeCreateHex=false ...@@ -47,7 +47,7 @@ IsMergeCreateHex=false
MergeFlashIsCreateREC=false MergeFlashIsCreateREC=false
TTFExtractTTFpath= TTFExtractTTFpath=
MergeImageFilePath= MergeImageFilePath=
IsMergeCreateUpdateBin=true IsMergeCreateUpdateBin=false
MergeImageSize=128M MergeImageSize=128M
CRCFilePath= CRCFilePath=
MergeFlashCompressionFormat= MergeFlashCompressionFormat=
...@@ -56,7 +56,7 @@ IsHexDisplay=true ...@@ -56,7 +56,7 @@ IsHexDisplay=true
MergeLineInXLSPath= MergeLineInXLSPath=
MergeFlashInPutFilePath= MergeFlashInPutFilePath=
MergeFlashIsInternal=false MergeFlashIsInternal=false
MergeOutPutFilePath=D\:\\\u9879\u76EE\\\u8C6A\u8FDB\\haojin750TFT\\srec MergeOutPutFilePath=D\:\\\u9879\u76EE\\\u8C6A\u8FDB\\haojin750TFT\\srec-8.18
MergeAppFilePath=D\:\\git\\haojin750tft\\Firmware\\Project\\Cmsemicon\\BAT32A279\\MDK_ARM\\Objects\\HaoJin750TFT.hex MergeAppFilePath=D\:\\git\\haojin750tft\\Firmware\\Project\\Cmsemicon\\BAT32A279\\MDK_ARM\\Objects\\HaoJin750TFT.hex
MergeTelltalesXLSPath= MergeTelltalesXLSPath=
FillingByte=-86 FillingByte=-86
......
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