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

feat:新增异常上电显示功能,屏蔽未使用的代码

parent 58b62627
......@@ -183,10 +183,16 @@ void Clear_Bu98_Conditions(DoNot_Close_Seg_en_t closeType)
{
for (i = 0; i < BU98R10_DDRAM_SIZE; i++)
{
if(i == 74U)
if (i == 74U)
{
transitionData = ((BU98R10Chip0DDRAM.Byte[75] >> 4U) & 0xFU);
BU98R10Chip0DDRAM.Byte[75] = ((transitionData << 4U) + 0);
transitionData = ((BU98R10Chip0DDRAM.Byte[i] >> 4U) & 0xFU);
BU98R10Chip0DDRAM.Byte[i] = ((transitionData << 4U) + 0);
transitionData = 0;
}
else if (i == 43U)
{
transitionData = ((BU98R10Chip0DDRAM.Byte[i]) & 0xFU);
BU98R10Chip0DDRAM.Byte[i] = transitionData;
transitionData = 0;
}
else
......@@ -196,8 +202,8 @@ void Clear_Bu98_Conditions(DoNot_Close_Seg_en_t closeType)
if(i == 46U)
{
transitionData = ((BU98R10Chip1DDRAM.Byte[46]) & 0xFU);
BU98R10Chip1DDRAM.Byte[46] = transitionData;
transitionData = ((BU98R10Chip1DDRAM.Byte[i]) & 0xFU);
BU98R10Chip1DDRAM.Byte[i] = transitionData;
transitionData = 0;
}
else
......@@ -216,6 +222,12 @@ void Clear_Bu98_Conditions(DoNot_Close_Seg_en_t closeType)
BU98R10Chip0DDRAM.Byte[i] = ((transitionData << 4U) + 0);
transitionData = 0;
}
else if (i == 43U)
{
transitionData = ((BU98R10Chip0DDRAM.Byte[i]) & 0xFU);
BU98R10Chip0DDRAM.Byte[i] = transitionData;
transitionData = 0;
}
else if ((i == 29U) || (i == 30U) || (i == 31U) || (i == 32U) || (i == 33U) || (i == 34U) || (i == 35U) ||
(i == 60U) || (i == 67U) || (i == 68U) ||(i == 71U) || (i == 72U) || (i == 73U))
{
......@@ -228,8 +240,8 @@ void Clear_Bu98_Conditions(DoNot_Close_Seg_en_t closeType)
if(i == 46U)
{
transitionData = ((BU98R10Chip1DDRAM.Byte[46]) & 0xFU);
BU98R10Chip1DDRAM.Byte[46] = transitionData;
transitionData = ((BU98R10Chip1DDRAM.Byte[i]) & 0xFU);
BU98R10Chip1DDRAM.Byte[i] = transitionData;
transitionData = 0;
}
else
......@@ -332,7 +344,7 @@ void Gauge_Service(void)
}
for (i = 0; i < LampCh0_MAX; i++)
{
if ((i == LampCh0_08_Battery_Charging_W) || (i == LampCh0_32_Charging_Connection_R))
if ((i == LampCh0_08_Battery_Charging_W) || (i == LampCh0_32_Charging_Connection_R) || (i == LampCh0_19_Fault_Codes_W))
{
;
}
......
......@@ -114,7 +114,7 @@ const LED_Attribute_st LED_Attribute[LED_Max] =
{em_LED_Tire_pressure_R_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 1500ul, LED_Tire_pressure_R_Judgement, LED_Tire_pressure_R_Execution },
{em_LED_Cutterhead_Gear_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 1500ul, LED_Cutterhead_Gear_Judgement, LED_Cutterhead_Gear_Execution },
{em_LED_Working_Hours_One_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 1500ul, LED_Working_Hours_One_Judgement, LED_Working_Hours_One_Execution },
{em_LED_Fault_Codes_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 1500ul, LED_Fault_Codes_Judgement, LED_Fault_Codes_Execution },
{em_LED_Fault_Codes_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON_OFF, 0u, 1500ul, LED_Fault_Codes_Judgement, LED_Fault_Codes_Execution },
{em_LED_System_Indicator_R, SelfCheck, NoExterNalCheck, LED_IGN_ON, 0u, 1500ul, LED_SystIndicator_R_Judgement, LED_SystIndicator_R_Execution },
{em_LED_P_GEAR_G, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 1500ul, LED_P_GEAR_G_Judgement, LED_P_GEAR_G_Execution },
{em_LED_Fuel_Alarm_W, NoSelfCheck, NoExterNalCheck, LED_IGN_ON, 0u, 1500ul, LED_Fuel_Alarm_W_Judgement, LED_Fuel_Alarm_W_Execution },
......@@ -708,15 +708,15 @@ static void LED_Cutterhead_Switch_Execution(Tellib_uint16_t led_status)
}
static Tellib_uint16_t LED_GEAR_Judgement(void)
{
Tellib_uint16_t LED_STATE = 0u;
if((Charge_OFF_Flag == 0) && (System_Indicator_CANFlag != 1) && (Get_CAN_Power_State() != POWER_CHECK_NULL))
{
LED_STATE = 1;
}
else
{
LED_STATE = 0;
}
// Tellib_uint16_t LED_STATE = 0u;
// if((Charge_OFF_Flag == 0) && (System_Indicator_CANFlag != 1) && (Get_CAN_Power_State() != POWER_CHECK_NULL))
// {
// LED_STATE = 1;
// }
// else
// {
// LED_STATE = 0;
// }
}
static void LED_GEAR_Execution(Tellib_uint16_t led_status)
{
......@@ -992,9 +992,31 @@ static Tellib_uint16_t LED_Fault_Codes_Judgement(void)
{
Tellib_uint16_t LED_STATE = 0u;
#if (PART_NUMBER == G54_A01)
if (Get_FaultCode_Valid() == 1U)
if (Get_CAN_Power_State() == KEY_ACC)
{
LED_STATE = 1U;
if (Get_FaultCode_Valid() == 1U)
{
LED_STATE = 1U;
}
else
{
LED_STATE = 0U;
}
}
else if (Get_CAN_Power_State() == PKEY_ON)
{
if (CAN_MSG_Status(&CAN_CH0_CanMsgOp, Co_Can_ConvertSubID_CAN_CH0(CAN_CH0_ID_CAN_0x220_Msg)) == CAN_SIG_LOST)
{
LED_STATE = 1U;
}
else if ((Get_CAN_CH0_ID_220_Sig_VCU_KeySts() == 0U) && (Get_CAN_CH0_ID_220_Sig_VCU_ChgMode() == 0U))
{
LED_STATE = 1U;
}
else
{
LED_STATE = 0U;
}
}
else
{
......@@ -1008,12 +1030,18 @@ static void LED_Fault_Codes_Execution(Tellib_uint16_t led_status)
if (led_status == 1u)
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_19_Fault_Codes_W, LED_ON);
// SEG_SET_LED_STS(1,1);
if (Get_CAN_Power_State() == PKEY_ON)
{
SEG_SET_Fault_Code_Spanner(1U, 0U, 1U);
}
}
else
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_19_Fault_Codes_W, LED_OFF);
// SEG_SET_LED_STS(1,0);
if ((Get_CAN_Power_State() == PKEY_ON) || (Get_CAN_Power_State() == KEY_OFF))
{
SEG_SET_Fault_Code_Spanner(0U, 0U, 0U);
}
}
}
......
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