Commit 2193e866 authored by 李冠华's avatar 李冠华

🐞 fix:修改需要判断3帧信号的指示灯闪烁的问题

parent 58afa751
......@@ -167,10 +167,12 @@ static Tellib_uint16_t LED_EFI_failure_Judgement(void)
if ((g_EngineMalfunctionStatus == 0U) && (g_u8EmsFltLv3Count >= 3U))
{
g_EngineMalfunctionStatus = 1U;
g_u8EmsFltLv3Count = 0U;
}
else if ((g_EngineMalfunctionStatus == 1U) && (g_u8EmsFltLv3Count >= 3U))
{
g_EngineMalfunctionStatus = 0U;
g_u8EmsFltLv3Count = 0U;
}
LED_STATE = (Tellib_uint16_t) g_EngineMalfunctionStatus;
......@@ -248,10 +250,12 @@ static Tellib_uint16_t LED_Lead_Acid_Battery_Failure_Judgement(void)
if ((g_VoltLowStatus == 0U) && (g_VoltLowCount >= 3U))
{
g_VoltLowStatus = 1U;
g_VoltLowCount = 0U;
}
else if ((g_VoltLowStatus == 1U) && (g_VoltLowCount >= 3U))
{
g_VoltLowStatus = 0U;
g_VoltLowCount = 0U;
}
LED_STATE = (Tellib_uint16_t) g_VoltLowStatus;
......@@ -280,10 +284,12 @@ static Tellib_uint16_t LED_Oil_Pressure_Judgement(void)
if ((g_EngineOilLowStatus == 0U) && (g_EngineOilLowCount >= 3U))
{
g_EngineOilLowStatus = 1U;
g_EngineOilLowCount = 0U;
}
else if ((g_EngineOilLowStatus == 1U) && (g_EngineOilLowCount >= 3U))
{
g_EngineOilLowStatus = 0U;
g_EngineOilLowCount = 0U;
}
LED_STATE = (Tellib_uint16_t) g_EngineOilLowStatus;
......@@ -321,10 +327,12 @@ static Tellib_uint16_t LED_Grass_Full_Judgement(void)
if ((g_GrassSwStatus == 0U) && (g_GrassSwCount >= 3U))
{
g_GrassSwStatus = 1U;
g_GrassSwCount = 0U;
}
else if ((g_GrassSwStatus == 1U) && (g_GrassSwCount >= 3U))
{
g_GrassSwStatus = 0U;
g_GrassSwCount = 0U;
}
LED_STATE = (Tellib_uint16_t) g_GrassSwStatus;
......@@ -366,10 +374,12 @@ static Tellib_uint16_t LED_OVERLOAD_Judgement(void)
if ((g_OverLoadStatus[i] == 0U) && (g_OverLoadCount[i] >= 3U))
{
g_OverLoadStatus[i] = 1U;
g_OverLoadCount[i] = 0U;
}
else if ((g_OverLoadStatus[i] == 1U) && (g_OverLoadCount[i] >= 3U))
{
g_OverLoadStatus[i] = 0U;
g_OverLoadCount[i] = 0U;
}
}
......@@ -417,10 +427,12 @@ static Tellib_uint16_t LED_READY_Judgement(void)
if ((g_ReadyStatus == 0U) && (g_ReadyCount >= 3U))
{
g_ReadyStatus = 1U;
g_ReadyCount = 0U;
}
else if ((g_ReadyStatus == 1U) && (g_ReadyCount >= 3U))
{
g_ReadyStatus = 0U;
g_ReadyCount = 0U;
}
LED_STATE = (Tellib_uint16_t) g_ReadyStatus;
......@@ -458,10 +470,12 @@ static Tellib_uint16_t LED_Seat_Detection_Judgement(void)
if ((g_SeatStatus == 0U) && (g_SeatCount >= 3U))
{
g_SeatStatus = 1U;
g_SeatCount = 0U;
}
else if ((g_SeatStatus == 1U) && (g_SeatCount >= 3U))
{
g_SeatStatus = 0U;
g_SeatCount = 0U;
}
LED_STATE = (Tellib_uint16_t) g_SeatStatus;
......@@ -509,10 +523,12 @@ static Tellib_uint16_t LED_Key_Access_Judgement(void)
if ((g_KeyStatus == 0U) && (g_KeyCount >= 3U))
{
g_KeyStatus = 1U;
g_KeyCount = 0U;
}
else if ((g_KeyStatus == 1U) && (g_KeyCount >= 3U))
{
g_KeyStatus = 0U;
g_KeyCount = 0U;
}
LED_STATE = (Tellib_uint16_t) g_KeyStatus;
......@@ -567,14 +583,17 @@ static Tellib_uint16_t LED_Battery_Charging_Judgement(void)
if ((g_ChgModeStatus != 1U) && (g_ChgModeCount >= 3U))
{
g_ChgModeStatus = 1U;
g_ChgModeCount = 0U;
}
else if ((g_ChgModeStatus != 2U) && (g_ChgModeCount >= 3U))
{
g_ChgModeStatus = 2U;
g_ChgModeCount = 0U;
}
else if ((g_ChgModeStatus != 0U) && (g_ChgModeCount >= 3U))
{
g_ChgModeStatus = 0U;
g_ChgModeCount = 0U;
}
LED_STATE = (Tellib_uint16_t) g_ChgModeStatus;
......@@ -661,10 +680,12 @@ static Tellib_uint16_t LED_Cutterhead_Switch_Judgement(void)
if ((g_PtoSwStatus == 0U) && (g_PtoSwCount >= 3U))
{
g_PtoSwStatus = 1U;
g_PtoSwCount = 0U;
}
else if ((g_PtoSwStatus == 1U) && (g_PtoSwCount >= 3U))
{
g_PtoSwStatus = 0U;
g_PtoSwCount = 0U;
}
LED_STATE = (Tellib_uint16_t) g_PtoSwStatus;
......@@ -744,18 +765,22 @@ static Tellib_uint16_t LED_Engine_Works_Judgement(void)
if ((g_WorkStatus != 2U) && (g_WorkCount >= 3U))
{
g_WorkStatus = 2U;
g_WorkCount = 0U;
}
else if ((g_WorkStatus != 3U) && (g_WorkCount >= 3U))
{
g_WorkStatus = 3U;
g_WorkCount = 0U;
}
else if ((g_WorkStatus != 4U) && (g_WorkCount >= 3U))
{
g_WorkStatus = 4U;
g_WorkCount = 0U;
}
else if ((g_WorkStatus != 0U) && (g_WorkCount >= 3U))
{
g_WorkStatus = 0U;
g_WorkCount = 0U;
}
if ((g_WorkStatus == 2U) || (g_WorkStatus == 3U) || (g_WorkStatus == 4U))
......@@ -1033,10 +1058,12 @@ static Tellib_uint16_t LED_SystIndicator_R_Judgement(void)
if ((g_SysFltLampStatus == 0U) && (g_SysFltLampCount >= 3U))
{
g_SysFltLampStatus = 1U;
g_SysFltLampCount = 0U;
}
else if ((g_SysFltLampStatus == 1U) && (g_SysFltLampCount >= 3U))
{
g_SysFltLampStatus = 0U;
g_SysFltLampCount = 0U;
}
LED_STATE = (Tellib_uint16_t) g_SysFltLampStatus;
......@@ -1149,10 +1176,12 @@ static Tellib_uint16_t LED_Charging_Connection_R_Judgement(void)
if ((g_TOTALSigChargeStatus == 0U) && (g_TOTALSigChargeCount >= 3U))
{
g_TOTALSigChargeStatus = 1U;
g_TOTALSigChargeCount = 0U;
}
else if ((g_TOTALSigChargeStatus == 1U) && (g_TOTALSigChargeCount >= 3U))
{
g_TOTALSigChargeStatus = 0U;
g_TOTALSigChargeCount = 0U;
}
LED_STATE = (Tellib_uint16_t) g_TOTALSigChargeStatus;
......@@ -1190,10 +1219,12 @@ static Tellib_uint16_t LED_Power_Battery_Failure_R_Judgement(void)
if ((g_BmsFltStatus[i] == 0U) && (g_BmsFltCount[i] >= 3U))
{
g_BmsFltStatus[i] = 1U;
g_BmsFltCount[i] = 0U;
}
else if ((g_BmsFltStatus[i] == 1U) && (g_BmsFltCount[i] >= 3U))
{
g_BmsFltStatus[i] = 0U;
g_BmsFltCount[i] = 0U;
}
}
......
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