Commit 59afe3ad authored by 时昊's avatar 时昊

feat:增加EBD指示灯

parent eccdec79
......@@ -1211,13 +1211,38 @@ Tellib_uint16_t Water_High_Res = 0u;
Tellib_uint16_t LED_Brake_Lamp_Judge(void)
{
Tellib_uint16_t res = 0u;
if (( Line_In_Get_Status(LINE_IN_Brake_Fault) == 1u )||( Line_In_Get_Status(LINE_IN_Handbrake) == 1u ))
Tellib_uint16_t EBD_lamp = 0u;
if((CAN_MSG_Status(&CAN_CH0_CanMsgOp, CAN_CH0_ID_can0A18A006_Msg_Count) == CAN_SIG_LOST )&&(Common_GetIgnOnTime() >= 8000))
{
EBD_lamp = 2u;
}
else
{
if(Get_CAN_CH0_ID_0A18A006_Sig_EbdFail() == 1)
{
EBD_lamp = 1u;
}
else
{
EBD_lamp = 0u;
}
}
if (( Line_In_Get_Status(LINE_IN_Brake_Fault) == 1u )||( Line_In_Get_Status(LINE_IN_Handbrake) == 1u )||(EBD_lamp == 1))
{
res = 1u;
}
else
{
res = 0u;
if(EBD_lamp == 2)
{
res = 2u;
}
else
{
res = 0u;
}
}
return res;
}
......@@ -1240,6 +1265,17 @@ Tellib_uint16_t Water_High_Res = 0u;
{
LED_Driver_Channel_Set(LED_Attr[LED_Brake_Lamp].chip, LED_Attr[LED_Brake_Lamp].channel, LED_Attr[LED_Brake_Lamp].brightness);
}
else if (led_status == 2u)
{
if(g_LED.LedBlink_1_5HZ)
{
LED_Driver_Channel_Set(LED_Attr[LED_Brake_Lamp].chip, LED_Attr[LED_Brake_Lamp].channel, LED_Attr[LED_Brake_Lamp].brightness);
}
else
{
LED_Driver_Channel_Set(LED_Attr[LED_Brake_Lamp].chip, LED_Attr[LED_Brake_Lamp].channel, 0);
}
}
else
{
LED_Driver_Channel_Set(LED_Attr[LED_Brake_Lamp].chip, LED_Attr[LED_Brake_Lamp].channel, 0);
......
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