Commit 6dd69019 authored by 王雅楠's avatar 王雅楠

🐞 fix:【56253】修改电压自检时电压指示灯颜色(红)

parent cdb8ccba
...@@ -11,13 +11,14 @@ uint8_t g_u8UnitSetting = Metric ; ...@@ -11,13 +11,14 @@ uint8_t g_u8UnitSetting = Metric ;
uint8_t g_u8SelfCheck = 0;/*自检*/ uint8_t g_u8SelfCheck = 0;/*自检*/
uint16_t g_u16fuelnumberup = 0; uint16_t g_u16fuelnumberup = 0;
uint16_t g_u16fuelnumberdown = 320; uint16_t g_u16fuelnumberdown = 200;
uint16_t g_u16vspeednumberup = 0; uint16_t g_u16vspeednumberup = 0;
uint16_t g_u16vspeednumberdown = 200; uint16_t g_u16vspeednumberdown = 200;
uint16_t g_u16espeednumberup = 0; uint16_t g_u16espeednumberup = 0;
uint16_t g_u16espeednumberdown = 300; uint16_t g_u16espeednumberdown = 300;
uint16_t g_u16voltagenumberup = 0; uint16_t g_u16voltagenumberup = 0;
uint16_t g_u16voltagenumberdown = 160; uint16_t g_u16voltagenumberdown = 160;
uint8_t Voltage_Selfcheck = 1;
//自检函数 //自检函数
void AMT630H_GUI_BACKGRAND_SelfCheck(void); void AMT630H_GUI_BACKGRAND_SelfCheck(void);
...@@ -3175,7 +3176,7 @@ static void AMT630H_GUI_Fuel(uint8_t Fuel) ...@@ -3175,7 +3176,7 @@ static void AMT630H_GUI_Fuel(uint8_t Fuel)
} }
} }
uint16_t g_u16PerFuel_SelfCheck = 0; uint16_t g_u16PerFuel_SelfCheck = 1;
/*燃油自检函数*/ /*燃油自检函数*/
static void AMT630H_GUI_Fuel_SelfCheck(uint8_t Fuel) static void AMT630H_GUI_Fuel_SelfCheck(uint8_t Fuel)
{ {
...@@ -3207,30 +3208,30 @@ static void AMT630H_GUI_Fuel_SelfCheck(uint8_t Fuel) ...@@ -3207,30 +3208,30 @@ static void AMT630H_GUI_Fuel_SelfCheck(uint8_t Fuel)
if (FuelLevel > 0) if (FuelLevel > 0)
{ {
if (FuelLevel != g_u16_GUI_PerFuelLevel) if (FuelLevel != g_u16PerFuel_SelfCheck)
{ {
for (uint8_t i = 0; i < g_u16_GUI_PerFuelLevel; i++) for (uint8_t i = 0; i < g_u16PerFuel_SelfCheck; i++)
{ {
SetPagePic(GRAPHICS_PAGE_0, PICList_Fuel_SelfCheck[i]); SetPagePic(GRAPHICS_PAGE_0, PICList_Fuel_SelfCheck[i]);
} }
if (FuelLevel > g_u16_GUI_PerFuelLevel) if (FuelLevel > g_u16PerFuel_SelfCheck)
{ {
g_u16_GUI_PerFuelLevel++; g_u16PerFuel_SelfCheck++;
} }
else if ((FuelLevel < g_u16_GUI_PerFuelLevel) && (g_u16_GUI_PerFuelLevel != 0)) else if ((FuelLevel < g_u16PerFuel_SelfCheck) && (g_u16PerFuel_SelfCheck != 0))
{ {
g_u16_GUI_PerFuelLevel--;/*fuellevel = 8 */ g_u16PerFuel_SelfCheck--;/*fuellevel = 8 */
} }
else else
{ {
; ;
} }
} }
if (FuelLevel == g_u16_GUI_PerFuelLevel) if (FuelLevel == g_u16PerFuel_SelfCheck)
{ {
g_u16_GUI_PerFuelLevel = FuelLevel; g_u16PerFuel_SelfCheck = FuelLevel;
for (uint8_t i = 0; i < g_u16_GUI_PerFuelLevel; i++) for (uint8_t i = 0; i < g_u16PerFuel_SelfCheck; i++)
{ {
SetPagePic(GRAPHICS_PAGE_0, PICList_Fuel_SelfCheck[i]); SetPagePic(GRAPHICS_PAGE_0, PICList_Fuel_SelfCheck[i]);
} }
...@@ -3262,13 +3263,20 @@ static void AMT630H_GUI_Voltage(uint16_t Voltage) ...@@ -3262,13 +3263,20 @@ static void AMT630H_GUI_Voltage(uint16_t Voltage)
uint16_t Voltage_Ten; uint16_t Voltage_Ten;
uint16_t Voltage_Unit; uint16_t Voltage_Unit;
uint16_t Front; uint16_t Front;
if ((VoltageNumber <= 120) || (VoltageNumber > 150)) if(Voltage_Selfcheck == 1)
{ {
SetPagePic(GRAPHICS_PAGE_0, Pic_0563_923_407); /*红色电压图标*/ SetPagePic(GRAPHICS_PAGE_0, Pic_0563_923_407); /*红色电压图标*/
} }
else else
{ {
SetPagePic(GRAPHICS_PAGE_0, Pic_0865_923_407);/*绿色电压图标显示*/ if ((VoltageNumber <= 120) || (VoltageNumber > 150))
{
SetPagePic(GRAPHICS_PAGE_0, Pic_0563_923_407); /*红色电压图标*/
}
else
{
SetPagePic(GRAPHICS_PAGE_0, Pic_0865_923_407);/*绿色电压图标显示*/
}
} }
/*数据处理*/ /*数据处理*/
Voltage_Hundred = VoltageNumber / 100; Voltage_Hundred = VoltageNumber / 100;
...@@ -4104,9 +4112,9 @@ void AMT630H_GUI_BACKGRAND_SelfCheck() ...@@ -4104,9 +4112,9 @@ void AMT630H_GUI_BACKGRAND_SelfCheck()
AMT630H_GUI_Trip(Get_Trip_Value(), Get_Dis_Unit()); AMT630H_GUI_Trip(Get_Trip_Value(), Get_Dis_Unit());
} }
/*燃油自检*/ /*燃油自检*/
if(g_u16fuelnumberup < 320) if(g_u16fuelnumberup <= 200)
{ {
AMT630H_GUI_Fuel_SelfCheck(g_u16fuelnumberup/40); AMT630H_GUI_Fuel_SelfCheck(g_u16fuelnumberup/25);
g_u16fuelnumberup += 8; g_u16fuelnumberup += 8;
} }
else else
...@@ -4114,7 +4122,7 @@ void AMT630H_GUI_BACKGRAND_SelfCheck() ...@@ -4114,7 +4122,7 @@ void AMT630H_GUI_BACKGRAND_SelfCheck()
if(g_u16fuelnumberdown > 0) if(g_u16fuelnumberdown > 0)
{ {
g_u16fuelnumberdown -= 8; g_u16fuelnumberdown -= 8;
AMT630H_GUI_Fuel_SelfCheck(g_u16fuelnumberdown/40);/*初始化g_u16fuelnumberdown = 320*/ AMT630H_GUI_Fuel_SelfCheck(g_u16fuelnumberdown/25);/*初始化g_u16fuelnumberdown = 320*/
} }
else else
{ {
...@@ -4149,7 +4157,7 @@ void AMT630H_GUI_BACKGRAND_SelfCheck() ...@@ -4149,7 +4157,7 @@ void AMT630H_GUI_BACKGRAND_SelfCheck()
{ {
if(g_u16espeednumberdown > 0) if(g_u16espeednumberdown > 0)
{ {
AMT630H_GUI_ESpeed(g_u16espeednumberdown*40);/*初始化g_u16espeednumberdown = 600*/ AMT630H_GUI_ESpeed(g_u16espeednumberdown*40);/*初始化g_u16espeednumberdown = 300*/
g_u16espeednumberdown -= 12;/*g_u16espeednumberdown = 0 转速自检结束*/ g_u16espeednumberdown -= 12;/*g_u16espeednumberdown = 0 转速自检结束*/
} }
} }
...@@ -4175,9 +4183,9 @@ void AMT630H_GUI_BACKGRAND_SelfCheck() ...@@ -4175,9 +4183,9 @@ void AMT630H_GUI_BACKGRAND_SelfCheck()
} }
} }
/*结束状态*/ /*结束状态*/
if(g_u16fuelnumberup == 600) if(g_u16fuelnumberdown == 0)
{ {
AMT630H_GUI_Fuel_SelfCheck(8); AMT630H_GUI_Fuel_SelfCheck(0);
} }
if(g_u16vspeednumberdown == 0) if(g_u16vspeednumberdown == 0)
{ {
...@@ -4195,6 +4203,7 @@ void AMT630H_GUI_BACKGRAND_SelfCheck() ...@@ -4195,6 +4203,7 @@ void AMT630H_GUI_BACKGRAND_SelfCheck()
if((g_u16fuelnumberdown == 0)&&(g_u16vspeednumberdown == 0)&&(g_u16espeednumberdown == 0)&&(g_u16voltagenumberdown == 0)) if((g_u16fuelnumberdown == 0)&&(g_u16vspeednumberdown == 0)&&(g_u16espeednumberdown == 0)&&(g_u16voltagenumberdown == 0))
{ {
g_u8SelfCheck = 1;/*自检结束标志*/ g_u8SelfCheck = 1;/*自检结束标志*/
Voltage_Selfcheck = 0;
} }
else else
{ {
...@@ -4205,10 +4214,10 @@ void AMT630H_GUI_SELFCHECK_STS_INIT(void) ...@@ -4205,10 +4214,10 @@ void AMT630H_GUI_SELFCHECK_STS_INIT(void)
{ {
g_u8SelfCheck = 0U; g_u8SelfCheck = 0U;
g_u16fuelnumberup = 0U; g_u16fuelnumberup = 0U;
g_u16fuelnumberdown = 320U; g_u16fuelnumberdown = 200U;
g_u16vspeednumberup = 0U; g_u16vspeednumberup = 0U;
g_u16espeednumberup = 0U;
g_u16vspeednumberdown = 200U; g_u16vspeednumberdown = 200U;
g_u16espeednumberup = 0U;
g_u16espeednumberdown = 300U; g_u16espeednumberdown = 300U;
g_u16voltagenumberup = 0U; g_u16voltagenumberup = 0U;
g_u16voltagenumberdown = 160U; g_u16voltagenumberdown = 160U;
......
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