Commit 07a9cd30 authored by 王雅楠's avatar 王雅楠

feat:新增上电自检

parent 31721fa2
......@@ -6,6 +6,17 @@ uint8_t g_u8Display_Mode = ModeDAY;
uint8_t g_u8Language = CH;
uint8_t g_u8Backlight = Backlight_5 ;
uint8_t g_u8UnitSetting = Metric ;
uint8_t g_u8SelfCheck = 0;/*自检*/
uint16_t g_u16fuelnumberup = 0;
uint16_t g_u16fuelnumberdown =7 ;
uint16_t g_u16vspeednumberup = 0;
uint16_t g_u16vspeednumberdown = 200;
uint16_t g_u16espeednumberup = 0;
uint16_t g_u16espeednumberdown = 12000;
//自检函数
void AMT630H_GUI_BACKGRAND_SelfCheck(void);
// 菜单背景,菜单前必带
void AMT630H_GUI_BACKGRAND(void);
// 菜单调用函数
......@@ -32,13 +43,21 @@ void AMT630H_GUI_ReadPosittion_Display(void);
void AMT630H_GUI_Background()
{
if (SYS_OPR_STAT_IGN_ON)
{
if(g_u8SelfCheck == 1)
{
AMT630H_GUI_ReadPosittion_Display();
}
else
{
AMT630H_GUI_BACKGRAND_SelfCheck();
}
}
else
{
;
}
}
/***********************************************一级菜单*******************************************/
......@@ -2554,7 +2573,7 @@ static void AMT630H_GUI_Light()
}
if(Get_TelltalesLedSts(em_LED_Efi_Fault))
{
;
SetPagePic(GRAPHICS_PAGE_0, Pic_0742_544_22);
}
if(Get_TelltalesLedSts(em_LED_ABS))
{
......@@ -2562,21 +2581,25 @@ static void AMT630H_GUI_Light()
}
if(Get_TelltalesLedSts(em_LED_Auto_Start_Stop))
{
SetPagePic(GRAPHICS_PAGE_0, Pic_0745_341_21);
}
if(Get_TelltalesLedSts(em_LED_Oil_Pressure_Alert))
{
SetPagePic(GRAPHICS_PAGE_0, Pic_0738_792_25);
}
if(Get_TelltalesLedSts(em_LED_TCS))
if(Get_TelltalesLedSts(em_LED_TCS) == 1)
{
SetPagePic(GRAPHICS_PAGE_0, Pic_0750_106_26);
}
else
else if(Get_TelltalesLedSts(em_LED_TCS) == 2)
{
SetPagePic(GRAPHICS_PAGE_0, Pic_0750_106_26);
SetPagePic(GRAPHICS_PAGE_0, Pic_0751_111_30);
}
else
{
;
}
if(Get_TelltalesLedSts(em_LED_HEV))
{
SetPagePic(GRAPHICS_PAGE_0, Pic_0747_244_26);
......@@ -3248,7 +3271,7 @@ void AMT630H_GUI_BACKGRAND()
/*主界面函数*/
AMT630H_GUI_Light();
AMT630H_GUI_TIME(Get_Dis_Hour_Time(), Get_Dis_Minute_Time());
/* AMT630H_GUI_Telephone(Telephone); */
// AMT630H_GUI_Telephone(Telephone);
if (Get_Fuel_Sensor_State() == FuelSensorNormal)
{
AMT630H_GUI_Fuel(Get_CurFuelSetp());
......@@ -3277,9 +3300,136 @@ void AMT630H_GUI_BACKGRAND()
}
}
void AMT630H_GUI_SETTING()
void AMT630H_GUI_BACKGRAND_SelfCheck()
{
/*背景图*/
if(g_u8Display_Mode == ModeDAY)
{
if(g_u8Language == CH)
{
SetPagePic(GRAPHICS_PAGE_0, Pic_0382_0_0);
SetPagePic(GRAPHICS_PAGE_0, Pic_0753_109_331);
}
else if(g_u8Language == EN)
{
SetPagePic(GRAPHICS_PAGE_0, Pic_0382_0_0);
SetPagePic(GRAPHICS_PAGE_0, Pic_0753_109_331);
}
}
if(g_u8Display_Mode == ModeNIGHT)
{
if(g_u8Language == CH)
{
SetPagePic(GRAPHICS_PAGE_0, Pic_0001_0_0);
SetPagePic(GRAPHICS_PAGE_0, Pic_0754_109_347);
}
else if(g_u8Language == EN)
{
SetPagePic(GRAPHICS_PAGE_0, Pic_0001_0_0);
SetPagePic(GRAPHICS_PAGE_0, Pic_0754_109_347);
}
}
/*指示灯显示*/
SetPagePic(GRAPHICS_PAGE_0, Pic_0752_28_13);/*左转向*/
SetPagePic(GRAPHICS_PAGE_0, Pic_0736_941_13);/*右转向*/
SetPagePic(GRAPHICS_PAGE_0, Pic_0744_402_21);/*远光灯*/
SetPagePic(GRAPHICS_PAGE_0, Pic_0742_544_22);/*电喷故障指示灯*/
SetPagePic(GRAPHICS_PAGE_0, Pic_0743_476_20);/*ABS*/
SetPagePic(GRAPHICS_PAGE_0, Pic_0745_341_21);/*自动启停灯*/
SetPagePic(GRAPHICS_PAGE_0, Pic_0738_792_25);/*机油压力灯*/
SetPagePic(GRAPHICS_PAGE_0, Pic_0750_106_26);/*TCS*/
SetPagePic(GRAPHICS_PAGE_0, Pic_0751_111_30);/* / */
SetPagePic(GRAPHICS_PAGE_0, Pic_0747_244_26);/*HEV*/
SetPagePic(GRAPHICS_PAGE_0, Pic_0741_616_20);/*水温灯*/
SetPagePic(GRAPHICS_PAGE_0, Pic_0737_875_23);/*WIFI*/
SetPagePic(GRAPHICS_PAGE_0, Pic_0740_682_21);/*蓝牙*/
SetPagePic(GRAPHICS_PAGE_0, Pic_0748_194_26);/*E*/
//SetPagePic(GRAPHICS_PAGE_0, Pic_0749_192_26);/*S*/
AMT630H_GUI_TIME(Get_Dis_Hour_Time(), Get_Dis_Minute_Time());
// AMT630H_GUI_Telephone(Telephone);
AMT630H_GUI_Voltage((ADC_Read_Signal(ADC_CH_KL30_VOLTAGE)) / 10);
AMT630H_GUI_ODO(Get_ODO_Value() / 10, 0);
if(g_u16fuelnumberup < 7)
{
g_u16fuelnumberup++;
AMT630H_GUI_Fuel(g_u16fuelnumberup);/*初始化g_u16fuelnumberup = 0*/
}
else
{
if(g_u16fuelnumberdown >= 1)
{
AMT630H_GUI_Fuel(g_u16fuelnumberdown);/*初始化g_u16fuelnumberdown = 7*/
g_u16fuelnumberdown--;/*g_u16fuelnumberdown=0燃油自检结束*/
}
else
{
;
}
}
if(g_u16vspeednumberup < 200)
{
AMT630H_GUI_VSpeed(g_u16vspeednumberup);/*初始化g_u16vspeednumberup = 0*/
g_u16vspeednumberup++;
}
else
{
if(g_u16vspeednumberdown >0)
{
g_u16vspeednumberdown--;/*初始化g_u16vspeednumberup=200*/
AMT630H_GUI_VSpeed(g_u16vspeednumberdown);/*if g_u16vspeednumberup=0 车速自检结束*/
}
else
{
;
}
}
if(g_u16espeednumberup <= 12000)
{
AMT630H_GUI_ESpeed(g_u16espeednumberup);/*初始化g_u16espeednumberup = 0*/
g_u16espeednumberup+=1000;
}
else
{
if(g_u16espeednumberdown > 0)
{
AMT630H_GUI_ESpeed(g_u16espeednumberdown);/*初始化g_u16espeednumberdown = 12000*/
g_u16espeednumberdown-=1000;/*g_u16espeednumberdown = 0 转速自检结束*/
}
}
if(g_u16fuelnumberdown == 0)
{
AMT630H_GUI_Fuel(g_u16fuelnumberdown);
}
if(g_u16vspeednumberdown == 0)
{
AMT630H_GUI_VSpeed(g_u16vspeednumberdown);
}
if(g_u16espeednumberdown == 0)
{
AMT630H_GUI_ESpeed(g_u16espeednumberdown);
}
if((g_u16fuelnumberdown == 0)&&(g_u16vspeednumberdown == 0)&&(g_u16espeednumberdown == 0))
{
g_u8SelfCheck = 1;/*自检结束标志*/
}
else
{
;
}
}
void AMT630H_GUI_SETTING()
{
if (g_u8Display_Mode == ModeDAY)
{
if(g_u8Language == CH)
......
......@@ -134,18 +134,21 @@ static void LED_High_Beam_Execution(Tellib_uint16_t led_status)
}
uint8_t test =0;
/*硬线-P15 低电平点亮*/
static Tellib_uint16_t LED_Efi_Fault_Judgement(void)
{
Tellib_uint16_t LED_STATE = 0u;
if (Line_In_Get_Status(LINE_IN_Efi_Fault) == 0u)
if (Line_In_Get_Status(LINE_IN_Efi_Fault))
{
LED_STATE = 1u;
test =1;
}
else
{
LED_STATE = 0u;
}
return LED_STATE;
}
static void LED_Efi_Fault_Execution(Tellib_uint16_t led_status)
......@@ -177,13 +180,13 @@ static void LED_ABS_Execution(Tellib_uint16_t led_status)
static Tellib_uint16_t LED_Auto_Start_Stop_Judgement(void)
{
Tellib_uint16_t LED_STATE = 0u;
if (Line_In_Get_Status(LINE_IN_Auto_Start_Stop) == 0)
if (Line_In_Get_Status(LINE_IN_Auto_Start_Stop))
{
LED_STATE = 1;
LED_STATE = 1u;
}
else
{
LED_STATE = 0;
LED_STATE = 0u;
}
return LED_STATE;
}
......@@ -197,7 +200,7 @@ static void LED_Auto_Start_Stop_Execution(Tellib_uint16_t led_status)
static Tellib_uint16_t LED_Oil_Pressure_Alert_Judgement(void)
{
Tellib_uint16_t LED_STATE = 0u;
if (Line_In_Get_Status(LINE_IN_Oil_Pressure_Alert) == 0)
if (Line_In_Get_Status(LINE_IN_Oil_Pressure_Alert))
{
LED_STATE = 1;
}
......
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