Commit fee2eaa7 authored by 李俭双's avatar 李俭双

🐞 fix:45097 【天鹰TY100】【蓄电池指示灯】信号掉线恢复,未按上行策略走

parent 7882467d
......@@ -43,6 +43,7 @@ static void LED_Tire_Pressure_Execution(Tellib_uint16_t led_status);
Led_HighBeam_Count HighBeam_Timer;
Tellib_uint16_t LED_Battery_Voltage = 0;
Tellib_uint16_t Battery_Voltage_valid = 0;
const LED_Attribute_st LED_Attribute [ LED_Max ] = {
/* 指示灯索引 是否自检 外部信号自检 工作电源状态 自检开始时间 自检持续时间 指示灯点亮条件 指示灯执行函数 */
......@@ -82,6 +83,7 @@ void Telltales_UserInit(void)
HighBeam_Timer.LED_Turnon = 0;
HighBeam_Timer.LED_Turnoff = 0;
LED_Battery_Voltage = 0;
Battery_Voltage_valid = 0;
}
static Tellib_uint16_t LED_High_Beam_Judgement(void)
......@@ -509,18 +511,23 @@ static Tellib_uint16_t LED_Low_Batt_Judgement(void)
{
Tellib_uint16_t LED_STATE = 0u;
Tellib_uint16_t Battery_Voltage = 0u;
Battery_Voltage = Get_CAN_CH0_ID_401_Sig_ECU_Battery_Voltage();
if((CAN_MSG_Status(&CAN_CH0_CanMsgOp, CAN_CH0_ID_CAN_0x401_Msg_Count) == CAN_SIG_LOST) )
{
LED_Battery_Voltage = 1;
Battery_Voltage_valid = 0;
}
else
{
if (Battery_Voltage < 118)
if(Battery_Voltage_valid == 1)
{
Battery_Voltage_valid = 1;
if (Get_Battery_Voltage() < 118)
{
LED_Battery_Voltage = 1;
}
else if (Battery_Voltage >= 120)
else if (Get_Battery_Voltage() >= 120)
{
LED_Battery_Voltage = 0;
}
......@@ -529,6 +536,20 @@ static Tellib_uint16_t LED_Low_Batt_Judgement(void)
;
}
}
else
{
Battery_Voltage_valid = 1;
if (Get_Battery_Voltage() < 118)
{
LED_Battery_Voltage = 1;
}
else
{
LED_Battery_Voltage = 0;
}
}
}
LED_STATE = LED_Battery_Voltage;
return LED_STATE;
}
......
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