Commit b4668b50 authored by 郑萍's avatar 郑萍

Merge branch 'dev' of http://tyw-server.synology.me:12345/shihao/haojin750tft into zhengping

parents 16150e63 14085d14
......@@ -728,6 +728,16 @@
<FileType>5</FileType>
<FilePath>..\..\..\..\Source\Application\FaultCode.h</FilePath>
</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>
</Group>
<Group>
......@@ -1008,11 +1018,6 @@
<FileType>5</FileType>
<FilePath>..\..\..\..\Source\Component\System_Monitor\System_Monitor_User.h</FilePath>
</File>
<File>
<FileName>System_Monitor.lib</FileName>
<FileType>4</FileType>
<FilePath>..\..\..\..\Source\Component\System_Monitor\System_Monitor.lib</FilePath>
</File>
</Files>
</Group>
<Group>
......
......@@ -2,8 +2,8 @@
; *** Scatter-Loading Description File generated by uVision ***
; *************************************************************
LR_IROM1 0 0x00073C00 { ; load region size_region
ER_IROM1 0 0x00073C00 { ; load address = execution address
LR_IROM1 0x00000000 0x00073C00 { ; load region size_region
ER_IROM1 0x00000000 0x00073C00 { ; load address = execution address
*.o (RESET, +First)
*(InRoot$$Sections)
.ANY (+RO)
......
#include "Components.h"
uint8_t OTA_Update_Count = 0;
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};
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));
SetUUIDData((char *)UUIDConfigBuf, 22);
// _QRCODE_RECT QRCode_Rect;
......@@ -19,4 +14,37 @@ void BlueToothService()
// QRCode_Rect.height = QRCode_HEIGHT;
// QRCode_Rect.width = QRCode_WIDTH;
// SetScreenType(QRCode_TYPE, QRCode_Rect);
}
\ No newline at end of file
}
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 @@
extern void BlueToothService(void);
extern void OTAUpdateService(void);
void UpdateGraphics(void);
#endif
\ No newline at end of file
......@@ -38,7 +38,7 @@ void Gpio_Init(_GpioUser_Enum InitMode)
RTE_GPIO_Config(RTE_GPIO_PORT02_PIN06, RTE_GPIO_DIR_IN); //水温信号输入-AD
RTE_GPIO_Config(RTE_GPIO_PORT02_PIN07, RTE_GPIO_DIR_IN); //BiasBitSW-燃油-AD---
RTE_GPIO_Config(RTE_GPIO_PORT03_PIN00, GpioOut_Low);
RTE_GPIO_Config(RTE_GPIO_PORT03_PIN00, RTE_GPIO_DIR_IN);
RTE_GPIO_Config(RTE_GPIO_PORT03_PIN01, RTE_GPIO_DIR_IN); //SDB_LED_DRIVER
RTE_GPIO_Config(RTE_GPIO_PORT04_PIN00, GpioOut_Low); //SEDIO-编程
......@@ -110,7 +110,7 @@ void Gpio_Init(_GpioUser_Enum InitMode)
RTE_GPIO_Config(RTE_GPIO_PORT02_PIN06, RTE_GPIO_DIR_IN);
RTE_GPIO_Config(RTE_GPIO_PORT02_PIN07, RTE_GPIO_DIR_IN);
RTE_GPIO_Config(RTE_GPIO_PORT03_PIN00, GpioOut_Low);
RTE_GPIO_Config(RTE_GPIO_PORT03_PIN00, RTE_GPIO_DIR_IN);
RTE_GPIO_Config(RTE_GPIO_PORT03_PIN01, RTE_GPIO_DIR_IN);
RTE_GPIO_Config(RTE_GPIO_PORT04_PIN00, GpioOut_Low);
......
#ifndef PICBIN_H
#define PICBIN_H
/* Flash Bin Version:20240817 2024-08-17 11:18:35 Compression ratio:70.00% */
/* Flash Bin Version:20240821 2024-08-21 09:09:13 Compression ratio:70.00% */
#define Pic_0001 1
#define Pic_0002 2
#define Pic_0003 3
......
......@@ -62,6 +62,7 @@ void Key_Operation_Right(Key_Event_en_t enKeyEvent)//确认
break;
case KEY_EVENT_LONG_PRESS_4: //10s
//TYW_RESET_ODO();
Get_Into_OTA_Update_Mode();
break;
case KEY_EVENT_OFF_TO_ON:
break;
......@@ -158,9 +159,15 @@ void Key_Wakeup_Init_EXample(void)
void Key_TimeOut_Service(void)
{
if((MenuData.Back_Time_Left_Flag == 1)&&(MenuData.Back_Time_Right_Flag == 1))
if(OTA_Update_Flag == 0)
{
if((MenuData.Back_Time_Left_Flag == 1)&&(MenuData.Back_Time_Right_Flag == 1))
{
Menu_Service(MENU_KEY_TIMEOUT);
}
}
else
{
Menu_Service(MENU_KEY_TIMEOUT);
}
}
......@@ -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)
{
MenuData.Back_Time_Left++;
......
......@@ -47,6 +47,7 @@ typedef struct
uint8_t Clock_Flash;
}_Menu_Data;
extern uint8_t OTA_Update_Flag;
extern uint8_t ClearODO_Flag;
extern uint8_t g_u8Cursor_Posittion;
extern RTC_CounterTypeDef counter_val;
......@@ -59,6 +60,7 @@ Key_Status_en_t Key_Status_Read_Left(void);
Key_Status_en_t Key_Status_Read_Right(void);
void Key_Event_Short_Press_Left(void);
void Key_Event_Short_Press_Right(void);
void Get_Into_OTA_Update_Mode(void);
void KEY_RIGHT_EVENT_NONE_Service(void);
void KEY_LEFT_EVENT_NONE_Service(void);
void Key_Auto_Save(void);
......
......@@ -58,7 +58,7 @@ Linelib_uint8_t Get_LINE_IN_High_Beam(void)
Linelib_uint8_t Get_LINE_IN_Efi_Fault(void)
{
Linelib_uint8_t ret = 0U;
if (RTE_GPIO_Get_Level(Engine_Failure_MCU))
if (RTE_GPIO_Get_Level(MAINTENANCE_LAMP_OUT))
{
ret = 1u;
}
......
......@@ -5,6 +5,10 @@
#include "Line_In\Line_In_user.h"
#include "Components.h"
uint8_t ECU_Engine_Temperature_flag = 0;
static Tellib_uint16_t LED_Turn_Left_Judgement(void);
static void LED_Turn_Left_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_Turn_Right_Judgement(void);
......@@ -228,7 +232,7 @@ static Tellib_uint16_t LED_TCS_Judgement(void)
}
else
{
if(Get_CAN_CH0_ID_37B_Sig_TCS_Work_Mode == 0x0)
if(Get_CAN_CH0_ID_37B_Sig_TCS_Work_Mode() == 0x0)
{
if(Get_CAN_CH0_ID_37B_Sig_TCS_Warning_Lamp() == 0x1)
{
......@@ -243,24 +247,13 @@ static Tellib_uint16_t LED_TCS_Judgement(void)
LED_STATE = 0u;
}
}
else if(Get_CAN_CH0_ID_37B_Sig_TCS_Work_Mode == 0x0)
else if(Get_CAN_CH0_ID_37B_Sig_TCS_Work_Mode() == 0x1u)
{
if(Get_CAN_CH0_ID_37B_Sig_TCS_Warning_Lamp() == 0x1)
{
LED_STATE = 2u;/*TCS/亮*/
}
else if(Get_CAN_CH0_ID_37B_Sig_TCS_Warning_Lamp() == 0x0)
{
LED_STATE = 0u;
}
else
{
LED_STATE = 0u;
}
LED_STATE = 2u;/*TCS/亮*/
}
else
{
;
LED_STATE = 0u;
}
}
return LED_STATE;
......@@ -283,7 +276,7 @@ static Tellib_uint16_t LED_HEV_Judgement(void)
}
else
{
if((Get_CAN_CH0_ID_111_Sig_ISG_Ready() == 0x01UL)||((Get_CAN_CH0_ID_111_Sig_ISG_Power() == 1u)&&(Get_CAN_CH0_ID_111_Sig_ISG_Power_Enable() == 0u)))
if((Get_CAN_CH0_ID_111_Sig_ISG_Ready() == 0x01UL)||((Get_CAN_CH0_ID_111_Sig_ISG_Power() == 1u)&&(Get_CAN_CH0_ID_111_Sig_ISG_Power_Enable() == 2u))||((Get_CAN_CH0_ID_111_Sig_ISG_Power() == 1u)&&(Get_CAN_CH0_ID_111_Sig_ISG_Power_Enable() == 1u)))
{
LED_STATE = 1u;
}
......@@ -342,34 +335,69 @@ static void LED_Fuel_Level_Low_Execution(Tellib_uint16_t led_status)
{
}
// uint16_t ECU_Engine_Temperature_R =0;
// uint32_t test_ECU_Engine_Temperature =0;
/*信号来源:ECU_101 +硬线-P11 阻值 CAN>硬线*/
static Tellib_uint16_t LED_Coolant_Temperature_Judgement(void)
{
Tellib_uint16_t LED_STATE = 0u;
if (CAN_MSG_Status(&CAN_CH0_CanMsgOp, CAN_CH0_ID_CH0_101_Msg_Count) == CAN_SIG_LOST)
{
LED_STATE = 0u;
if(Line_In_Get_Status(LINE_IN_Coolant_Temperature))
// ECU_Engine_Temperature_R = ADC_Read_Signal(ADC_CH_COOLANT_TEMP1_R);
if(ADC_Read_Signal(ADC_CH_COOLANT_TEMP1_R) <= 20)
{
ECU_Engine_Temperature_flag = 1;
LED_STATE = 1u;
}
else
else if(ADC_Read_Signal(ADC_CH_COOLANT_TEMP1_R) >= 23)
{
ECU_Engine_Temperature_flag = 0;
LED_STATE = 0u;
}
else
{
if(ECU_Engine_Temperature_flag == 1)
{
LED_STATE = 1u;
}
else if(ECU_Engine_Temperature_flag == 0)
{
LED_STATE = 0u;
}
else
{
LED_STATE = 0u;
}
}
}
else
{
if(Get_CAN_CH0_ID_101_Sig_ECU_Engine_Temperature_State() == 0x01UL)
// test_ECU_Engine_Temperature = Get_CAN_CH0_ID_101_Sig_ECU_Engine_Temperature();
if(Get_CAN_CH0_ID_101_Sig_ECU_Engine_Temperature() >= 120 )
{
LED_STATE = 1u;
ECU_Engine_Temperature_flag = 1;
LED_STATE = 1u;
}
else
else if(Get_CAN_CH0_ID_101_Sig_ECU_Engine_Temperature() <= 118)
{
ECU_Engine_Temperature_flag = 0;
LED_STATE = 0u;
}
else
{
if(ECU_Engine_Temperature_flag == 1)
{
LED_STATE = 1u;
}
else if(ECU_Engine_Temperature_flag == 0)
{
LED_STATE = 0u;
}
else
{
LED_STATE = 0u;
}
}
}
return LED_STATE;
}
......
......@@ -53,6 +53,7 @@ void Sys_20ms_Tasks(void)
void Sys_50ms_Tasks(void)
{
// BlueToothService();
UpdateGraphics();
Telltales_Management();
g_u8Cursor_Posittion = Menu_Get_Current_Cursor_Information();
......@@ -82,7 +83,7 @@ void Sys_100ms_Tasks(void)
Coolant_Cal_Sevice(100u);
Services_Mileage_Callback();
// Data_Mileage_Clear();
OTAUpdateService();
RTE_GPIO_Config(RTE_GPIO_PORT05_PIN04, GpioOut_High);
//BackLight_Process();
//TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, 100);
......
#new Option
#Sun Aug 18 11:51:19 CST 2024
#Sun Aug 18 15:35:55 CST 2024
IsSort=true
MergeFlashIsCompression=false
ChangeAppFilePath=
MergeCanXLSPath=
RH850_D1M1AGPIOJSONpath=
DBFFilePath=
MergeCrcTtpe=21
MergeCrcTtpe=29
MergeBootFilePath=D\:\\git\\haojin750tft\\Firmware\\utility\\Boot_Release\\HaoJin_750TFT_HJYB-7500TFT_BV1.03_20240816.hex
IsMergeChangeAddress=false
MergeFlashOutPutFilePath=
......@@ -47,7 +47,7 @@ IsMergeCreateHex=false
MergeFlashIsCreateREC=false
TTFExtractTTFpath=
MergeImageFilePath=
IsMergeCreateUpdateBin=true
IsMergeCreateUpdateBin=false
MergeImageSize=128M
CRCFilePath=
MergeFlashCompressionFormat=
......@@ -56,7 +56,7 @@ IsHexDisplay=true
MergeLineInXLSPath=
MergeFlashInPutFilePath=
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
MergeTelltalesXLSPath=
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