Commit 98c25fb6 authored by 李冠华's avatar 李冠华

feat:混动车型增加刀盘过载指示灯功能逻辑

parent a9b6cd09
......@@ -297,6 +297,7 @@ static void LED_Grass_Full_Execution(Tellib_uint16_t led_status)
static Tellib_uint16_t LED_OVERLOAD_Judgement(void)
{
Tellib_uint16_t LED_STATE = 0u;
#if (PART_NUMBER == RMR42E_60)
Tellib_uint8_t Signal1 = Get_CAN_Num_BMCU_Moto1_Locked_RotorFault();
Tellib_uint8_t Signal2 = Get_CAN_Num_BMCU_Moto2_Locked_RotorFault();
if (((Signal1 == 0x1) || (Signal2 == 0x1)) && openLED_flag)
......@@ -307,6 +308,31 @@ static Tellib_uint16_t LED_OVERLOAD_Judgement(void)
{
LED_STATE = 0;
}
#else
for(uint8_t i = 0U; i < 9U; i++)
{
if ((g_OverLoadStatus[i] == 0U) && (g_OverLoadCount[i] >= 3U))
{
g_OverLoadStatus[i] = 1U;
}
else if ((g_OverLoadStatus[i] == 1U) && (g_OverLoadCount[i] >= 3U))
{
g_OverLoadStatus[i] = 0U;
}
}
if ((g_OverLoadStatus[0] == 0U) && (g_OverLoadStatus[1] == 0U) && (g_OverLoadStatus[2] == 0U) &&
(g_OverLoadStatus[3] == 0U) && (g_OverLoadStatus[4] == 0U) && (g_OverLoadStatus[5] == 0U) &&
(g_OverLoadStatus[6] == 0U) && (g_OverLoadStatus[7] == 0U) && (g_OverLoadStatus[8] == 0U))
{
LED_STATE = 0U;
}
else
{
LED_STATE = 1U;
}
#endif
return LED_STATE;
}
static void LED_OVERLOAD_Execution(Tellib_uint16_t led_status)
......
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