Commit 7539115a authored by 郑萍's avatar 郑萍

🐞 fix:51223 【润通草地车】【档位】当0x125信号MMCU_PowerMode=1,在发送档位信号,仅P挡闪烁,,且档位边框常显

parent 89ce4066
......@@ -67,6 +67,10 @@ void Gauge_Gears_Display(void)
{
SEG_SET_GEAR(1, Signal1, 0);
}
else
{
SEG_SET_GEAR(1, Gear_OFF, 0);
}
}
else
{
......
......@@ -6,120 +6,115 @@
#include "Application.h"
#include "CAN_APP\CAN_CH0_CAN_Communication_Matrix.h"
#include "Components.h"
#define openLED_flag ((Get_CAN_Power_State() != PKEY_ON) && (Get_CAN_Power_State() != KEY_OFF) && (Charge_OFF_Flag == 0) && (Get_CAN_Power_State() != POWER_CHECK_NULL))
static Tellib_uint16_t LED_EFI_failure_Judgement(void);
static void LED_EFI_failure_Execution(Tellib_uint16_t led_status);
#define openLED_flag ((Get_CAN_Power_State() != PKEY_ON) && (Get_CAN_Power_State() != KEY_OFF) && (Charge_OFF_Flag == 0) && (Get_CAN_Power_State() != POWER_CHECK_NULL))
static Tellib_uint16_t LED_EFI_failure_Judgement(void);
static void LED_EFI_failure_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_Fuel_Alarm_Judgement(void);
static void LED_Fuel_Alarm_Execution(Tellib_uint16_t led_status);
static void LED_Fuel_Alarm_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_Lead_Acid_Battery_Failure_Judgement(void);
static void LED_Lead_Acid_Battery_Failure_Execution(Tellib_uint16_t led_status);
static void LED_Lead_Acid_Battery_Failure_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_Oil_Pressure_Judgement(void);
static void LED_Oil_Pressure_Execution(Tellib_uint16_t led_status);
static void LED_Oil_Pressure_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_Grass_Full_Judgement(void);
static void LED_Grass_Full_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_OVERLOAD_Judgement(void);
static void LED_OVERLOAD_Execution(Tellib_uint16_t led_status);
static void LED_Grass_Full_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_OVERLOAD_Judgement(void);
static void LED_OVERLOAD_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_READY_Judgement(void);
static void LED_READY_Execution(Tellib_uint16_t led_status);
static void LED_READY_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_Seat_Detection_Judgement(void);
static void LED_Seat_Detection_Execution(Tellib_uint16_t led_status);
static void LED_Seat_Detection_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_Key_Access_Judgement(void);
static void LED_Key_Access_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_Battery_Charging_Judgement(void);
static void LED_Battery_Charging_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_Cutterhead_Switch_Judgement(void);
static void LED_Cutterhead_Switch_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_GEAR_Judgement(void);
static void LED_GEAR_Execution(Tellib_uint16_t led_status);
static void LED_Key_Access_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_Battery_Charging_Judgement(void);
static void LED_Battery_Charging_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_Cutterhead_Switch_Judgement(void);
static void LED_Cutterhead_Switch_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_GEAR_Judgement(void);
static void LED_GEAR_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_External_Discharge_Judgement(void);
static void LED_External_Discharge_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_Engine_Works_Judgement(void);
static void LED_Engine_Works_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_Bluetooth_Connection_Judgement(void);
static void LED_Bluetooth_Connection_Execution(Tellib_uint16_t led_status);
static void LED_External_Discharge_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_Engine_Works_Judgement(void);
static void LED_Engine_Works_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_Bluetooth_Connection_Judgement(void);
static void LED_Bluetooth_Connection_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_LED_Open_Judgement(void);
static void LED_LED_Open_Execution(Tellib_uint16_t led_status);
static void LED_LED_Open_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_Cruise_Control_Judgement(void);
static void LED_Cruise_Control_Execution(Tellib_uint16_t led_status);
static void LED_Cruise_Control_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_Tire_pressure_F_Judgement(void);
static void LED_Tire_pressure_F_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_Tire_pressure_R_Judgement(void);
static void LED_Tire_pressure_R_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_Gears_Judgement(void);
static void LED_Gears_Execution(Tellib_uint16_t led_status);
static void LED_Tire_pressure_F_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_Tire_pressure_R_Judgement(void);
static void LED_Tire_pressure_R_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_Cutterhead_Gear_Judgement(void);
static void LED_Cutterhead_Gear_Execution(Tellib_uint16_t led_status);
static void LED_Cutterhead_Gear_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_Working_Hours_One_Judgement(void);
static void LED_Working_Hours_One_Execution(Tellib_uint16_t led_status);
static void LED_Working_Hours_One_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_Fault_Codes_Judgement(void);
static void LED_Fault_Codes_Execution(Tellib_uint16_t led_status);
static void LED_Fault_Codes_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_SystIndicator_R_Judgement(void);
static void LED_SystIndicator_R_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_P_GEAR_G_Judgement(void);
static void LED_P_GEAR_G_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_Fuel_Alarm_W_Judgement(void);
static void LED_Fuel_Alarm_W_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_Charging_Connection_R_Judgement(void);
static void LED_Charging_Connection_R_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_Power_Battery_Failure_R_Judgement(void);
static void LED_Power_Battery_Failure_R_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_SystIndicator_R_Judgement(void);
static void LED_SystIndicator_R_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_P_GEAR_G_Judgement(void);
static void LED_P_GEAR_G_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_Fuel_Alarm_W_Judgement(void);
static void LED_Fuel_Alarm_W_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_Charging_Connection_R_Judgement(void);
static void LED_Charging_Connection_R_Execution(Tellib_uint16_t led_status);
static Tellib_uint16_t LED_Power_Battery_Failure_R_Judgement(void);
static void LED_Power_Battery_Failure_R_Execution(Tellib_uint16_t led_status);
uint8_t u8CanId401Flag = 0;
const LED_Attribute_st LED_Attribute [ LED_Max ] = {
const LED_Attribute_st LED_Attribute[LED_Max] = {
/* 指示灯索引 是否自检 外部信号自检 工作电源状态 自检开始时间 自检持续时间 指示灯点亮条件 指示灯执行函数 */
{em_LED_EFI_failure_Y, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_EFI_failure_Judgement, LED_EFI_failure_Execution },
{em_LED_Fuel_Alarm_Y, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Fuel_Alarm_Judgement, LED_Fuel_Alarm_Execution },
{em_LED_Lead_Acid_Battery_Failure_R, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Lead_Acid_Battery_Failure_Judgement, LED_Lead_Acid_Battery_Failure_Execution },
{em_LED_Oil_Pressure_R, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Oil_Pressure_Judgement, LED_Oil_Pressure_Execution },
{em_LED_Grass_Full_R, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Grass_Full_Judgement, LED_Grass_Full_Execution },
{em_LED_OVERLOAD_R, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_OVERLOAD_Judgement, LED_OVERLOAD_Execution },
{em_LED_READY_G, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_READY_Judgement, LED_READY_Execution },
{em_LED_Seat_Detection_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Seat_Detection_Judgement, LED_Seat_Detection_Execution },
{em_LED_Key_Access_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Key_Access_Judgement, LED_Key_Access_Execution },
{em_LED_Battery_Charging_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Battery_Charging_Judgement, LED_Battery_Charging_Execution },
{em_LED_Cutterhead_Switch_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Cutterhead_Switch_Judgement, LED_Cutterhead_Switch_Execution },
{em_LED_GEAR_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_GEAR_Judgement, LED_GEAR_Execution },
{em_LED_External_Discharge_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_External_Discharge_Judgement, LED_External_Discharge_Execution },
{em_LED_Engine_Works_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Engine_Works_Judgement, LED_Engine_Works_Execution },
{em_LED_Bluetooth_Connection_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Bluetooth_Connection_Judgement, LED_Bluetooth_Connection_Execution },
{em_LED_LED_Open_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_LED_Open_Judgement, LED_LED_Open_Execution },
{em_LED_Cruise_Control_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Cruise_Control_Judgement, LED_Cruise_Control_Execution },
{em_LED_Tire_pressure_F_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Tire_pressure_F_Judgement, LED_Tire_pressure_F_Execution },
{em_LED_Tire_pressure_R_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Tire_pressure_R_Judgement, LED_Tire_pressure_R_Execution },
{em_LED_Gears_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Gears_Judgement, LED_Gears_Execution },
{em_LED_Cutterhead_Gear_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Cutterhead_Gear_Judgement, LED_Cutterhead_Gear_Execution },
{em_LED_Working_Hours_One_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Working_Hours_One_Judgement, LED_Working_Hours_One_Execution },
{em_LED_Fault_Codes_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Fault_Codes_Judgement, LED_Fault_Codes_Execution },
{em_LED_System_Indicator_R, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_SystIndicator_R_Judgement, LED_SystIndicator_R_Execution },
{em_LED_P_GEAR_G, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_P_GEAR_G_Judgement, LED_P_GEAR_G_Execution },
{em_LED_Fuel_Alarm_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Fuel_Alarm_W_Judgement, LED_Fuel_Alarm_W_Execution },
{em_LED_Charging_Connection_R, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Charging_Connection_R_Judgement, LED_Charging_Connection_R_Execution },
{em_LED_Power_Battery_Failure_R, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Power_Battery_Failure_R_Judgement, LED_Power_Battery_Failure_R_Execution },
{em_LED_EFI_failure_Y, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_EFI_failure_Judgement, LED_EFI_failure_Execution},
{em_LED_Fuel_Alarm_Y, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Fuel_Alarm_Judgement, LED_Fuel_Alarm_Execution},
{em_LED_Lead_Acid_Battery_Failure_R, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Lead_Acid_Battery_Failure_Judgement, LED_Lead_Acid_Battery_Failure_Execution},
{em_LED_Oil_Pressure_R, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Oil_Pressure_Judgement, LED_Oil_Pressure_Execution},
{em_LED_Grass_Full_R, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Grass_Full_Judgement, LED_Grass_Full_Execution},
{em_LED_OVERLOAD_R, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_OVERLOAD_Judgement, LED_OVERLOAD_Execution},
{em_LED_READY_G, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_READY_Judgement, LED_READY_Execution},
{em_LED_Seat_Detection_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Seat_Detection_Judgement, LED_Seat_Detection_Execution},
{em_LED_Key_Access_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Key_Access_Judgement, LED_Key_Access_Execution},
{em_LED_Battery_Charging_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Battery_Charging_Judgement, LED_Battery_Charging_Execution},
{em_LED_Cutterhead_Switch_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Cutterhead_Switch_Judgement, LED_Cutterhead_Switch_Execution},
{em_LED_GEAR_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_GEAR_Judgement, LED_GEAR_Execution},
{em_LED_External_Discharge_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_External_Discharge_Judgement, LED_External_Discharge_Execution},
{em_LED_Engine_Works_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Engine_Works_Judgement, LED_Engine_Works_Execution},
{em_LED_Bluetooth_Connection_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Bluetooth_Connection_Judgement, LED_Bluetooth_Connection_Execution},
{em_LED_LED_Open_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_LED_Open_Judgement, LED_LED_Open_Execution},
{em_LED_Cruise_Control_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Cruise_Control_Judgement, LED_Cruise_Control_Execution},
{em_LED_Tire_pressure_F_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Tire_pressure_F_Judgement, LED_Tire_pressure_F_Execution},
{em_LED_Tire_pressure_R_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Tire_pressure_R_Judgement, LED_Tire_pressure_R_Execution},
{em_LED_Cutterhead_Gear_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Cutterhead_Gear_Judgement, LED_Cutterhead_Gear_Execution},
{em_LED_Working_Hours_One_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Working_Hours_One_Judgement, LED_Working_Hours_One_Execution},
{em_LED_Fault_Codes_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Fault_Codes_Judgement, LED_Fault_Codes_Execution},
{em_LED_System_Indicator_R, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_SystIndicator_R_Judgement, LED_SystIndicator_R_Execution},
{em_LED_P_GEAR_G, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_P_GEAR_G_Judgement, LED_P_GEAR_G_Execution},
{em_LED_Fuel_Alarm_W, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Fuel_Alarm_W_Judgement, LED_Fuel_Alarm_W_Execution},
{em_LED_Charging_Connection_R, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Charging_Connection_R_Judgement, LED_Charging_Connection_R_Execution},
{em_LED_Power_Battery_Failure_R, NoSelfCheck, ExterNalCheck, LED_IGN_ON, 0u, 3000ul, LED_Power_Battery_Failure_R_Judgement, LED_Power_Battery_Failure_R_Execution},
};
Tellib_uint8_t Tel_Mem [ Tel_MEM_Block_Size * LED_Max + Tel_MEM_Block_Addition ];
Tellib_uint8_t Tel_Mem[Tel_MEM_Block_Size * LED_Max + Tel_MEM_Block_Addition];
uint8_t PowerSts_num;
void Telltales_Init(void)
{
TelExtPara m_ExtPara;
m_ExtPara.TotalLength = LED_Max;
m_ExtPara.TotalLength = LED_Max;
m_ExtPara.LED_PowerOFF_TimerCbk = Common_GetIgnOffTime;
m_ExtPara.LED_PowerON_TimerCbk = Common_GetIgnOnTime;
m_ExtPara.LED_PowerCbk = Common_Get_IG_Sts;
m_ExtPara.LED_PowerON_TimerCbk = Common_GetIgnOnTime;
m_ExtPara.LED_PowerCbk = Common_Get_IG_Sts;
PowerSts_num = Common_Get_IG_Sts();
u8CanId401Flag = 0;
Telltales_KL30_Wakeup_Init(Tel_Mem, LED_Attribute, &m_ExtPara);
}
void Can_ID_401(uint8_t CopyData [])
void Can_ID_401(uint8_t CopyData[])
{
u8CanId401Flag = 1;
}
static Tellib_uint16_t LED_EFI_failure_Judgement(void)
{
static Tellib_uint16_t LED_EFI_failure_Judgement(void)
{
Tellib_uint16_t LED_STATE = 0u;
// if (Line_In_Get_Status(LINE_IN_HighBeam))
// {
......@@ -130,20 +125,20 @@ void Can_ID_401(uint8_t CopyData [])
// LED_STATE = 0;
// }
return LED_STATE;
}
static void LED_EFI_failure_Execution(Tellib_uint16_t led_status)
}
static void LED_EFI_failure_Execution(Tellib_uint16_t led_status)
{
if ( led_status == 1u )
if (led_status == 1u)
{
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_ON);
// SEG_SET_LED_STS(1,1);
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_ON);
// SEG_SET_LED_STS(1,1);
}
else
{
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_OFF);
// SEG_SET_LED_STS(1,0);
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_OFF);
// SEG_SET_LED_STS(1,0);
}
}
}
static Tellib_uint16_t LED_Fuel_Alarm_Judgement(void)
{
Tellib_uint16_t LED_STATE = 0u;
......@@ -157,17 +152,17 @@ static Tellib_uint16_t LED_Fuel_Alarm_Judgement(void)
// }
return LED_STATE;
}
static void LED_Fuel_Alarm_Execution(Tellib_uint16_t led_status)
static void LED_Fuel_Alarm_Execution(Tellib_uint16_t led_status)
{
if ( led_status == 1u )
if (led_status == 1u)
{
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_ON);
// SEG_SET_LED_STS(1,1);
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_ON);
// SEG_SET_LED_STS(1,1);
}
else
{
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_OFF);
// SEG_SET_LED_STS(1,0);
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_OFF);
// SEG_SET_LED_STS(1,0);
}
}
static Tellib_uint16_t LED_Lead_Acid_Battery_Failure_Judgement(void)
......@@ -183,17 +178,17 @@ static Tellib_uint16_t LED_Lead_Acid_Battery_Failure_Judgement(void)
// }
return LED_STATE;
}
static void LED_Lead_Acid_Battery_Failure_Execution(Tellib_uint16_t led_status)
static void LED_Lead_Acid_Battery_Failure_Execution(Tellib_uint16_t led_status)
{
if ( led_status == 1u )
if (led_status == 1u)
{
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_ON);
// SEG_SET_LED_STS(1,1);
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_ON);
// SEG_SET_LED_STS(1,1);
}
else
{
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_OFF);
// SEG_SET_LED_STS(1,0);
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_OFF);
// SEG_SET_LED_STS(1,0);
}
}
static Tellib_uint16_t LED_Oil_Pressure_Judgement(void)
......@@ -209,19 +204,19 @@ static Tellib_uint16_t LED_Oil_Pressure_Judgement(void)
// }
return LED_STATE;
}
static void LED_Oil_Pressure_Execution(Tellib_uint16_t led_status)
static void LED_Oil_Pressure_Execution(Tellib_uint16_t led_status)
{
if ( led_status == 1u )
if (led_status == 1u)
{
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_ON);
// SEG_SET_LED_STS(1,1);
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_ON);
// SEG_SET_LED_STS(1,1);
}
else
{
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_OFF);
// SEG_SET_LED_STS(1,0);
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_OFF);
// SEG_SET_LED_STS(1,0);
}
}
}
static Tellib_uint16_t LED_Grass_Full_Judgement(void)
{
Tellib_uint16_t LED_STATE = 0u;
......@@ -235,18 +230,18 @@ static Tellib_uint16_t LED_Grass_Full_Judgement(void)
}
return LED_STATE;
}
static void LED_Grass_Full_Execution(Tellib_uint16_t led_status)
static void LED_Grass_Full_Execution(Tellib_uint16_t led_status)
{
if ( led_status == 1u )
if (led_status == 1u)
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_00_Grass_Full_R, LED_ON);
SEG_SET_LED_STS(SEG_LED_Chloramine,1);
// SEG_SET_LED_STS(1,1);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_00_Grass_Full_R, LED_ON);
SEG_SET_LED_STS(SEG_LED_Chloramine, 1);
// SEG_SET_LED_STS(1,1);
}
else
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_00_Grass_Full_R, LED_OFF);
SEG_SET_LED_STS(SEG_LED_Chloramine,0);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_00_Grass_Full_R, LED_OFF);
SEG_SET_LED_STS(SEG_LED_Chloramine, 0);
}
}
static Tellib_uint16_t LED_OVERLOAD_Judgement(void)
......@@ -264,17 +259,17 @@ static Tellib_uint16_t LED_OVERLOAD_Judgement(void)
}
return LED_STATE;
}
static void LED_OVERLOAD_Execution(Tellib_uint16_t led_status)
static void LED_OVERLOAD_Execution(Tellib_uint16_t led_status)
{
if ( led_status == 1u )
if (led_status == 1u)
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_13_OVERLOAD_R, LED_ON);
SEG_SET_LED_STS(SEG_LED_Cutter_Overload,1);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_13_OVERLOAD_R, LED_ON);
SEG_SET_LED_STS(SEG_LED_Cutter_Overload, 1);
}
else
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_13_OVERLOAD_R, LED_OFF);
SEG_SET_LED_STS(SEG_LED_Cutter_Overload,0);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_13_OVERLOAD_R, LED_OFF);
SEG_SET_LED_STS(SEG_LED_Cutter_Overload, 0);
}
}
static Tellib_uint16_t LED_READY_Judgement(void)
......@@ -291,17 +286,17 @@ static Tellib_uint16_t LED_READY_Judgement(void)
}
return LED_STATE;
}
static void LED_READY_Execution(Tellib_uint16_t led_status)
static void LED_READY_Execution(Tellib_uint16_t led_status)
{
if ( led_status == 1u )
if (led_status == 1u)
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_10_READY_G, LED_ON);
SEG_SET_LED_STS(SEG_LED_Ready,1);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_10_READY_G, LED_ON);
SEG_SET_LED_STS(SEG_LED_Ready, 1);
}
else
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_10_READY_G, LED_OFF);
SEG_SET_LED_STS(SEG_LED_Ready,0);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_10_READY_G, LED_OFF);
SEG_SET_LED_STS(SEG_LED_Ready, 0);
}
}
static Tellib_uint16_t LED_Seat_Detection_Judgement(void)
......@@ -318,26 +313,26 @@ static Tellib_uint16_t LED_Seat_Detection_Judgement(void)
}
return LED_STATE;
}
static void LED_Seat_Detection_Execution(Tellib_uint16_t led_status)
static void LED_Seat_Detection_Execution(Tellib_uint16_t led_status)
{
if ( led_status == 1u )
if (led_status == 1u)
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_12_Seat_Detection_W, LED_ON);
SEG_SET_LED_STS(SEG_LED_Seat_Detection,1);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_12_Seat_Detection_W, LED_ON);
SEG_SET_LED_STS(SEG_LED_Seat_Detection, 1);
}
else
{
if(FLASH_SYNC_1Hz && openLED_flag)
if (FLASH_SYNC_1Hz && openLED_flag)
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_12_Seat_Detection_W, LED_ON);
SEG_SET_LED_STS(SEG_LED_Seat_Detection,1);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_12_Seat_Detection_W, LED_ON);
SEG_SET_LED_STS(SEG_LED_Seat_Detection, 1);
}
else
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_12_Seat_Detection_W, LED_OFF);
SEG_SET_LED_STS(SEG_LED_Seat_Detection,0);
}
// SEG_SET_LED_STS(1,0);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_12_Seat_Detection_W, LED_OFF);
SEG_SET_LED_STS(SEG_LED_Seat_Detection, 0);
}
// SEG_SET_LED_STS(1,0);
}
}
static Tellib_uint16_t LED_Key_Access_Judgement(void)
......@@ -354,17 +349,17 @@ static Tellib_uint16_t LED_Key_Access_Judgement(void)
}
return LED_STATE;
}
static void LED_Key_Access_Execution(Tellib_uint16_t led_status)
static void LED_Key_Access_Execution(Tellib_uint16_t led_status)
{
if ( led_status == 1u )
if (led_status == 1u)
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_11_Key_Access_W, LED_ON);
SEG_SET_LED_STS(SEG_LED_Key_Access,1);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_11_Key_Access_W, LED_ON);
SEG_SET_LED_STS(SEG_LED_Key_Access, 1);
}
else
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_11_Key_Access_W, LED_OFF);
SEG_SET_LED_STS(SEG_LED_Key_Access,0);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_11_Key_Access_W, LED_OFF);
SEG_SET_LED_STS(SEG_LED_Key_Access, 0);
}
}
static Tellib_uint16_t LED_Battery_Charging_Judgement(void)
......@@ -373,15 +368,15 @@ static Tellib_uint16_t LED_Battery_Charging_Judgement(void)
Tellib_uint8_t Signal1 = Get_CAN_Num_MBMS_TOTALSigAcc();
Tellib_uint8_t Signal2 = Get_CAN_Num_MBMS_TOTALSigCharge();
Tellib_uint8_t Signal3 = Get_CAN_Power_State();
if((Get_CAN_Power_State() != PKEY_ON) && (Get_CAN_Power_State() != KEY_OFF) && (Get_CAN_Power_State() != POWER_CHECK_NULL))
if ((Get_CAN_Power_State() != PKEY_ON) && (Get_CAN_Power_State() != KEY_OFF) && (Get_CAN_Power_State() != POWER_CHECK_NULL))
{
if (((Signal1 == 0x1) || (Signal1 == 0x0) ) && (Signal2 == 0X1))
if (((Signal1 == 0x1) || (Signal1 == 0x0)) && (Signal2 == 0X1))
{
if((Signal3 == CHRG_PLUGIN) || (Signal3 == CHRGEND))
if ((Signal3 == CHRG_PLUGIN) || (Signal3 == CHRGEND))
{
LED_STATE = 2;
}
else if(Signal3 == CHRGING)
else if (Signal3 == CHRGING)
{
LED_STATE = 1;
}
......@@ -391,33 +386,33 @@ static Tellib_uint16_t LED_Battery_Charging_Judgement(void)
LED_STATE = 0;
}
}
return LED_STATE;
}
static void LED_Battery_Charging_Execution(Tellib_uint16_t led_status)
}
static void LED_Battery_Charging_Execution(Tellib_uint16_t led_status)
{
if ( led_status == 1u )
if (led_status == 1u)
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_08_Battery_Charging_W, LED_ON);
SEG_SET_LED_STS(SEG_LED_Recharge,1);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_08_Battery_Charging_W, LED_ON);
SEG_SET_LED_STS(SEG_LED_Recharge, 1);
}
else if(led_status == 2u)
else if (led_status == 2u)
{
if(FLASH_SYNC_1Hz)
if (FLASH_SYNC_1Hz)
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_08_Battery_Charging_W, LED_ON);
SEG_SET_LED_STS(SEG_LED_Recharge,1);
SEG_SET_LED_STS(SEG_LED_Recharge, 1);
}
else
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_08_Battery_Charging_W, LED_OFF);
SEG_SET_LED_STS(SEG_LED_Recharge,0);
}
LED_Driver_Channel_Set(LampChannel_0, LampCh0_08_Battery_Charging_W, LED_OFF);
SEG_SET_LED_STS(SEG_LED_Recharge, 0);
}
}
else
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_08_Battery_Charging_W, LED_OFF);
SEG_SET_LED_STS(SEG_LED_Recharge,0);
SEG_SET_LED_STS(SEG_LED_Recharge, 0);
}
}
// static Tellib_uint16_t LED_Battery_Charging_POWEROFF_Judgement(void)
......@@ -443,14 +438,14 @@ static void LED_Battery_Charging_Execution(Tellib_uint16_t led_status
// {
// LED_STATE = 0;
// }
// }
// }
// return LED_STATE;
// }
// }
static Tellib_uint16_t LED_Cutterhead_Switch_Judgement(void)
{
Tellib_uint16_t LED_STATE = 0u;
Tellib_uint8_t Signal1 = Get_CAN_Num_BMCU_PTOSwicthState();
if ((Signal1 == 0x1) && openLED_flag )
if ((Signal1 == 0x1) && openLED_flag)
{
LED_STATE = 1;
}
......@@ -459,57 +454,47 @@ static Tellib_uint16_t LED_Cutterhead_Switch_Judgement(void)
LED_STATE = 0;
}
return LED_STATE;
}
static void LED_Cutterhead_Switch_Execution(Tellib_uint16_t led_status)
}
static void LED_Cutterhead_Switch_Execution(Tellib_uint16_t led_status)
{
if ( led_status == 1u )
if (led_status == 1u)
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_14_Cutterhead_Switch_W, LED_ON);
SEG_SET_LED_STS(SEG_LED_Cutter_Head_switch,1);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_14_Cutterhead_Switch_W, LED_ON);
SEG_SET_LED_STS(SEG_LED_Cutter_Head_switch, 1);
}
else
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_14_Cutterhead_Switch_W, LED_OFF);
SEG_SET_LED_STS(SEG_LED_Cutter_Head_switch,0);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_14_Cutterhead_Switch_W, LED_OFF);
SEG_SET_LED_STS(SEG_LED_Cutter_Head_switch, 0);
}
}
}
static Tellib_uint16_t LED_GEAR_Judgement(void)
{
Tellib_uint16_t LED_STATE = 0u;
Tellib_uint8_t Signal1 = Get_CAN_Num_MMCU_TravelSpeedGear();
Tellib_uint8_t Signal2 = Get_CAN_Num_MMCU_ParkingGearState();
if((Signal2 != 0x1) && (Charge_OFF_Flag == 0) && (System_Indicator_CANFlag != 1))
if((Charge_OFF_Flag == 0) && (System_Indicator_CANFlag != 1))
{
if ((Signal1 == 0x1) || (Signal1 == 0x2))
{
LED_STATE = 1;
}
else
{
LED_STATE = 0;
}
LED_STATE = 1;
}
else if((Charge_OFF_Flag == 0) && (System_Indicator_CANFlag != 1))
else
{
LED_STATE = 1;
LED_STATE = 0;
}
return LED_STATE;
}
static void LED_GEAR_Execution(Tellib_uint16_t led_status)
static void LED_GEAR_Execution(Tellib_uint16_t led_status)
{
if ( led_status == 1u )
if (led_status == 1u)
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_04_GEAR_W, LED_ON);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_04_GEAR_W, LED_ON);
}
else
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_04_GEAR_W, LED_OFF);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_04_GEAR_W, LED_OFF);
}
}
}
static Tellib_uint16_t LED_External_Discharge_Judgement(void)
{
Tellib_uint16_t LED_STATE = 0u;
Tellib_uint16_t LED_STATE = 0u;
// if (Line_In_Get_Status(LINE_IN_HighBeam))
// {
// LED_STATE = 1;
......@@ -520,22 +505,22 @@ static Tellib_uint16_t LED_External_Discharge_Judgement(void)
// }
return LED_STATE;
}
static void LED_External_Discharge_Execution(Tellib_uint16_t led_status)
static void LED_External_Discharge_Execution(Tellib_uint16_t led_status)
{
if ( led_status == 1u )
if (led_status == 1u)
{
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_ON);
// SEG_SET_LED_STS(1,1);
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_ON);
// SEG_SET_LED_STS(1,1);
}
else
{
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_OFF);
// SEG_SET_LED_STS(1,0);
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_OFF);
// SEG_SET_LED_STS(1,0);
}
}
}
static Tellib_uint16_t LED_Engine_Works_Judgement(void)
{
Tellib_uint16_t LED_STATE = 0u;
Tellib_uint16_t LED_STATE = 0u;
// if (Line_In_Get_Status(LINE_IN_HighBeam))
// {
// LED_STATE = 1;
......@@ -546,19 +531,19 @@ static Tellib_uint16_t LED_Engine_Works_Judgement(void)
// }
return LED_STATE;
}
static void LED_Engine_Works_Execution(Tellib_uint16_t led_status)
static void LED_Engine_Works_Execution(Tellib_uint16_t led_status)
{
if ( led_status == 1u )
if (led_status == 1u)
{
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_ON);
// SEG_SET_LED_STS(1,1);
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_ON);
// SEG_SET_LED_STS(1,1);
}
else
{
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_OFF);
// SEG_SET_LED_STS(1,0);
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_OFF);
// SEG_SET_LED_STS(1,0);
}
}
}
static Tellib_uint16_t LED_Bluetooth_Connection_Judgement(void)
{
Tellib_uint16_t LED_STATE = 0u;
......@@ -573,23 +558,23 @@ static Tellib_uint16_t LED_Bluetooth_Connection_Judgement(void)
// }
return LED_STATE;
}
static void LED_Bluetooth_Connection_Execution(Tellib_uint16_t led_status)
static void LED_Bluetooth_Connection_Execution(Tellib_uint16_t led_status)
{
// if ( led_status == 1u )
// {
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_22_Bluetooth_Connection_W, LED_ON);
// SEG_SET_LED_STS(SEG_LED_bluetooth,1);
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_22_Bluetooth_Connection_W, LED_ON);
// SEG_SET_LED_STS(SEG_LED_bluetooth,1);
// }
// else
// {
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_22_Bluetooth_Connection_W, LED_OFF);
// SEG_SET_LED_STS(SEG_LED_bluetooth,0);
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_22_Bluetooth_Connection_W, LED_OFF);
// SEG_SET_LED_STS(SEG_LED_bluetooth,0);
// }
}
}
static Tellib_uint16_t LED_LED_Open_Judgement(void)
{
Tellib_uint16_t LED_STATE = 0u;
if (Line_In_Get_Status(LINE_IN_BigLED) && openLED_flag)
if (Line_In_Get_Status(LINE_IN_BigLED) && openLED_flag)
{
LED_STATE = 1;
}
......@@ -599,22 +584,22 @@ static Tellib_uint16_t LED_LED_Open_Judgement(void)
}
return LED_STATE;
}
static void LED_LED_Open_Execution(Tellib_uint16_t led_status)
static void LED_LED_Open_Execution(Tellib_uint16_t led_status)
{
if ( led_status == 1u )
if (led_status == 1u)
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_21_LED_Open_W, LED_ON);
SEG_SET_LED_STS(SEG_LED_Distance_Light,1);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_21_LED_Open_W, LED_ON);
SEG_SET_LED_STS(SEG_LED_Distance_Light, 1);
}
else
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_21_LED_Open_W, LED_OFF);
SEG_SET_LED_STS(SEG_LED_Distance_Light,0);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_21_LED_Open_W, LED_OFF);
SEG_SET_LED_STS(SEG_LED_Distance_Light, 0);
}
}
}
static Tellib_uint16_t LED_Cruise_Control_Judgement(void)
{
Tellib_uint16_t LED_STATE = 0u;
Tellib_uint16_t LED_STATE = 0u;
// if (Line_In_Get_Status(LINE_IN_HighBeam))
// {
// LED_STATE = 1;
......@@ -625,22 +610,22 @@ static Tellib_uint16_t LED_Cruise_Control_Judgement(void)
// }
return LED_STATE;
}
static void LED_Cruise_Control_Execution(Tellib_uint16_t led_status)
static void LED_Cruise_Control_Execution(Tellib_uint16_t led_status)
{
if ( led_status == 1u )
if (led_status == 1u)
{
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_ON);
// SEG_SET_LED_STS(1,1);
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_ON);
// SEG_SET_LED_STS(1,1);
}
else
{
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_OFF);
// SEG_SET_LED_STS(1,0);
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_OFF);
// SEG_SET_LED_STS(1,0);
}
}
}
static Tellib_uint16_t LED_Tire_pressure_F_Judgement(void)
{
Tellib_uint16_t LED_STATE = 0u;
Tellib_uint16_t LED_STATE = 0u;
// if (Line_In_Get_Status(LINE_IN_HighBeam))
// {
// LED_STATE = 1;
......@@ -651,22 +636,22 @@ static Tellib_uint16_t LED_Tire_pressure_F_Judgement(void)
// }
return LED_STATE;
}
static void LED_Tire_pressure_F_Execution(Tellib_uint16_t led_status)
static void LED_Tire_pressure_F_Execution(Tellib_uint16_t led_status)
{
if ( led_status == 1u )
if (led_status == 1u)
{
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_ON);
// SEG_SET_LED_STS(1,1);
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_ON);
// SEG_SET_LED_STS(1,1);
}
else
{
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_OFF);
// SEG_SET_LED_STS(1,0);
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_OFF);
// SEG_SET_LED_STS(1,0);
}
}
}
static Tellib_uint16_t LED_Tire_pressure_R_Judgement(void)
{
Tellib_uint16_t LED_STATE = 0u;
Tellib_uint16_t LED_STATE = 0u;
// if (Line_In_Get_Status(LINE_IN_HighBeam))
// {
// LED_STATE = 1;
......@@ -676,63 +661,29 @@ static Tellib_uint16_t LED_Tire_pressure_R_Judgement(void)
// LED_STATE = 0;
// }
return LED_STATE;
}
static void LED_Tire_pressure_R_Execution(Tellib_uint16_t led_status)
{
if ( led_status == 1u )
{
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_ON);
// SEG_SET_LED_STS(1,1);
}
else
{
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_OFF);
// SEG_SET_LED_STS(1,0);
}
}
static Tellib_uint16_t LED_Gears_Judgement(void)
}
static void LED_Tire_pressure_R_Execution(Tellib_uint16_t led_status)
{
Tellib_uint16_t LED_STATE = 0u;
Tellib_uint8_t Signal1 = Get_CAN_Num_MMCU_TravelSpeedGear();
Tellib_uint8_t Signal2 = Get_CAN_Num_MMCU_ParkingGearState();
if((Signal2 != 0x1 ) && openLED_flag)
if (led_status == 1u)
{
if ((Signal1 == 0x1) || (Signal1 == 0x2))
{
LED_STATE = 1;
}
else
{
LED_STATE = 0;
}
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_ON);
// SEG_SET_LED_STS(1,1);
}
else
{
LED_STATE = 0;
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_OFF);
// SEG_SET_LED_STS(1,0);
}
return LED_STATE;
}
static void LED_Gears_Execution(Tellib_uint16_t led_status)
{
if ( led_status == 1u )
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_05_Gears_W, LED_ON);
// SEG_SET_LED_STS(1,1);
}
else
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_05_Gears_W, LED_OFF);
// SEG_SET_LED_STS(1,0);
}
}
}
static Tellib_uint16_t LED_Cutterhead_Gear_Judgement(void)
{
Tellib_uint16_t LED_STATE = 0u;
Tellib_uint8_t Signal1 = Get_CAN_Num_BMCU_BladeSpeedGear();
Tellib_uint8_t Signal2 = Get_CAN_Num_BMCU_ErrorGrage();
if(((Signal2 == 0x1) || (Signal2 == 0x2 )|| (Signal2 == 0x3) || (Signal2 == 0x4)) && openLED_flag )
if (((Signal2 == 0x1) || (Signal2 == 0x2) || (Signal2 == 0x3) || (Signal2 == 0x4)) && openLED_flag)
{
if((Signal1 == 0x1) || (Signal1 == 0x2) || (Signal1 == 0x3))
if ((Signal1 == 0x1) || (Signal1 == 0x2) || (Signal1 == 0x3))
{
LED_STATE = 2;
}
......@@ -741,9 +692,9 @@ static Tellib_uint16_t LED_Cutterhead_Gear_Judgement(void)
LED_STATE = 0;
}
}
else if ((Signal2 == 0x0) && openLED_flag)
else if ((Signal2 == 0x0) && openLED_flag)
{
if((Signal1 == 0x1) || (Signal1 == 0x2) || (Signal1 == 0x3))
if ((Signal1 == 0x1) || (Signal1 == 0x2) || (Signal1 == 0x3))
{
LED_STATE = 1;
}
......@@ -754,30 +705,30 @@ static Tellib_uint16_t LED_Cutterhead_Gear_Judgement(void)
}
return LED_STATE;
}
static void LED_Cutterhead_Gear_Execution(Tellib_uint16_t led_status)
static void LED_Cutterhead_Gear_Execution(Tellib_uint16_t led_status)
{
if ( led_status == 1u )
if (led_status == 1u)
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_15_Cutterhead_Gear_W, LED_ON);
// SEG_SET_LED_STS(1,1);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_15_Cutterhead_Gear_W, LED_ON);
// SEG_SET_LED_STS(1,1);
}
else if(led_status == 2u)
else if (led_status == 2u)
{
if(FLASH_SYNC_1Hz)
if (FLASH_SYNC_1Hz)
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_15_Cutterhead_Gear_W, LED_ON);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_15_Cutterhead_Gear_W, LED_ON);
}
else
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_15_Cutterhead_Gear_W, LED_OFF);
}
// SEG_SET_LED_STS(1,0);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_15_Cutterhead_Gear_W, LED_OFF);
}
// SEG_SET_LED_STS(1,0);
}
else
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_15_Cutterhead_Gear_W, LED_OFF);
}
}
}
static Tellib_uint16_t LED_Working_Hours_One_Judgement(void)
{
Tellib_uint16_t LED_STATE = 0u;
......@@ -791,19 +742,19 @@ static Tellib_uint16_t LED_Working_Hours_One_Judgement(void)
}
return LED_STATE;
}
static void LED_Working_Hours_One_Execution(Tellib_uint16_t led_status)
static void LED_Working_Hours_One_Execution(Tellib_uint16_t led_status)
{
if ( led_status == 1u )
if (led_status == 1u)
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_31_Working_Hours_One_W, LED_ON);
}
else
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_31_Working_Hours_One_W, LED_OFF);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_31_Working_Hours_One_W, LED_OFF);
}
}
static Tellib_uint16_t LED_Fault_Codes_Judgement(void)
{
{
Tellib_uint16_t LED_STATE = 0u;
// if (Line_In_Get_Status(LINE_IN_HighBeam))
// {
......@@ -815,17 +766,17 @@ static Tellib_uint16_t LED_Fault_Codes_Judgement(void)
// }
return LED_STATE;
}
static void LED_Fault_Codes_Execution(Tellib_uint16_t led_status)
static void LED_Fault_Codes_Execution(Tellib_uint16_t led_status)
{
if ( led_status == 1u )
if (led_status == 1u)
{
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_ON);
// SEG_SET_LED_STS(1,1);
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_ON);
// SEG_SET_LED_STS(1,1);
}
else
{
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_OFF);
// SEG_SET_LED_STS(1,0);
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_OFF);
// SEG_SET_LED_STS(1,0);
}
}
......@@ -835,7 +786,7 @@ static Tellib_uint16_t LED_SystIndicator_R_Judgement(void)
Tellib_uint8_t Signal1 = Get_CAN_Num_MMCU_ErrorGrage();
Tellib_uint8_t Signal2 = Get_CAN_Num_SMCU_ErrorGrage();
Tellib_uint8_t Signal3 = System_Indicator_CANFlag;
if (((Signal1 == 0x4) || (Signal1 == 0x5) ||(Signal2 == 0x4) || (Signal2 == 0x5) || (Signal3 == 1)))
if (((Signal1 == 0x4) || (Signal1 == 0x5) || (Signal2 == 0x4) || (Signal2 == 0x5) || (Signal3 == 1)))
{
LED_STATE = 1;
......@@ -845,65 +796,65 @@ static Tellib_uint16_t LED_SystIndicator_R_Judgement(void)
LED_STATE = 0;
}
return LED_STATE;
}
static void LED_SystIndicator_R_Execution(Tellib_uint16_t led_status)
}
static void LED_SystIndicator_R_Execution(Tellib_uint16_t led_status)
{
if ( led_status == 1u )
if (led_status == 1u)
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_02_System_Indicator_R, LED_ON);
SEG_SET_LED_STS(SEG_LED_System_Light,1);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_02_System_Indicator_R, LED_ON);
SEG_SET_LED_STS(SEG_LED_System_Light, 1);
}
else
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_02_System_Indicator_R, LED_OFF);
SEG_SET_LED_STS(SEG_LED_System_Light,0);
SEG_SET_LED_STS(SEG_LED_System_Light, 0);
}
}
}
static Tellib_uint16_t LED_P_GEAR_G_Judgement(void)
{
Tellib_uint16_t LED_STATE = 0u;
Tellib_uint8_t Signal1 = Get_CAN_Num_MMCU_ParkingGearState();
Tellib_uint8_t Signal2 = Get_CAN_Power_State();
if ( (Signal1 == 0x1) && openLED_flag && (checkself_seg_Flag == 0))
{
LED_STATE = 1;
}
else if((Signal2 == PKEY_ON )&& (checkself_seg_Flag == 0))
if (checkself_seg_Flag == 0)
{
LED_STATE = 2;
if ((Signal2 == PKEY_ON))
{
LED_STATE = 2;
}
else if (openLED_flag)
{
LED_STATE = 1;
}
}
else
{
LED_STATE = 0;
}
return LED_STATE;
}
static void LED_P_GEAR_G_Execution(Tellib_uint16_t led_status)
}
static void LED_P_GEAR_G_Execution(Tellib_uint16_t led_status)
{
if ( led_status == 1u )
if (led_status == 1u)
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_05_Gears_W, LED_ON);
SEG_SET_GEAR(1, Gear_P, 0);
}
else if(led_status == 2u)
else if (led_status == 2u)
{
if(FLASH_SYNC_1Hz)
{
if (FLASH_SYNC_1Hz)
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_05_Gears_W, LED_ON);
SEG_SET_GEAR(1, Gear_P, 0);
}
else
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_05_Gears_W, LED_OFF);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_05_Gears_W, LED_OFF);
SEG_SET_GEAR(1, Gear_OFF, 0);
}
}
}
else if(checkself_seg_Flag == 0)
else if (checkself_seg_Flag == 0)
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_05_Gears_W, LED_OFF);
SEG_SET_GEAR(0, Gear_P, 0);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_05_Gears_W, LED_OFF);
}
}
}
static Tellib_uint16_t LED_Fuel_Alarm_W_Judgement(void)
{
Tellib_uint16_t LED_STATE = 0u;
......@@ -917,24 +868,24 @@ static Tellib_uint16_t LED_Fuel_Alarm_W_Judgement(void)
// }
return LED_STATE;
}
static void LED_Fuel_Alarm_W_Execution(Tellib_uint16_t led_status)
static void LED_Fuel_Alarm_W_Execution(Tellib_uint16_t led_status)
{
if ( led_status == 1u )
if (led_status == 1u)
{
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_ON);
// SEG_SET_LED_STS(1,1);
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_ON);
// SEG_SET_LED_STS(1,1);
}
else
{
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_OFF);
// SEG_SET_LED_STS(1,0);
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_07_Key_ISTOP, LED_OFF);
// SEG_SET_LED_STS(1,0);
}
}
}
static Tellib_uint16_t LED_Charging_Connection_R_Judgement(void)
{
Tellib_uint16_t LED_STATE = 0u;
Tellib_uint8_t Signal1 = Get_CAN_Num_MBMS_StatBattChargeState();
if (((Signal1 == 0x1) || (Signal1 == 0x2) ||(Signal1 == 0x3)) && ((Get_CAN_Power_State() != PKEY_ON) && (Get_CAN_Power_State() != KEY_OFF) && (Get_CAN_Power_State() != POWER_CHECK_NULL)))
if (((Signal1 == 0x1) || (Signal1 == 0x2) || (Signal1 == 0x3)) && ((Get_CAN_Power_State() != PKEY_ON) && (Get_CAN_Power_State() != KEY_OFF) && (Get_CAN_Power_State() != POWER_CHECK_NULL)))
{
LED_STATE = 1;
}
......@@ -943,20 +894,20 @@ static Tellib_uint16_t LED_Charging_Connection_R_Judgement(void)
LED_STATE = 0;
}
return LED_STATE;
}
static void LED_Charging_Connection_R_Execution(Tellib_uint16_t led_status)
}
static void LED_Charging_Connection_R_Execution(Tellib_uint16_t led_status)
{
if ( led_status == 1u )
if (led_status == 1u)
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_32_Charging_Connection_R, LED_ON);
SEG_SET_LED_STS(SEG_LED_HHT_Charger,1);
LED_Driver_Channel_Set(LampChannel_0, LampCh0_32_Charging_Connection_R, LED_ON);
SEG_SET_LED_STS(SEG_LED_HHT_Charger, 1);
}
else
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_32_Charging_Connection_R, LED_OFF);
SEG_SET_LED_STS(SEG_LED_HHT_Charger,0);
SEG_SET_LED_STS(SEG_LED_HHT_Charger, 0);
}
}
}
static Tellib_uint16_t LED_Power_Battery_Failure_R_Judgement(void)
{
......@@ -971,17 +922,17 @@ static Tellib_uint16_t LED_Power_Battery_Failure_R_Judgement(void)
// LED_STATE = 0;
// }
return LED_STATE;
}
static void LED_Power_Battery_Failure_R_Execution(Tellib_uint16_t led_status)
}
static void LED_Power_Battery_Failure_R_Execution(Tellib_uint16_t led_status)
{
// if ( (led_status == 1u ) && openLED_flag)
// {
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_01_Power_Battery_Failure_R, LED_ON);
// SEG_SET_LED_STS(SEG_LED_Power_Battery_Failure,1);
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_01_Power_Battery_Failure_R, LED_ON);
// SEG_SET_LED_STS(SEG_LED_Power_Battery_Failure,1);
// }
// else
// {
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_01_Power_Battery_Failure_R, LED_OFF);
// SEG_SET_LED_STS(SEG_LED_Power_Battery_Failure,0);
// SEG_SET_LED_STS(SEG_LED_Power_Battery_Failure,0);
// }
}
......@@ -26,7 +26,6 @@ typedef enum
em_LED_Cruise_Control_W,
em_LED_Tire_pressure_F_W,
em_LED_Tire_pressure_R_W,
em_LED_Gears_W,
em_LED_Cutterhead_Gear_W,
em_LED_Working_Hours_One_W,
......
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