Commit 55ef18c2 authored by 李冠华's avatar 李冠华

🐞 fix:修改MBMS_SafeBattWorkState信号值为非1/3时,充电指示灯显示错误的问题

parent 04dbd1fc
...@@ -541,6 +541,11 @@ void CAN_0x16B_Receive(uint8_t CopyData []) ...@@ -541,6 +541,11 @@ void CAN_0x16B_Receive(uint8_t CopyData [])
{ {
g_ChgModeCount++; g_ChgModeCount++;
} }
else
{
g_ChgModeStatus = 1U;
g_ChgModeCount = 0U;
}
} }
else if ((u8Signal == 3U) && (g_ChgModeStatus != 2U)) else if ((u8Signal == 3U) && (g_ChgModeStatus != 2U))
{ {
...@@ -548,6 +553,11 @@ void CAN_0x16B_Receive(uint8_t CopyData []) ...@@ -548,6 +553,11 @@ void CAN_0x16B_Receive(uint8_t CopyData [])
{ {
g_ChgModeCount++; g_ChgModeCount++;
} }
else
{
g_ChgModeStatus = 2U;
g_ChgModeCount = 0U;
}
} }
else if ((u8Signal != 1U) && (u8Signal != 3U) && (g_ChgModeStatus != 0U)) else if ((u8Signal != 1U) && (u8Signal != 3U) && (g_ChgModeStatus != 0U))
{ {
...@@ -555,6 +565,11 @@ void CAN_0x16B_Receive(uint8_t CopyData []) ...@@ -555,6 +565,11 @@ void CAN_0x16B_Receive(uint8_t CopyData [])
{ {
g_ChgModeCount++; g_ChgModeCount++;
} }
else
{
g_ChgModeStatus = 0U;
g_ChgModeCount = 0U;
}
} }
else else
{ {
......
...@@ -582,22 +582,6 @@ static Tellib_uint16_t LED_Battery_Charging_Judgement(void) ...@@ -582,22 +582,6 @@ static Tellib_uint16_t LED_Battery_Charging_Judgement(void)
if (Signal1 == 1U) if (Signal1 == 1U)
{ {
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; LED_STATE = (Tellib_uint16_t) g_ChgModeStatus;
} }
else 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