Commit d221c91e authored by 李冠华's avatar 李冠华

feat:混动车型增加铅酸电池故障指示灯逻辑

parent c57f1ac3
......@@ -67,6 +67,8 @@ uint8_t g_u8EmsFltLv3Count = 0U;
uint8_t g_EngineMalfunctionStatus = 0U;
uint8_t g_EngineOilLowCount = 0U;
uint8_t g_EngineOilLowStatus = 0U;
uint8_t g_VoltLowStatus = 0U;
uint8_t g_VoltLowCount = 0U;
const LED_Attribute_st LED_Attribute[LED_Max] =
{
/* 指示灯索引 是否自检 外部信号自检 工作电源状态 自检开始时间 自检持续时间 指示灯点亮条件 指示灯执行函数 */
......@@ -137,6 +139,20 @@ void CAN_0x225_Receive(uint8_t CopyData [])
{
g_u8EmsFltLv3Count = 0U;
}
if ((Get_CAN_CH0_ID_225_Sig_VCU_VoltLow() == 1U) && (g_VoltLowStatus == 0U))
{
g_VoltLowCount++;
}
else if ((Get_CAN_CH0_ID_225_Sig_VCU_VoltLow() == 0U) && (g_VoltLowStatus == 1U))
{
g_VoltLowCount++;
}
else
{
g_VoltLowCount = 0U;
}
#endif
}
......@@ -242,27 +258,33 @@ static void LED_Fuel_Alarm_Execution(Tellib_uint16_t led_status)
static Tellib_uint16_t LED_Lead_Acid_Battery_Failure_Judgement(void)
{
Tellib_uint16_t LED_STATE = 0u;
// if (Line_In_Get_Status(LINE_IN_HighBeam))
// {
// LED_STATE = 1;
// }
// else
// {
// LED_STATE = 0;
// }
#if (PART_NUMBER == G54_A01)
if ((g_VoltLowStatus == 0U) && (g_VoltLowCount >= 3U))
{
g_VoltLowStatus = 1U;
}
else if ((g_VoltLowStatus == 1U) && (g_VoltLowCount >= 3U))
{
g_VoltLowStatus = 0U;
}
LED_STATE = (Tellib_uint16_t) g_VoltLowStatus;
#endif
return LED_STATE;
}
static void LED_Lead_Acid_Battery_Failure_Execution(Tellib_uint16_t led_status)
{
if (led_status == 1u)
{
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_ON);
// SEG_SET_LED_STS(1,1);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Lead_Acid_Battery_Failure_R, LED_ON);
SEG_SET_LED_STS(SEG_LED_Battery_Failure,1);
}
else
{
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_OFF);
// SEG_SET_LED_STS(1,0);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Lead_Acid_Battery_Failure_R, LED_OFF);
SEG_SET_LED_STS(SEG_LED_Battery_Failure,0);
}
}
static Tellib_uint16_t LED_Oil_Pressure_Judgement(void)
......
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