Commit cdb8ccba authored by 王雅楠's avatar 王雅楠

🐞 fix:【56247】车速英制单位

parent 768639af
...@@ -3717,20 +3717,23 @@ static void AMT630H_GUI_Trip(uint32_t Trip, uint8_t Uint) ...@@ -3717,20 +3717,23 @@ static void AMT630H_GUI_Trip(uint32_t Trip, uint8_t Uint)
} }
} }
/*车速显示函数*/ /*车速显示函数*/
static void AMT630H_GUI_VSpeed(uint16_t VSpeed,uint8_t Unit) static void AMT630H_GUI_VSpeed(uint16_t VSpeed)
{ {
if (g_u8Display_Mode == ModeDAY) if (g_u8Display_Mode == ModeDAY)
{ {
SetPagePic(GRAPHICS_PAGE_0, Pic_0592_617_271); SetPagePic(GRAPHICS_PAGE_0, Pic_0592_617_271);
if(Unit == 0) if(g_u8UnitSetting == Metric)
{
SetPagePic(GRAPHICS_PAGE_0, Pic_0593_889_310);/*单位 km/h */
}
else if(g_u8UnitSetting == Imperial)
{ {
SetPagePic(GRAPHICS_PAGE_0, Pic_0593_889_310);/*单位 km*/ SetPagePic(GRAPHICS_PAGE_0, Pic_0928_894_310);/*单位 mph/h */
} }
else else
{ {
SetPagePic(GRAPHICS_PAGE_0, Pic_0928_894_310);/*单位 mph */ ;
} }
/*数据处理*/ /*数据处理*/
...@@ -3783,13 +3786,17 @@ static void AMT630H_GUI_VSpeed(uint16_t VSpeed,uint8_t Unit) ...@@ -3783,13 +3786,17 @@ static void AMT630H_GUI_VSpeed(uint16_t VSpeed,uint8_t Unit)
else if (g_u8Display_Mode == ModeNIGHT) else if (g_u8Display_Mode == ModeNIGHT)
{ {
SetPagePic(GRAPHICS_PAGE_0, Pic_0700_617_271); SetPagePic(GRAPHICS_PAGE_0, Pic_0700_617_271);
if(Unit == 0) if(g_u8UnitSetting == Metric)
{ {
SetPagePic(GRAPHICS_PAGE_0, Pic_0701_889_310);/*单位 km/h */ SetPagePic(GRAPHICS_PAGE_0, Pic_0701_889_310);/*单位 km/h */
} }
else if(g_u8UnitSetting == Imperial)
{
SetPagePic(GRAPHICS_PAGE_0, Pic_0929_894_310);/*单位 mph/h */
}
else else
{ {
SetPagePic(GRAPHICS_PAGE_0, Pic_0929_894_310);/*单位 mile/h */ ;
} }
/*数据处理*/ /*数据处理*/
...@@ -4012,11 +4019,11 @@ void AMT630H_GUI_BACKGRAND() ...@@ -4012,11 +4019,11 @@ void AMT630H_GUI_BACKGRAND()
} }
if (Get_VechileSpeedValid() == 1) if (Get_VechileSpeedValid() == 1)
{ {
AMT630H_GUI_VSpeed(VechileSpeed, Get_Dis_Unit()); AMT630H_GUI_VSpeed(VechileSpeed);
} }
else else
{ {
AMT630H_GUI_VSpeed(0,0); AMT630H_GUI_VSpeed(0);
} }
/*转速*/ /*转速*/
if (Get_EngineValid() == 1) if (Get_EngineValid() == 1)
...@@ -4117,7 +4124,7 @@ void AMT630H_GUI_BACKGRAND_SelfCheck() ...@@ -4117,7 +4124,7 @@ void AMT630H_GUI_BACKGRAND_SelfCheck()
/*车速自检*/ /*车速自检*/
if(g_u16vspeednumberup <= 200) if(g_u16vspeednumberup <= 200)
{ {
AMT630H_GUI_VSpeed(g_u16vspeednumberup,Get_Dis_Unit());/*初始化g_u16vspeednumberup = 0*/ AMT630H_GUI_VSpeed(g_u16vspeednumberup);/*初始化g_u16vspeednumberup = 0*/
g_u16vspeednumberup += 8; g_u16vspeednumberup += 8;
} }
else else
...@@ -4125,7 +4132,7 @@ void AMT630H_GUI_BACKGRAND_SelfCheck() ...@@ -4125,7 +4132,7 @@ void AMT630H_GUI_BACKGRAND_SelfCheck()
if(g_u16vspeednumberdown >0) if(g_u16vspeednumberdown >0)
{ {
g_u16vspeednumberdown -= 8;/*初始化g_u16vspeednumberup=200*/ g_u16vspeednumberdown -= 8;/*初始化g_u16vspeednumberup=200*/
AMT630H_GUI_VSpeed(g_u16vspeednumberdown,Get_Dis_Unit());/*if g_u16vspeednumberup=0 车速自检结束*/ AMT630H_GUI_VSpeed(g_u16vspeednumberdown);/*if g_u16vspeednumberup=0 车速自检结束*/
} }
else else
{ {
...@@ -4174,7 +4181,7 @@ void AMT630H_GUI_BACKGRAND_SelfCheck() ...@@ -4174,7 +4181,7 @@ void AMT630H_GUI_BACKGRAND_SelfCheck()
} }
if(g_u16vspeednumberdown == 0) if(g_u16vspeednumberdown == 0)
{ {
AMT630H_GUI_VSpeed(g_u16vspeednumberdown, Get_Dis_Unit()); AMT630H_GUI_VSpeed(g_u16vspeednumberdown);
} }
if(g_u16espeednumberdown == 0) if(g_u16espeednumberdown == 0)
{ {
......
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