Commit 2a5f4dfa authored by 李俭双's avatar 李俭双

🐞 fix:更改胎压显示策略

parent 657958d6
...@@ -129,7 +129,7 @@ void Gauge_Service(void) ...@@ -129,7 +129,7 @@ void Gauge_Service(void)
SEG_SET_CoolantDial(1, GET_DataCoolantTempSegDisp(), GET_DataCoolantTempValueDisp(), GET_DataCollantTempSegValid()); SEG_SET_CoolantDial(1, GET_DataCoolantTempSegDisp(), GET_DataCoolantTempValueDisp(), GET_DataCollantTempSegValid());
SEG_SET_Voltage_NUM(1, Get_Battery_Voltage()); SEG_SET_Voltage_NUM(1, Get_Battery_Voltage());
#if(IC_Current == TY200_080000b_ty) #if(IC_Current == TY200_080000b_ty)
SEG_SET_TPMS_NUM(1, Get_Front_TPMS_Sig_Value(), Get_Rear_TPMS_Sig_Value(), Get_Dis_Tpms_Unit(),Get_Front_TPMS_Sig_Vaild(), Get_Rear_TPMS_Sig_Vaild()); SEG_SET_TPMS_DISPLAY(1, Get_Front_TPMS_Sig_Value(), Get_Rear_TPMS_Sig_Value(), Get_Dis_Tpms_Unit(),Get_Front_TPMS_Sig_Vaild(), Get_Rear_TPMS_Sig_Vaild());
#endif #endif
SEG_SET_Navigation_STS(Get_Navigation_St_Dis(),Get_Navigation_Code_Dis(),Get_Navigation_Mileage_Dis()); SEG_SET_Navigation_STS(Get_Navigation_St_Dis(),Get_Navigation_Code_Dis(),Get_Navigation_Mileage_Dis());
......
...@@ -2023,7 +2023,7 @@ void SEG_SET_Voltage_NUM(uint8_t m_Flag, uint16_t m_NUM) ...@@ -2023,7 +2023,7 @@ void SEG_SET_Voltage_NUM(uint8_t m_Flag, uint16_t m_NUM)
* @param[in] m_valid1 前轮有效标志 -0 无效,显示-- * @param[in] m_valid1 前轮有效标志 -0 无效,显示--
* @param[in] m_valid2 后轮有效标志 -0 无效,显示-- * @param[in] m_valid2 后轮有效标志 -0 无效,显示--
*/ */
void SEG_SET_TPMS_NUM(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint8_t m_Unit, uint8_t m_valid1, uint8_t m_valid2) void SEG_SET_TPMS_DISPLAY(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint8_t m_Unit, uint8_t m_valid1, uint8_t m_valid2)
{ {
uint16_t Num1 = 0; uint16_t Num1 = 0;
uint16_t Num2 = 0; uint16_t Num2 = 0;
...@@ -2070,13 +2070,46 @@ void SEG_SET_TPMS_NUM(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint8_t ...@@ -2070,13 +2070,46 @@ void SEG_SET_TPMS_NUM(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint8_t
} }
else else
{ {
if (m_Unit == 0) if (m_Unit == 0)
{ {
IC2_SEG109 = IC_SEG_OFF; IC2_SEG109 = IC_SEG_OFF;
IC2_SEG110 = IC_SEG_ON; IC2_SEG110 = IC_SEG_ON;
IC2_SEG118 = IC_SEG_ON;
IC2_SEG138 = IC_SEG_ON; if ((Get_Current_PageType() == Page_Front_Tpms) || (Get_Front_FirstLearn_Flag() == 1) || (Get_Front_FirstLearn_Flag() == 3))
{
if(FLASH_SYNC_1Hz)
{
IC2_SEG138 = IC_SEG_ON;
}
else
{
IC2_SEG138 = IC_SEG_OFF;
}
}
else
{
IC2_SEG138 = IC_SEG_ON;
}
if ((Get_Current_PageType() == Page_Rear_Tpms) || (Get_Rear_FirstLearn_Flag() == 1) || (Get_Rear_FirstLearn_Flag() == 3))
{
if(FLASH_SYNC_1Hz)
{
IC2_SEG118 = IC_SEG_ON;
}
else
{
IC2_SEG118 = IC_SEG_OFF;
}
}
else
{
IC2_SEG118 = IC_SEG_ON;
}
} }
else else
{ {
...@@ -2084,9 +2117,13 @@ void SEG_SET_TPMS_NUM(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint8_t ...@@ -2084,9 +2117,13 @@ void SEG_SET_TPMS_NUM(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint8_t
IC2_SEG110 = IC_SEG_OFF; IC2_SEG110 = IC_SEG_OFF;
IC2_SEG118 = IC_SEG_OFF; IC2_SEG118 = IC_SEG_OFF;
IC2_SEG138 = IC_SEG_OFF; IC2_SEG138 = IC_SEG_OFF;
} }
} }
SEG_SET_FRONT_TPMS_NUM( Get_Front_FirstLearn_Flag(), m_NUM1, m_valid1);
SEG_SET_Rear_TPMS_NUM(Get_Rear_FirstLearn_Flag(), m_NUM2, m_valid2);
} }
else else
...@@ -2095,139 +2132,97 @@ void SEG_SET_TPMS_NUM(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint8_t ...@@ -2095,139 +2132,97 @@ void SEG_SET_TPMS_NUM(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint8_t
IC2_SEG110 = IC_SEG_ON; IC2_SEG110 = IC_SEG_ON;
IC2_SEG118 = IC_SEG_ON; IC2_SEG118 = IC_SEG_ON;
IC2_SEG138 = IC_SEG_ON; IC2_SEG138 = IC_SEG_ON;
SEG_SET_FRONT_TPMS_NUM( 2, m_NUM1, m_valid1);
SEG_SET_Rear_TPMS_NUM(2, m_NUM2, m_valid2);
} }
if (m_valid1 == 1)
}
else
{
IC2_SEG120 = IC_SEG_OFF;
IC2_SEG113 = IC_SEG_OFF;
IC2_SEG123 = IC_SEG_OFF;
IC2_SEG121 = IC_SEG_OFF;
IC2_SEG119 = IC_SEG_OFF;
IC2_SEG126 = IC_SEG_OFF;
IC2_SEG125 = IC_SEG_OFF;
IC2_SEG124 = IC_SEG_OFF;
IC2_SEG115 = IC_SEG_OFF;
IC2_SEG114 = IC_SEG_OFF;
IC2_SEG112 = IC_SEG_OFF;
IC2_SEG111 = IC_SEG_OFF;
IC2_SEG117 = IC_SEG_OFF;
IC2_SEG116 = IC_SEG_OFF;
IC2_SEG140 = IC_SEG_OFF;
IC2_SEG133 = IC_SEG_OFF;
IC2_SEG143 = IC_SEG_OFF;
IC2_SEG141 = IC_SEG_OFF;
IC2_SEG139 = IC_SEG_OFF;
IC2_SEG146 = IC_SEG_OFF;
IC2_SEG145 = IC_SEG_OFF;
IC2_SEG144 = IC_SEG_OFF;
IC2_SEG135 = IC_SEG_OFF;
IC2_SEG134 = IC_SEG_OFF;
IC2_SEG132 = IC_SEG_OFF;
IC2_SEG131 = IC_SEG_OFF;
IC2_SEG137 = IC_SEG_OFF;
IC2_SEG136 = IC_SEG_OFF;
IC2_SEG109 = IC_SEG_OFF;
IC2_SEG110 = IC_SEG_OFF;
IC2_SEG118 = IC_SEG_OFF;
IC2_SEG122 = IC_SEG_OFF;
IC2_SEG138 = IC_SEG_OFF;
IC2_SEG142 = IC_SEG_OFF;
}
}
void SEG_SET_FRONT_TPMS_NUM(uint8_t learnflag, uint16_t m_NUM1,uint8_t m_valid1)
{
uint16_t Num1 = 0;
uint16_t Num2 = 0;
uint8_t m8;
if (learnflag == 0)
{
if (Get_Current_PageType() == Page_Front_Tpms)
{ {
Num1 = m_NUM1 / 10u; if(FLASH_SYNC_1Hz)
m8 = SEG_DISPLAY_NUMBER0[Num1];
if (Bit_Is_Set(m8, 0))
{
IC2_SEG143 = IC_SEG_ON;
}
else
{
IC2_SEG143 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 1))
{
IC2_SEG141 = IC_SEG_ON;
}
else
{
IC2_SEG141 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 2))
{
IC2_SEG139 = IC_SEG_ON;
}
else
{
IC2_SEG139 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 3))
{
IC2_SEG146 = IC_SEG_ON;
}
else
{
IC2_SEG146 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 4))
{
IC2_SEG145 = IC_SEG_ON;
}
else
{
IC2_SEG145 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 5))
{
IC2_SEG144 = IC_SEG_ON;
}
else
{
IC2_SEG144 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 6))
{ {
IC2_SEG140 = IC_SEG_ON; IC2_SEG140 = IC_SEG_ON;
}
else
{
IC2_SEG140 = IC_SEG_OFF;
}
Num1 = m_NUM1 % 10u;
m8 = SEG_DISPLAY_NUMBER0[Num1];
if (Bit_Is_Set(m8, 0))
{
IC2_SEG135 = IC_SEG_ON;
}
else
{
IC2_SEG135 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 1))
{
IC2_SEG134 = IC_SEG_ON;
}
else
{
IC2_SEG134 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 2))
{
IC2_SEG132 = IC_SEG_ON;
}
else
{
IC2_SEG132 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 3))
{
IC2_SEG131 = IC_SEG_ON;
}
else
{
IC2_SEG131 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 4))
{
IC2_SEG137 = IC_SEG_ON;
}
else
{
IC2_SEG137 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 5))
{
IC2_SEG136 = IC_SEG_ON;
}
else
{
IC2_SEG136 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 6))
{
IC2_SEG133 = IC_SEG_ON; IC2_SEG133 = IC_SEG_ON;
} }
else else
{ {
IC2_SEG140 = IC_SEG_OFF;
IC2_SEG133 = IC_SEG_OFF; IC2_SEG133 = IC_SEG_OFF;
} }
IC2_SEG143 = IC_SEG_OFF;
IC2_SEG141 = IC_SEG_OFF;
IC2_SEG139 = IC_SEG_OFF;
IC2_SEG146 = IC_SEG_OFF;
IC2_SEG145 = IC_SEG_OFF;
IC2_SEG144 = IC_SEG_OFF;
IC2_SEG135 = IC_SEG_OFF;
IC2_SEG134 = IC_SEG_OFF;
IC2_SEG132 = IC_SEG_OFF;
IC2_SEG131 = IC_SEG_OFF;
IC2_SEG137 = IC_SEG_OFF;
IC2_SEG136 = IC_SEG_OFF;
} }
else else
{ {
IC2_SEG140 = IC_SEG_ON; IC2_SEG140 = IC_SEG_ON;
IC2_SEG133 = IC_SEG_ON; IC2_SEG133 = IC_SEG_ON;
IC2_SEG143 = IC_SEG_OFF; IC2_SEG143 = IC_SEG_OFF;
IC2_SEG141 = IC_SEG_OFF; IC2_SEG141 = IC_SEG_OFF;
IC2_SEG139 = IC_SEG_OFF; IC2_SEG139 = IC_SEG_OFF;
IC2_SEG146 = IC_SEG_OFF; IC2_SEG146 = IC_SEG_OFF;
IC2_SEG145 = IC_SEG_OFF; IC2_SEG145 = IC_SEG_OFF;
IC2_SEG144 = IC_SEG_OFF; IC2_SEG144 = IC_SEG_OFF;
IC2_SEG135 = IC_SEG_OFF; IC2_SEG135 = IC_SEG_OFF;
IC2_SEG134 = IC_SEG_OFF; IC2_SEG134 = IC_SEG_OFF;
IC2_SEG132 = IC_SEG_OFF; IC2_SEG132 = IC_SEG_OFF;
...@@ -2235,131 +2230,834 @@ void SEG_SET_TPMS_NUM(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint8_t ...@@ -2235,131 +2230,834 @@ void SEG_SET_TPMS_NUM(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint8_t
IC2_SEG137 = IC_SEG_OFF; IC2_SEG137 = IC_SEG_OFF;
IC2_SEG136 = IC_SEG_OFF; IC2_SEG136 = IC_SEG_OFF;
} }
if (m_valid2 == 1)
}
else if (learnflag == 1)
{
if(FLASH_SYNC_1Hz)
{ {
Num2 = m_NUM2 / 10u; IC2_SEG140 = IC_SEG_ON;
m8 = SEG_DISPLAY_NUMBER0[Num2]; IC2_SEG133 = IC_SEG_ON;
if (Bit_Is_Set(m8, 0)) }
{ else
IC2_SEG123 = IC_SEG_ON; {
} IC2_SEG140 = IC_SEG_OFF;
else IC2_SEG133 = IC_SEG_OFF;
{ }
IC2_SEG123 = IC_SEG_OFF; IC2_SEG143 = IC_SEG_OFF;
} IC2_SEG141 = IC_SEG_OFF;
if (Bit_Is_Set(m8, 1)) IC2_SEG139 = IC_SEG_OFF;
{ IC2_SEG146 = IC_SEG_OFF;
IC2_SEG121 = IC_SEG_ON; IC2_SEG145 = IC_SEG_OFF;
} IC2_SEG144 = IC_SEG_OFF;
else IC2_SEG135 = IC_SEG_OFF;
{ IC2_SEG134 = IC_SEG_OFF;
IC2_SEG121 = IC_SEG_OFF; IC2_SEG132 = IC_SEG_OFF;
} IC2_SEG131 = IC_SEG_OFF;
if (Bit_Is_Set(m8, 2)) IC2_SEG137 = IC_SEG_OFF;
{ IC2_SEG136 = IC_SEG_OFF;
IC2_SEG119 = IC_SEG_ON; }
} else if (learnflag == 2)
else {
{ if (Get_Current_PageType() == Page_Front_Tpms)
IC2_SEG119 = IC_SEG_OFF; {
} if(FLASH_SYNC_1Hz)
if (Bit_Is_Set(m8, 3))
{
IC2_SEG126 = IC_SEG_ON;
}
else
{
IC2_SEG126 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 4))
{
IC2_SEG125 = IC_SEG_ON;
}
else
{
IC2_SEG125 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 5))
{
IC2_SEG124 = IC_SEG_ON;
}
else
{
IC2_SEG124 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 6))
{
IC2_SEG120 = IC_SEG_ON;
}
else
{ {
IC2_SEG120 = IC_SEG_OFF; if (m_valid1 == 1)
} {
Num1 = m_NUM1 / 10u;
if (Get_Dis_Tpms_Unit() == 0)
{
m8 = SEG_DISPLAY_NUMBER0[Num1];
}
else
{
m8 = SEG_UNDISPLAY_NUMBER0[Num1];
}
Num2 = m_NUM2 % 10u; if (Bit_Is_Set(m8, 0))
m8 = SEG_DISPLAY_NUMBER0[Num2]; {
if (Bit_Is_Set(m8, 0)) IC2_SEG143 = IC_SEG_ON;
{ }
IC2_SEG115 = IC_SEG_ON; else
} {
else IC2_SEG143 = IC_SEG_OFF;
{ }
IC2_SEG115 = IC_SEG_OFF; if (Bit_Is_Set(m8, 1))
{
IC2_SEG141 = IC_SEG_ON;
}
else
{
IC2_SEG141 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 2))
{
IC2_SEG139 = IC_SEG_ON;
}
else
{
IC2_SEG139 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 3))
{
IC2_SEG146 = IC_SEG_ON;
}
else
{
IC2_SEG146 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 4))
{
IC2_SEG145 = IC_SEG_ON;
}
else
{
IC2_SEG145 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 5))
{
IC2_SEG144 = IC_SEG_ON;
}
else
{
IC2_SEG144 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 6))
{
IC2_SEG140 = IC_SEG_ON;
}
else
{
IC2_SEG140 = IC_SEG_OFF;
}
Num1 = m_NUM1 % 10u;
m8 = SEG_DISPLAY_NUMBER0[Num1];
if (Bit_Is_Set(m8, 0))
{
IC2_SEG135 = IC_SEG_ON;
}
else
{
IC2_SEG135 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 1))
{
IC2_SEG134 = IC_SEG_ON;
}
else
{
IC2_SEG134 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 2))
{
IC2_SEG132 = IC_SEG_ON;
}
else
{
IC2_SEG132 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 3))
{
IC2_SEG131 = IC_SEG_ON;
}
else
{
IC2_SEG131 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 4))
{
IC2_SEG137 = IC_SEG_ON;
}
else
{
IC2_SEG137 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 5))
{
IC2_SEG136 = IC_SEG_ON;
}
else
{
IC2_SEG136 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 6))
{
IC2_SEG133 = IC_SEG_ON;
}
else
{
IC2_SEG133 = IC_SEG_OFF;
}
}
else
{
IC2_SEG140 = IC_SEG_ON;
IC2_SEG133 = IC_SEG_ON;
IC2_SEG143 = IC_SEG_OFF;
IC2_SEG141 = IC_SEG_OFF;
IC2_SEG139 = IC_SEG_OFF;
IC2_SEG146 = IC_SEG_OFF;
IC2_SEG145 = IC_SEG_OFF;
IC2_SEG144 = IC_SEG_OFF;
IC2_SEG135 = IC_SEG_OFF;
IC2_SEG134 = IC_SEG_OFF;
IC2_SEG132 = IC_SEG_OFF;
IC2_SEG131 = IC_SEG_OFF;
IC2_SEG137 = IC_SEG_OFF;
IC2_SEG136 = IC_SEG_OFF;
}
} }
if (Bit_Is_Set(m8, 1)) else
{
IC2_SEG140 = IC_SEG_OFF;
IC2_SEG133 = IC_SEG_OFF;
IC2_SEG143 = IC_SEG_OFF;
IC2_SEG141 = IC_SEG_OFF;
IC2_SEG139 = IC_SEG_OFF;
IC2_SEG146 = IC_SEG_OFF;
IC2_SEG145 = IC_SEG_OFF;
IC2_SEG144 = IC_SEG_OFF;
IC2_SEG135 = IC_SEG_OFF;
IC2_SEG134 = IC_SEG_OFF;
IC2_SEG132 = IC_SEG_OFF;
IC2_SEG131 = IC_SEG_OFF;
IC2_SEG137 = IC_SEG_OFF;
IC2_SEG136 = IC_SEG_OFF;
}
}
else
{
if (m_valid1 == 1)
{
Num1 = m_NUM1 / 10u;
if (Get_Dis_Tpms_Unit() == 0)
{
m8 = SEG_DISPLAY_NUMBER0[Num1];
}
else
{
m8 = SEG_UNDISPLAY_NUMBER0[Num1];
}
if (Bit_Is_Set(m8, 0))
{
IC2_SEG143 = IC_SEG_ON;
}
else
{
IC2_SEG143 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 1))
{
IC2_SEG141 = IC_SEG_ON;
}
else
{
IC2_SEG141 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 2))
{
IC2_SEG139 = IC_SEG_ON;
}
else
{
IC2_SEG139 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 3))
{
IC2_SEG146 = IC_SEG_ON;
}
else
{
IC2_SEG146 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 4))
{
IC2_SEG145 = IC_SEG_ON;
}
else
{
IC2_SEG145 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 5))
{
IC2_SEG144 = IC_SEG_ON;
}
else
{
IC2_SEG144 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 6))
{
IC2_SEG140 = IC_SEG_ON;
}
else
{
IC2_SEG140 = IC_SEG_OFF;
}
Num1 = m_NUM1 % 10u;
m8 = SEG_DISPLAY_NUMBER0[Num1];
if (Bit_Is_Set(m8, 0))
{
IC2_SEG135 = IC_SEG_ON;
}
else
{
IC2_SEG135 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 1))
{
IC2_SEG134 = IC_SEG_ON;
}
else
{
IC2_SEG134 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 2))
{
IC2_SEG132 = IC_SEG_ON;
}
else
{
IC2_SEG132 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 3))
{
IC2_SEG131 = IC_SEG_ON;
}
else
{
IC2_SEG131 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 4))
{
IC2_SEG137 = IC_SEG_ON;
}
else
{
IC2_SEG137 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 5))
{
IC2_SEG136 = IC_SEG_ON;
}
else
{
IC2_SEG136 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 6))
{
IC2_SEG133 = IC_SEG_ON;
}
else
{
IC2_SEG133 = IC_SEG_OFF;
}
}
else
{
IC2_SEG140 = IC_SEG_ON;
IC2_SEG133 = IC_SEG_ON;
IC2_SEG143 = IC_SEG_OFF;
IC2_SEG141 = IC_SEG_OFF;
IC2_SEG139 = IC_SEG_OFF;
IC2_SEG146 = IC_SEG_OFF;
IC2_SEG145 = IC_SEG_OFF;
IC2_SEG144 = IC_SEG_OFF;
IC2_SEG135 = IC_SEG_OFF;
IC2_SEG134 = IC_SEG_OFF;
IC2_SEG132 = IC_SEG_OFF;
IC2_SEG131 = IC_SEG_OFF;
IC2_SEG137 = IC_SEG_OFF;
IC2_SEG136 = IC_SEG_OFF;
}
}
}
else if (learnflag == 3)
{
if(FLASH_SYNC_1Hz)
{
IC2_SEG140 = IC_SEG_ON;
IC2_SEG133 = IC_SEG_ON;
IC2_SEG143 = IC_SEG_ON;
IC2_SEG141 = IC_SEG_ON;
IC2_SEG139 = IC_SEG_ON;
IC2_SEG146 = IC_SEG_ON;
IC2_SEG145 = IC_SEG_OFF;
IC2_SEG144 = IC_SEG_ON;
IC2_SEG135 = IC_SEG_ON;
IC2_SEG134 = IC_SEG_ON;
IC2_SEG132 = IC_SEG_ON;
IC2_SEG131 = IC_SEG_ON;
IC2_SEG137 = IC_SEG_OFF;
IC2_SEG136 = IC_SEG_ON;
}
else
{
IC2_SEG140 = IC_SEG_OFF;
IC2_SEG133 = IC_SEG_OFF;
IC2_SEG143 = IC_SEG_OFF;
IC2_SEG141 = IC_SEG_OFF;
IC2_SEG139 = IC_SEG_OFF;
IC2_SEG146 = IC_SEG_OFF;
IC2_SEG145 = IC_SEG_OFF;
IC2_SEG144 = IC_SEG_OFF;
IC2_SEG135 = IC_SEG_OFF;
IC2_SEG134 = IC_SEG_OFF;
IC2_SEG132 = IC_SEG_OFF;
IC2_SEG131 = IC_SEG_OFF;
IC2_SEG137 = IC_SEG_OFF;
IC2_SEG136 = IC_SEG_OFF;
}
}
else
{
;
}
}
void SEG_SET_Rear_TPMS_NUM(uint8_t learnflag, uint16_t m_NUM2,uint8_t m_valid2)
{
uint16_t Num1 = 0;
uint16_t Num2 = 0;
uint8_t m8;
if (learnflag == 0)
{
if (Get_Current_PageType() == Page_Rear_Tpms)
{
if(FLASH_SYNC_1Hz)
{
IC2_SEG120 = IC_SEG_ON;
IC2_SEG113 = IC_SEG_ON;
}
else
{
IC2_SEG120 = IC_SEG_OFF;
IC2_SEG113 = IC_SEG_OFF;
}
IC2_SEG123 = IC_SEG_OFF;
IC2_SEG121 = IC_SEG_OFF;
IC2_SEG119 = IC_SEG_OFF;
IC2_SEG126 = IC_SEG_OFF;
IC2_SEG125 = IC_SEG_OFF;
IC2_SEG124 = IC_SEG_OFF;
IC2_SEG115 = IC_SEG_OFF;
IC2_SEG114 = IC_SEG_OFF;
IC2_SEG112 = IC_SEG_OFF;
IC2_SEG111 = IC_SEG_OFF;
IC2_SEG117 = IC_SEG_OFF;
IC2_SEG116 = IC_SEG_OFF;
}
else
{
IC2_SEG120 = IC_SEG_ON;
IC2_SEG113 = IC_SEG_ON;
IC2_SEG123 = IC_SEG_OFF;
IC2_SEG121 = IC_SEG_OFF;
IC2_SEG119 = IC_SEG_OFF;
IC2_SEG126 = IC_SEG_OFF;
IC2_SEG125 = IC_SEG_OFF;
IC2_SEG124 = IC_SEG_OFF;
IC2_SEG115 = IC_SEG_OFF;
IC2_SEG114 = IC_SEG_OFF;
IC2_SEG112 = IC_SEG_OFF;
IC2_SEG111 = IC_SEG_OFF;
IC2_SEG117 = IC_SEG_OFF;
IC2_SEG116 = IC_SEG_OFF;
}
}
else if (learnflag == 1)
{
if(FLASH_SYNC_1Hz)
{
IC2_SEG120 = IC_SEG_ON;
IC2_SEG113 = IC_SEG_ON;
}
else
{
IC2_SEG120 = IC_SEG_OFF;
IC2_SEG113 = IC_SEG_OFF;
}
IC2_SEG123 = IC_SEG_OFF;
IC2_SEG121 = IC_SEG_OFF;
IC2_SEG119 = IC_SEG_OFF;
IC2_SEG126 = IC_SEG_OFF;
IC2_SEG125 = IC_SEG_OFF;
IC2_SEG124 = IC_SEG_OFF;
IC2_SEG115 = IC_SEG_OFF;
IC2_SEG114 = IC_SEG_OFF;
IC2_SEG112 = IC_SEG_OFF;
IC2_SEG111 = IC_SEG_OFF;
IC2_SEG117 = IC_SEG_OFF;
IC2_SEG116 = IC_SEG_OFF;
}
else if (learnflag == 2)
{
if (Get_Current_PageType() == Page_Rear_Tpms)
{
if(FLASH_SYNC_1Hz)
{ {
IC2_SEG114 = IC_SEG_ON; if (m_valid2 == 1)
{
Num2 = m_NUM2 / 10u;
if (Get_Dis_Tpms_Unit() == 0)
{
m8 = SEG_DISPLAY_NUMBER0[Num2];
}
else
{
m8 = SEG_UNDISPLAY_NUMBER0[Num2];
}
if (Bit_Is_Set(m8, 0))
{
IC2_SEG123 = IC_SEG_ON;
}
else
{
IC2_SEG123 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 1))
{
IC2_SEG121 = IC_SEG_ON;
}
else
{
IC2_SEG121 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 2))
{
IC2_SEG119 = IC_SEG_ON;
}
else
{
IC2_SEG119 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 3))
{
IC2_SEG126 = IC_SEG_ON;
}
else
{
IC2_SEG126 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 4))
{
IC2_SEG125 = IC_SEG_ON;
}
else
{
IC2_SEG125 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 5))
{
IC2_SEG124 = IC_SEG_ON;
}
else
{
IC2_SEG124 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 6))
{
IC2_SEG120 = IC_SEG_ON;
}
else
{
IC2_SEG120 = IC_SEG_OFF;
}
Num2 = m_NUM2 % 10u;
m8 = SEG_DISPLAY_NUMBER0[Num2];
if (Bit_Is_Set(m8, 0))
{
IC2_SEG115 = IC_SEG_ON;
}
else
{
IC2_SEG115 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 1))
{
IC2_SEG114 = IC_SEG_ON;
}
else
{
IC2_SEG114 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 2))
{
IC2_SEG112 = IC_SEG_ON;
}
else
{
IC2_SEG112 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 3))
{
IC2_SEG111 = IC_SEG_ON;
}
else
{
IC2_SEG111 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 4))
{
IC2_SEG117 = IC_SEG_ON;
}
else
{
IC2_SEG117 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 5))
{
IC2_SEG116 = IC_SEG_ON;
}
else
{
IC2_SEG116 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 6))
{
IC2_SEG113 = IC_SEG_ON;
}
else
{
IC2_SEG113 = IC_SEG_OFF;
}
}
else
{
IC2_SEG120 = IC_SEG_ON;
IC2_SEG113 = IC_SEG_ON;
IC2_SEG123 = IC_SEG_OFF;
IC2_SEG121 = IC_SEG_OFF;
IC2_SEG119 = IC_SEG_OFF;
IC2_SEG126 = IC_SEG_OFF;
IC2_SEG125 = IC_SEG_OFF;
IC2_SEG124 = IC_SEG_OFF;
IC2_SEG115 = IC_SEG_OFF;
IC2_SEG114 = IC_SEG_OFF;
IC2_SEG112 = IC_SEG_OFF;
IC2_SEG111 = IC_SEG_OFF;
IC2_SEG117 = IC_SEG_OFF;
IC2_SEG116 = IC_SEG_OFF;
}
} }
else else
{ {
IC2_SEG114 = IC_SEG_OFF; IC2_SEG120 = IC_SEG_OFF;
IC2_SEG113 = IC_SEG_OFF;
IC2_SEG123 = IC_SEG_OFF;
IC2_SEG121 = IC_SEG_OFF;
IC2_SEG119 = IC_SEG_OFF;
IC2_SEG126 = IC_SEG_OFF;
IC2_SEG125 = IC_SEG_OFF;
IC2_SEG124 = IC_SEG_OFF;
IC2_SEG115 = IC_SEG_OFF;
IC2_SEG114 = IC_SEG_OFF;
IC2_SEG112 = IC_SEG_OFF;
IC2_SEG111 = IC_SEG_OFF;
IC2_SEG117 = IC_SEG_OFF;
IC2_SEG116 = IC_SEG_OFF;
} }
if (Bit_Is_Set(m8, 2)) }
else
{
if (m_valid2 == 1)
{ {
IC2_SEG112 = IC_SEG_ON; Num2 = m_NUM2 / 10u;
if (Get_Dis_Tpms_Unit() == 0)
{
m8 = SEG_DISPLAY_NUMBER0[Num2];
}
else
{
m8 = SEG_UNDISPLAY_NUMBER0[Num2];
}
if (Bit_Is_Set(m8, 0))
{
IC2_SEG123 = IC_SEG_ON;
}
else
{
IC2_SEG123 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 1))
{
IC2_SEG121 = IC_SEG_ON;
}
else
{
IC2_SEG121 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 2))
{
IC2_SEG119 = IC_SEG_ON;
}
else
{
IC2_SEG119 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 3))
{
IC2_SEG126 = IC_SEG_ON;
}
else
{
IC2_SEG126 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 4))
{
IC2_SEG125 = IC_SEG_ON;
}
else
{
IC2_SEG125 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 5))
{
IC2_SEG124 = IC_SEG_ON;
}
else
{
IC2_SEG124 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 6))
{
IC2_SEG120 = IC_SEG_ON;
}
else
{
IC2_SEG120 = IC_SEG_OFF;
}
Num2 = m_NUM2 % 10u;
m8 = SEG_DISPLAY_NUMBER0[Num2];
if (Bit_Is_Set(m8, 0))
{
IC2_SEG115 = IC_SEG_ON;
}
else
{
IC2_SEG115 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 1))
{
IC2_SEG114 = IC_SEG_ON;
}
else
{
IC2_SEG114 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 2))
{
IC2_SEG112 = IC_SEG_ON;
}
else
{
IC2_SEG112 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 3))
{
IC2_SEG111 = IC_SEG_ON;
}
else
{
IC2_SEG111 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 4))
{
IC2_SEG117 = IC_SEG_ON;
}
else
{
IC2_SEG117 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 5))
{
IC2_SEG116 = IC_SEG_ON;
}
else
{
IC2_SEG116 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 6))
{
IC2_SEG113 = IC_SEG_ON;
}
else
{
IC2_SEG113 = IC_SEG_OFF;
}
} }
else else
{ {
IC2_SEG120 = IC_SEG_ON;
IC2_SEG113 = IC_SEG_ON;
IC2_SEG123 = IC_SEG_OFF;
IC2_SEG121 = IC_SEG_OFF;
IC2_SEG119 = IC_SEG_OFF;
IC2_SEG126 = IC_SEG_OFF;
IC2_SEG125 = IC_SEG_OFF;
IC2_SEG124 = IC_SEG_OFF;
IC2_SEG115 = IC_SEG_OFF;
IC2_SEG114 = IC_SEG_OFF;
IC2_SEG112 = IC_SEG_OFF; IC2_SEG112 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 3))
{
IC2_SEG111 = IC_SEG_ON;
}
else
{
IC2_SEG111 = IC_SEG_OFF; IC2_SEG111 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 4))
{
IC2_SEG117 = IC_SEG_ON;
}
else
{
IC2_SEG117 = IC_SEG_OFF; IC2_SEG117 = IC_SEG_OFF;
}
if (Bit_Is_Set(m8, 5))
{
IC2_SEG116 = IC_SEG_ON;
}
else
{
IC2_SEG116 = IC_SEG_OFF; IC2_SEG116 = IC_SEG_OFF;
} }
if (Bit_Is_Set(m8, 6))
{
IC2_SEG113 = IC_SEG_ON;
}
else
{
IC2_SEG113 = IC_SEG_OFF;
}
} }
else
}
else if (learnflag == 3)
{
if(FLASH_SYNC_1Hz)
{ {
IC2_SEG120 = IC_SEG_ON; IC2_SEG120 = IC_SEG_ON;
IC2_SEG113 = IC_SEG_ON; IC2_SEG113 = IC_SEG_ON;
IC2_SEG123 = IC_SEG_ON;
IC2_SEG121 = IC_SEG_ON;
IC2_SEG119 = IC_SEG_ON;
IC2_SEG126 = IC_SEG_ON;
IC2_SEG125 = IC_SEG_OFF;
IC2_SEG124 = IC_SEG_ON;
IC2_SEG115 = IC_SEG_ON;
IC2_SEG114 = IC_SEG_ON;
IC2_SEG112 = IC_SEG_ON;
IC2_SEG111 = IC_SEG_ON;
IC2_SEG117 = IC_SEG_OFF;
IC2_SEG116 = IC_SEG_ON;
}
else
{
IC2_SEG120 = IC_SEG_OFF;
IC2_SEG113 = IC_SEG_OFF;
IC2_SEG123 = IC_SEG_OFF; IC2_SEG123 = IC_SEG_OFF;
IC2_SEG121 = IC_SEG_OFF; IC2_SEG121 = IC_SEG_OFF;
IC2_SEG119 = IC_SEG_OFF; IC2_SEG119 = IC_SEG_OFF;
...@@ -2375,48 +3073,11 @@ void SEG_SET_TPMS_NUM(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint8_t ...@@ -2375,48 +3073,11 @@ void SEG_SET_TPMS_NUM(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint8_t
IC2_SEG116 = IC_SEG_OFF; IC2_SEG116 = IC_SEG_OFF;
} }
} }
else else
{ {
IC2_SEG120 = IC_SEG_OFF; ;
IC2_SEG113 = IC_SEG_OFF;
IC2_SEG123 = IC_SEG_OFF;
IC2_SEG121 = IC_SEG_OFF;
IC2_SEG119 = IC_SEG_OFF;
IC2_SEG126 = IC_SEG_OFF;
IC2_SEG125 = IC_SEG_OFF;
IC2_SEG124 = IC_SEG_OFF;
IC2_SEG115 = IC_SEG_OFF;
IC2_SEG114 = IC_SEG_OFF;
IC2_SEG112 = IC_SEG_OFF;
IC2_SEG111 = IC_SEG_OFF;
IC2_SEG117 = IC_SEG_OFF;
IC2_SEG116 = IC_SEG_OFF;
IC2_SEG140 = IC_SEG_OFF;
IC2_SEG133 = IC_SEG_OFF;
IC2_SEG143 = IC_SEG_OFF;
IC2_SEG141 = IC_SEG_OFF;
IC2_SEG139 = IC_SEG_OFF;
IC2_SEG146 = IC_SEG_OFF;
IC2_SEG145 = IC_SEG_OFF;
IC2_SEG144 = IC_SEG_OFF;
IC2_SEG135 = IC_SEG_OFF;
IC2_SEG134 = IC_SEG_OFF;
IC2_SEG132 = IC_SEG_OFF;
IC2_SEG131 = IC_SEG_OFF;
IC2_SEG137 = IC_SEG_OFF;
IC2_SEG136 = IC_SEG_OFF;
IC2_SEG109 = IC_SEG_OFF;
IC2_SEG110 = IC_SEG_OFF;
IC2_SEG118 = IC_SEG_OFF;
IC2_SEG122 = IC_SEG_OFF;
IC2_SEG138 = IC_SEG_OFF;
IC2_SEG142 = IC_SEG_OFF;
} }
} }
/**@brief 总计里程显示函数 /**@brief 总计里程显示函数
* @param[in] m_NUM_ODO 显示ODO数值 0 < m_NUM <= 199999 * @param[in] m_NUM_ODO 显示ODO数值 0 < m_NUM <= 199999
...@@ -3587,7 +4248,7 @@ void Check_SEG_Display(void) ...@@ -3587,7 +4248,7 @@ void Check_SEG_Display(void)
SEG_SET_Clock(((a * 10u) + a), ((a * 10u) + a), 1u, 1u, 1u); SEG_SET_Clock(((a * 10u) + a), ((a * 10u) + a), 1u, 1u, 1u);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Screen_Time, LED_ON); LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Screen_Time, LED_ON);
#if(IC_Current == TY200_080000b_ty) #if(IC_Current == TY200_080000b_ty)
SEG_SET_TPMS_NUM(1, a * 11, a * 11, 0, 1, 1); SEG_SET_TPMS_DISPLAY(1, a * 11, a * 11, 0, 1, 1);
#endif #endif
SEG_SET_Voltage_NUM(1, a * 111); SEG_SET_Voltage_NUM(1, a * 111);
SEG_SET_Navigation_STS(1, 3, a * 111100); SEG_SET_Navigation_STS(1, 3, a * 111100);
...@@ -3656,7 +4317,7 @@ void Checkself_SEG_Display(void) ...@@ -3656,7 +4317,7 @@ void Checkself_SEG_Display(void)
LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Screen_Time, LED_ON); LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Screen_Time, LED_ON);
#if(IC_Current == TY200_080000b_ty) #if(IC_Current == TY200_080000b_ty)
TPMS = (Checkself_SEG_step / 3) * 11; TPMS = (Checkself_SEG_step / 3) * 11;
SEG_SET_TPMS_NUM(1, TPMS, TPMS, 0, 1, 1); SEG_SET_TPMS_DISPLAY(1, TPMS, TPMS, 0, 1, 1);
#endif #endif
voltage = (Checkself_SEG_step / 3) * 111; voltage = (Checkself_SEG_step / 3) * 111;
SEG_SET_Voltage_NUM(1, voltage); SEG_SET_Voltage_NUM(1, voltage);
......
...@@ -48,11 +48,13 @@ void SEG_SET_EspeedDial(uint8_t m_Flag, uint8_t m_SEG); ...@@ -48,11 +48,13 @@ void SEG_SET_EspeedDial(uint8_t m_Flag, uint8_t m_SEG);
void SEG_SET_CoolantDial(uint8_t m_Flag, uint8_t m_SEG, uint16_t m_Num, uint8_t m_flash); void SEG_SET_CoolantDial(uint8_t m_Flag, uint8_t m_SEG, uint16_t m_Num, uint8_t m_flash);
void SEG_SET_VSpeed_NUM(uint8_t m_Flag, uint16_t m_NUM, uint8_t m_Unit); void SEG_SET_VSpeed_NUM(uint8_t m_Flag, uint16_t m_NUM, uint8_t m_Unit);
void SEG_SET_Voltage_NUM(uint8_t m_Flag, uint16_t m_NUM); void SEG_SET_Voltage_NUM(uint8_t m_Flag, uint16_t m_NUM);
void SEG_SET_TPMS_NUM(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint8_t m_Unit, uint8_t m_valid1, uint8_t m_valid2); void SEG_SET_TPMS_DISPLAY(uint8_t m_Flag, uint16_t m_NUM1, uint16_t m_NUM2, uint8_t m_Unit, uint8_t m_valid1, uint8_t m_valid2);
void SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS(uint8_t m_Uint, uint32_t m_NUM_ODO, uint32_t m_NUM_TRIP); void SEG_SET_ODO_TRIP_FAULTCODE_TCS_DIS(uint8_t m_Uint, uint32_t m_NUM_ODO, uint32_t m_NUM_TRIP);
void SEG_SET_Clock(uint8_t m_hour, uint8_t m_minute, uint8_t m_icon, uint8_t m_Flag1, uint8_t m_Flag2); void SEG_SET_Clock(uint8_t m_hour, uint8_t m_minute, uint8_t m_icon, uint8_t m_Flag1, uint8_t m_Flag2);
void SEG_SET_Navigation_STS(uint8_t m_Flag, uint8_t m_Code, uint32_t m_Mileage); void SEG_SET_Navigation_STS(uint8_t m_Flag, uint8_t m_Code, uint32_t m_Mileage);
void Check_SEG_Display(void); void Check_SEG_Display(void);
void SEG_SET_FRONT_TPMS_NUM(uint8_t learnflag, uint16_t m_NUM1,uint8_t m_valid1);
void SEG_SET_Rear_TPMS_NUM(uint8_t learnflag, uint16_t m_NUM2,uint8_t m_valid2);
extern uint8_t check_SEG_step; extern uint8_t check_SEG_step;
extern uint8_t Espeed_check_SEG_step; extern uint8_t Espeed_check_SEG_step;
......
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