Commit 3a204048 authored by 李俭双's avatar 李俭双

🐞 fix:修改单位转换时显示样式

parent 4247e53f
......@@ -896,20 +896,42 @@ void SEG_SET_VSpeed_NUM(uint8_t m_Flag, uint16_t m_NUM, uint8_t m_Unit)
{
if (Get_Current_PageType() == Page_Km_Unit)
{
if(FLASH_SYNC_1Hz)
if (m_Unit == 0)
{
IC2_SEG156 = IC_SEG_ON;
IC2_SEG159 = IC_SEG_ON;
LED_Driver_Channel_Set(LampChannel_0, LampCh0_08_KMH, LED_ON);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_09_MPH, LED_ON);
if(FLASH_SYNC_1Hz)
{
IC2_SEG156 = IC_SEG_OFF;
IC2_SEG159 = IC_SEG_ON;
LED_Driver_Channel_Set(LampChannel_0, LampCh0_08_KMH, LED_ON);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_09_MPH, LED_OFF);
}
else
{
IC2_SEG156 = IC_SEG_OFF;
IC2_SEG159 = IC_SEG_OFF;
LED_Driver_Channel_Set(LampChannel_0, LampCh0_08_KMH, LED_OFF);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_09_MPH, LED_OFF);
}
}
else
{
IC2_SEG156 = IC_SEG_OFF;
IC2_SEG159 = IC_SEG_OFF;
LED_Driver_Channel_Set(LampChannel_0, LampCh0_08_KMH, LED_OFF);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_09_MPH, LED_OFF);
if(FLASH_SYNC_1Hz)
{
IC2_SEG156 = IC_SEG_ON;
IC2_SEG159 = IC_SEG_OFF;
LED_Driver_Channel_Set(LampChannel_0, LampCh0_08_KMH, LED_OFF);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_09_MPH, LED_ON);
}
else
{
IC2_SEG156 = IC_SEG_OFF;
IC2_SEG159 = IC_SEG_OFF;
LED_Driver_Channel_Set(LampChannel_0, LampCh0_08_KMH, LED_OFF);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_09_MPH, LED_OFF);
}
}
}
else
{
......@@ -1109,192 +1131,221 @@ void SEG_SET_Voltage_NUM(uint8_t m_Flag, uint16_t m_NUM)
{
IC1_SEG079 = IC_SEG_ON;
IC1_SEG086 = IC_SEG_ON;
Num = m_NUM / 100;
m8 = SEG_UNDISPLAY_NUMBER0[Num];
if (Bit_Is_Set(m8, 0))
if(Get_Battery_Voltage_Valid() == 1)
{
IC1_SEG096 = IC_SEG_ON;
Num = m_NUM / 100;
m8 = SEG_UNDISPLAY_NUMBER0[Num];
if (Bit_Is_Set(m8, 0))
{
IC1_SEG096 = IC_SEG_ON;
}
else
{
IC1_SEG096 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 1))
{
IC1_SEG095 = IC_SEG_ON;
}
else
{
IC1_SEG095 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 2))
{
IC1_SEG093 = IC_SEG_ON;
}
else
{
IC1_SEG093 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 3))
{
IC1_SEG099 = IC_SEG_ON;
}
else
{
IC1_SEG099 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 4))
{
IC1_SEG098 = IC_SEG_ON;
}
else
{
IC1_SEG098 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 5))
{
IC1_SEG097 = IC_SEG_ON;
}
else
{
IC1_SEG097 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 6))
{
IC1_SEG094 = IC_SEG_ON;
}
else
{
IC1_SEG094 = IC_SEG_OFF;
}
/*十位*/
Num = (m_NUM / 10u) % 10u;
if ((m_NUM >= 100u) || (m_NUM == 0))
{
m8 = SEG_DISPLAY_NUMBER0[Num];
}
else
{
m8 = SEG_UNDISPLAY_NUMBER0[Num];
}
if (Bit_Is_Set(m8, 0))
{
IC1_SEG090 = IC_SEG_ON;
}
else
{
IC1_SEG090 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 1))
{
IC1_SEG089 = IC_SEG_ON;
}
else
{
IC1_SEG089 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 2))
{
IC1_SEG087 = IC_SEG_ON;
}
else
{
IC1_SEG087 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 3))
{
IC1_SEG100 = IC_SEG_ON;
}
else
{
IC1_SEG100 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 4))
{
IC1_SEG092 = IC_SEG_ON;
}
else
{
IC1_SEG092 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 5))
{
IC1_SEG091 = IC_SEG_ON;
}
else
{
IC1_SEG091 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 6))
{
IC1_SEG088 = IC_SEG_ON;
}
else
{
IC1_SEG088 = IC_SEG_OFF;
}
/*个位*/
Num = m_NUM % 10u;
m8 = SEG_DISPLAY_NUMBER0[Num];
if (Bit_Is_Set(m8, 0))
{
IC1_SEG083 = IC_SEG_ON;
}
else
{
IC1_SEG083 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 1))
{
IC1_SEG082 = IC_SEG_ON;
}
else
{
IC1_SEG082 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 2))
{
IC1_SEG080 = IC_SEG_ON;
}
else
{
IC1_SEG080 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 3))
{
IC1_SEG101 = IC_SEG_ON;
}
else
{
IC1_SEG101 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 4))
{
IC1_SEG085 = IC_SEG_ON;
}
else
{
IC1_SEG085 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 5))
{
IC1_SEG084 = IC_SEG_ON;
}
else
{
IC1_SEG084 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 6))
{
IC1_SEG081 = IC_SEG_ON;
}
else
{
IC1_SEG081 = IC_SEG_OFF;
}
}
else
{
IC1_SEG088 = IC_SEG_ON;
IC1_SEG081 = IC_SEG_ON;
IC1_SEG096 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 1))
{
IC1_SEG095 = IC_SEG_ON;
}
else
{
IC1_SEG095 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 2))
{
IC1_SEG093 = IC_SEG_ON;
}
else
{
IC1_SEG093 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 3))
{
IC1_SEG099 = IC_SEG_ON;
}
else
{
IC1_SEG099 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 4))
{
IC1_SEG098 = IC_SEG_ON;
}
else
{
IC1_SEG098 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 5))
{
IC1_SEG097 = IC_SEG_ON;
}
else
{
IC1_SEG097 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 6))
{
IC1_SEG094 = IC_SEG_ON;
}
else
{
IC1_SEG094 = IC_SEG_OFF;
}
/*十位*/
Num = (m_NUM / 10u) % 10u;
if ((m_NUM >= 100u) || (m_NUM == 0))
{
m8 = SEG_DISPLAY_NUMBER0[Num];
}
else
{
m8 = SEG_UNDISPLAY_NUMBER0[Num];
}
if (Bit_Is_Set(m8, 0))
{
IC1_SEG090 = IC_SEG_ON;
}
else
{
IC1_SEG090 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 1))
{
IC1_SEG089 = IC_SEG_ON;
}
else
{
IC1_SEG089 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 2))
{
IC1_SEG087 = IC_SEG_ON;
}
else
{
IC1_SEG087 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 3))
{
IC1_SEG100 = IC_SEG_ON;
}
else
{
IC1_SEG100 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 4))
{
IC1_SEG092 = IC_SEG_ON;
}
else
{
IC1_SEG092 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 5))
{
IC1_SEG091 = IC_SEG_ON;
}
else
{
IC1_SEG091 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 6))
{
IC1_SEG088 = IC_SEG_ON;
}
else
{
IC1_SEG088 = IC_SEG_OFF;
}
/*个位*/
Num = m_NUM % 10u;
m8 = SEG_DISPLAY_NUMBER0[Num];
if (Bit_Is_Set(m8, 0))
{
IC1_SEG083 = IC_SEG_ON;
}
else
{
IC1_SEG083 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 1))
{
IC1_SEG082 = IC_SEG_ON;
}
else
{
IC1_SEG082 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 2))
{
IC1_SEG080 = IC_SEG_ON;
}
else
{
IC1_SEG080 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 3))
{
IC1_SEG101 = IC_SEG_ON;
}
else
{
IC1_SEG101 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 4))
{
IC1_SEG085 = IC_SEG_ON;
}
else
{
IC1_SEG085 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 5))
{
IC1_SEG084 = IC_SEG_ON;
}
else
{
IC1_SEG084 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 6))
{
IC1_SEG081 = IC_SEG_ON;
}
else
{
IC1_SEG081 = IC_SEG_OFF;
}
}
}
......@@ -1693,18 +1744,35 @@ void SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS(uint8_t m_Uint, uint32_t m_NUM_ODO, uint
RTE_GPIO_Set_Level(ODO_Thousand, 1);
if ((ClearODO_Flag != 1) && (Common_GetIgnOnTime() >= 3000))
{
if (Get_Current_PageType() == Page_Km_Unit)
if ((Get_Current_PageType() == Page_Km_Unit) && ((Get_Current_PageMenu() == Page_Odo) || (Get_Current_PageMenu() == Page_Trip)))
{
if(FLASH_SYNC_1Hz)
if (m_Uint == 0)
{
IC1_SEG036 = IC_SEG_ON;
IC1_SEG037 = IC_SEG_ON;
if(FLASH_SYNC_1Hz)
{
IC1_SEG036 = IC_SEG_OFF;
IC1_SEG037 = IC_SEG_ON;
}
else
{
IC1_SEG036 = IC_SEG_OFF;
IC1_SEG037 = IC_SEG_OFF;
}
}
else
{
IC1_SEG036 = IC_SEG_OFF;
IC1_SEG037 = IC_SEG_OFF;
if(FLASH_SYNC_1Hz)
{
IC1_SEG036 = IC_SEG_ON;
IC1_SEG037 = IC_SEG_OFF;
}
else
{
IC1_SEG036 = IC_SEG_OFF;
IC1_SEG037 = IC_SEG_OFF;
}
}
}
else
{
......
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