Commit eccdec79 authored by 时昊's avatar 时昊

feat:增加ABS功能

parent 61db28f3
......@@ -508,11 +508,59 @@ void LED_TurnLeft_Lamp_Exec(Tellib_uint16_t led_status)
Tellib_uint16_t LED_ABS_Lamp_Judge(void)
{
Tellib_uint16_t res = 0u;
if( (CAN_MSG_Status(&CAN_CH0_CanMsgOp, CAN_CH0_ID_can0A18A006_Msg_Count) == CAN_SIG_LOST )&&(Common_GetIgnOnTime() >= 8000))
{
res = 2u;
}
else
{
if(Get_CAN_CH0_ID_0A18A006_Sig_AbsFail() == 1)
{
res = 1u;
}
else
{
res = 0u;
}
}
return res;
}
void LED_ABS_Lamp_Exec(Tellib_uint16_t led_status)
{
LED_Driver_Channel_Set(LED_Attr[LED_ABS_Lamp].chip, LED_Attr[LED_ABS_Lamp].channel, 0);
if(Get_DIAG_TelltalesCtrlsts() == 3)
{
if(LEDContrl._3F80.ABSAlarm == 1)
{
LED_Driver_Channel_Set(LED_Attr[LED_ABS_Lamp].chip, LED_Attr[LED_ABS_Lamp].channel, LED_Attr[LED_ABS_Lamp].brightness);
}
else
{
LED_Driver_Channel_Set(LED_Attr[LED_ABS_Lamp].chip, LED_Attr[LED_ABS_Lamp].channel, 0);
}
}
else
{
if (led_status == 2u)
{
if(g_LED.LedBlink_1_5HZ)
{
LED_Driver_Channel_Set(LED_Attr[LED_ABS_Lamp].chip, LED_Attr[LED_ABS_Lamp].channel, LED_Attr[LED_ABS_Lamp].brightness);
}
else
{
LED_Driver_Channel_Set(LED_Attr[LED_ABS_Lamp].chip, LED_Attr[LED_ABS_Lamp].channel, 0);
}
}
else if (led_status == 1u)
{
LED_Driver_Channel_Set(LED_Attr[LED_ABS_Lamp].chip, LED_Attr[LED_ABS_Lamp].channel, LED_Attr[LED_ABS_Lamp].brightness);
}
else
{
LED_Driver_Channel_Set(LED_Attr[LED_ABS_Lamp].chip, LED_Attr[LED_ABS_Lamp].channel, 0);
}
}
}
Tellib_uint16_t LED_EBD_Lamp_Judge(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