Commit f299cc3a authored by 陈家乐's avatar 陈家乐

🐞 fix:55788 从闪烁到常亮应该把闪烁亮灭周期执行完,在进行常亮显示

parent e7149627
...@@ -44,6 +44,9 @@ static void LED_Tire_Pressure_Execution(Tellib_uint16_t led_status); ...@@ -44,6 +44,9 @@ static void LED_Tire_Pressure_Execution(Tellib_uint16_t led_status);
//Led_HighBeam_Count HighBeam_Timer; //Led_HighBeam_Count HighBeam_Timer;
Tellib_uint16_t LED_Battery_Voltage = 0; Tellib_uint16_t LED_Battery_Voltage = 0;
Tellib_uint16_t Battery_Voltage_valid = 0; Tellib_uint16_t Battery_Voltage_valid = 0;
Tellib_uint8_t LED_TCS_STATE = 0;
Tellib_uint8_t LED_TCS_CUR_STATE = 0;
Tellib_uint8_t LED_TCS_VALUE = 0;
const LED_Attribute_st LED_Attribute [ LED_Max ] = { const LED_Attribute_st LED_Attribute [ LED_Max ] = {
/* 指示灯索引 是否自检 外部信号自检 工作电源状态 自检开始时间 自检持续时间 指示灯点亮条件 指示灯执行函数 */ /* 指示灯索引 是否自检 外部信号自检 工作电源状态 自检开始时间 自检持续时间 指示灯点亮条件 指示灯执行函数 */
...@@ -380,6 +383,78 @@ static void LED_Bluetooth_Execution(Tellib_uint16_t led_status) ...@@ -380,6 +383,78 @@ static void LED_Bluetooth_Execution(Tellib_uint16_t led_status)
} }
} }
static Tellib_uint16_t LED_TCS_Judgement(void)
{
Tellib_uint16_t LED_STATE = 0u;
if (Get_Dis_Tcs_Val() == 1)
{
if ((CAN_MSG_Status(&CAN_CH0_CanMsgOp, CAN_CH0_ID_CAN_0x120_Msg_Count) == CAN_SIG_LOST))
{
LED_TCS_STATE = 1;
}
else
{
if ((Get_CAN_CH0_ID_120_Sig_TCSStatus() == 1) || (Get_CAN_CH0_ID_120_Sig_TCSStatus() == 2) || (Get_CAN_CH0_ID_120_Sig_TCSStatus() == 3) || (Get_CAN_CH0_ID_120_Sig_TCSStatus() == 5))
{
LED_TCS_STATE = 1;
}
else if (Get_CAN_CH0_ID_120_Sig_TCSStatus() == 4)
{
LED_TCS_STATE = 2;
}
else if (Get_CAN_CH0_ID_120_Sig_TCSStatus() == 6)
{
LED_TCS_STATE = 3;
}
else if ((Get_CAN_CH0_ID_120_Sig_TCSStatus() == 0) || (Get_CAN_CH0_ID_120_Sig_TCSStatus() == 7))
{
LED_TCS_STATE = 0;
}
}
}
else
{
LED_TCS_STATE = 0;
}
if ((LED_TCS_CUR_STATE == 2))
{
if ((LED_TCS_VALUE == 0) && (FLASH_SYNC_1Hz))
{
LED_TCS_CUR_STATE = LED_TCS_STATE;
}
LED_TCS_VALUE = FLASH_SYNC_1Hz;
LED_STATE = FLASH_SYNC_1Hz;
}
else if (LED_TCS_CUR_STATE == 3)
{
if ((LED_TCS_VALUE == 0) && (FLASH_SYNC_2Hz))
{
LED_TCS_CUR_STATE = LED_TCS_STATE;
}
LED_TCS_VALUE = FLASH_SYNC_2Hz;
LED_STATE = FLASH_SYNC_2Hz;
}
if ((LED_TCS_CUR_STATE != 2) && (LED_TCS_CUR_STATE != 3))
{
LED_TCS_CUR_STATE = LED_TCS_STATE;
if (LED_TCS_CUR_STATE)
{
LED_STATE = 1;
}
else
{
LED_STATE = 0;
}
}
return LED_STATE;
}
#if 0
static Tellib_uint16_t LED_TCS_Judgement(void) static Tellib_uint16_t LED_TCS_Judgement(void)
{ {
Tellib_uint16_t LED_STATE = 0u; Tellib_uint16_t LED_STATE = 0u;
...@@ -419,6 +494,8 @@ static Tellib_uint16_t LED_TCS_Judgement(void) ...@@ -419,6 +494,8 @@ static Tellib_uint16_t LED_TCS_Judgement(void)
return LED_STATE; return LED_STATE;
} }
#endif
static void LED_TCS_Execution(Tellib_uint16_t led_status) static void LED_TCS_Execution(Tellib_uint16_t led_status)
{ {
if ( led_status == 1u ) if ( led_status == 1u )
......
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