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

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

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