Commit 4725c32f authored by 郑萍's avatar 郑萍

🐞 fix:掉线后显示要求:掉线后,保持原有显示。

parent ece790c7
...@@ -36,7 +36,6 @@ typedef enum ...@@ -36,7 +36,6 @@ typedef enum
CHRG_PLUGIN, CHRG_PLUGIN,
CHRGING, CHRGING,
CHRGEND, CHRGEND,
} POWER_CHECK_STATE_t; } POWER_CHECK_STATE_t;
typedef enum typedef enum
...@@ -64,6 +63,8 @@ extern const st_CAN_SendAttribute CAN_CH0_CANSendAttr[CAN_CH0_ID_SEND_TOTAL] ...@@ -64,6 +63,8 @@ extern const st_CAN_SendAttribute CAN_CH0_CANSendAttr[CAN_CH0_ID_SEND_TOTAL]
#define CAN_CH0_ID_CAN_0x18200A21_Msg 0x18200A21ul #define CAN_CH0_ID_CAN_0x18200A21_Msg 0x18200A21ul
#define CAN_CH0_ID_CAN_0x134_Msg 0x134ul #define CAN_CH0_ID_CAN_0x134_Msg 0x134ul
extern uint8_t Get_CAN_CH0_ID_398_Sig_ICU_SN0(void); extern uint8_t Get_CAN_CH0_ID_398_Sig_ICU_SN0(void);
extern uint8_t Get_CAN_CH0_ID_398_Sig_ICU_SN1(void); extern uint8_t Get_CAN_CH0_ID_398_Sig_ICU_SN1(void);
extern uint8_t Get_CAN_CH0_ID_398_Sig_ICU_SN2(void); extern uint8_t Get_CAN_CH0_ID_398_Sig_ICU_SN2(void);
...@@ -104,8 +105,38 @@ extern uint8_t Get_CAN_CH0_ID_339_Sig_MMCU_SingleWorkingHours(void); ...@@ -104,8 +105,38 @@ extern uint8_t Get_CAN_CH0_ID_339_Sig_MMCU_SingleWorkingHours(void);
extern uint8_t Get_CAN_CH0_ID_18200A21_Sig_SBMS_Soc(void); extern uint8_t Get_CAN_CH0_ID_18200A21_Sig_SBMS_Soc(void);
extern uint8_t Get_CAN_CH0_ID_134_Sig_SMCU_ErrorGrage(void); extern uint8_t Get_CAN_CH0_ID_134_Sig_SMCU_ErrorGrage(void);
extern uint8_t Get_CAN_Num_BMCU_ErrorGrage(void);
extern uint8_t Get_CAN_Num_BMCU_BladeSpeedGear(void);
extern uint8_t Get_CAN_Num_BMCU_PTOSwicthState(void);
extern uint8_t Get_CAN_Num_BMCU_Moto2_Locked_RotorFault(void);
extern uint8_t Get_CAN_Num_BMCU_Moto1_Locked_RotorFault(void);
extern uint8_t Get_CAN_Num_MBMS_Soc(void);
extern uint8_t Get_CAN_Num_MBMS_TOTALWorkState(void);
extern uint8_t Get_CAN_Num_MBMS_TOTALSigOn(void);
extern uint8_t Get_CAN_Num_MBMS_TOTALSigAcc(void);
extern uint8_t Get_CAN_Num_MBMS_TOTALSigCharge(void);
extern uint8_t Get_CAN_Num_MBMS_StatSoc(void);
extern uint8_t Get_CAN_Num_MBMS_StatBattChargeState(void);
extern uint8_t Get_CAN_Num_MBMS_StatBattWorkState(void);
extern uint8_t Get_CAN_Num_MMCU_ErrorGrage(void);
extern uint8_t Get_CAN_Num_MMCU_ChgProtectState(void);
extern uint8_t Get_CAN_Num_MMCU_DCDCEnableState(void);
extern uint8_t Get_CAN_Num_MMCU_ParkingGearState(void);
extern uint8_t Get_CAN_Num_MMCU_SeatDetectState(void);
extern uint8_t Get_CAN_Num_MMCU_LockMotoState(void);
extern uint8_t Get_CAN_Num_MMCU_EBSState(void);
extern uint8_t Get_CAN_Num_MMCU_TravelSpeedGear(void);
extern uint8_t Get_CAN_Num_MMCU_PowerMode(void);
extern uint8_t Get_CAN_Num_MMCU_WorkState(void);
extern uint16_t Get_CAN_Num_MMCU_AccumulatedWorkHours(void);
extern uint8_t Get_CAN_Num_MMCU_SingleWorkingHours(void);
extern uint8_t Get_CAN_Num_SBMS_Soc(void);
extern uint8_t Get_CAN_Num_SMCU_ErrorGrage(void);
extern uint8_t Co_Can_ConvertSubID_CAN_CH0(uint32_t MsgID); extern uint8_t Co_Can_ConvertSubID_CAN_CH0(uint32_t MsgID);
extern uint8_t System_Indicator_CANFlag; extern uint8_t System_Indicator_CANFlag;
extern void Set_CAN_ALL_Signal(void);
void System_Indicator_ON_callback(void); void System_Indicator_ON_callback(void);
void System_Indicator_OFF_callback(void); void System_Indicator_OFF_callback(void);
extern uint8_t Get_CAN_Power_State(void); extern uint8_t Get_CAN_Power_State(void);
......
...@@ -8,46 +8,17 @@ uint8_t SOC_Count_Time = 0; ...@@ -8,46 +8,17 @@ uint8_t SOC_Count_Time = 0;
uint8_t BUZZER_ON = 0; uint8_t BUZZER_ON = 0;
uint8_t Charge_OFF_Flag = 0; uint8_t Charge_OFF_Flag = 0;
// void Gauge_Gear_Display(void)
// {
// // uint8_t MBMS_StatBattWorkState = Get_CAN_CH0_ID_18203220_Sig_MBMS_StatBattWorkState();
// if (Common_Get_IG_Sts() == COMMON_POWER_ON)
// {
// SEG_SET_GEAR(1,);
// }
// else
// {
// }
// }
void Gauge_Power_SOC_pull_Display(void) void Gauge_Power_SOC_pull_Display(void)
{ {
// uint8_t MBMS_StatBattWorkState = Get_CAN_CH0_ID_18203220_Sig_MBMS_StatBattWorkState(); // uint8_t MBMS_StatBattWorkState = Get_CAN_CH0_ID_18203220_Sig_MBMS_StatBattWorkState();
if (Common_Get_IG_Sts() == COMMON_POWER_ON && Charge_OFF_Flag == 0) if (Common_Get_IG_Sts() == COMMON_POWER_ON && Charge_OFF_Flag == 0)
{ {
if (CAN_MSG_Status(&CAN_CH0_CanMsgOp, Co_Can_ConvertSubID_CAN_CH0(CAN_CH0_ID_CAN_0x18200A20_Msg)) == CAN_ERR_OK ) uint8_t SOC_1_Count = Get_CAN_Num_MBMS_Soc();
{ uint8_t SOC_2_Count = Get_CAN_Num_SBMS_Soc();
uint8_t SOC_1_Count = Get_CAN_CH0_ID_18200A20_Sig_MBMS_Soc();
SEG_SET_EleDial_1SOC(1, SOC_1_Count); SEG_SET_EleDial_1SOC(1, SOC_1_Count);
}
else
{
SEG_SET_EleDial_1SOC(0, 0);
}
if (CAN_MSG_Status(&CAN_CH0_CanMsgOp, Co_Can_ConvertSubID_CAN_CH0(CAN_CH0_ID_CAN_0x18200A21_Msg)) == CAN_ERR_OK)
{
uint8_t SOC_2_Count = Get_CAN_CH0_ID_18200A21_Sig_SBMS_Soc();
SEG_SET_EleDial_2SOC(1, SOC_2_Count); SEG_SET_EleDial_2SOC(1, SOC_2_Count);
} }
else else
{
SEG_SET_EleDial_2SOC(0, 0);
}
}
else
{ {
SEG_SET_EleDial_1SOC(0, 0); SEG_SET_EleDial_1SOC(0, 0);
SEG_SET_EleDial_2SOC(0, 0); SEG_SET_EleDial_2SOC(0, 0);
...@@ -56,12 +27,11 @@ void Gauge_Power_SOC_pull_Display(void) ...@@ -56,12 +27,11 @@ void Gauge_Power_SOC_pull_Display(void)
void Gauge_Cutterhead_Gear_Display(void) void Gauge_Cutterhead_Gear_Display(void)
{ {
uint8_t Signal1 = Get_CAN_CH0_ID_157_Sig_BMCU_BladeSpeedGear(); uint8_t Signal1 = Get_CAN_Num_BMCU_BladeSpeedGear();
uint8_t Signal2 = Get_CAN_CH0_ID_157_Sig_BMCU_ErrorGrage(); uint8_t Signal2 = Get_CAN_Num_BMCU_ErrorGrage();
// uint8_t MBMS_StatBattWorkState = Get_CAN_CH0_ID_18203220_Sig_MBMS_StatBattWorkState(); // uint8_t MBMS_StatBattWorkState = Get_CAN_CH0_ID_18203220_Sig_MBMS_StatBattWorkState();
if (Common_Get_IG_Sts() == COMMON_POWER_ON && Charge_OFF_Flag == 0 && CAN_MSG_Status(&CAN_CH0_CanMsgOp, Co_Can_ConvertSubID_CAN_CH0(CAN_CH0_ID_CAN_0x157_Msg)) == CAN_ERR_OK) if (Common_Get_IG_Sts() == COMMON_POWER_ON && Charge_OFF_Flag == 0)
{ {
if (Signal2 == 0x1 || Signal2 == 0x2 || Signal2 == 0x3 || Signal2 == 0x4) if (Signal2 == 0x1 || Signal2 == 0x2 || Signal2 == 0x3 || Signal2 == 0x4)
{ {
if (FLASH_SYNC_1Hz) if (FLASH_SYNC_1Hz)
...@@ -86,8 +56,8 @@ void Gauge_Cutterhead_Gear_Display(void) ...@@ -86,8 +56,8 @@ void Gauge_Cutterhead_Gear_Display(void)
void Gauge_Gears_Display(void) void Gauge_Gears_Display(void)
{ {
uint8_t Signal1 = Get_CAN_CH0_ID_125_Sig_MMCU_TravelSpeedGear(); uint8_t Signal1 = Get_CAN_Num_MMCU_TravelSpeedGear();
uint8_t Signal2 = Get_CAN_CH0_ID_125_Sig_MMCU_ParkingGearState(); uint8_t Signal2 = Get_CAN_Num_MMCU_ParkingGearState();
// uint8_t MBMS_StatBattWorkState = Get_CAN_CH0_ID_18203220_Sig_MBMS_StatBattWorkState(); // uint8_t MBMS_StatBattWorkState = Get_CAN_CH0_ID_18203220_Sig_MBMS_StatBattWorkState();
if (Common_Get_IG_Sts() == COMMON_POWER_ON && Charge_OFF_Flag == 0) if (Common_Get_IG_Sts() == COMMON_POWER_ON && Charge_OFF_Flag == 0)
{ {
...@@ -112,16 +82,14 @@ uint8_t SOC1_Count = 0; ...@@ -112,16 +82,14 @@ uint8_t SOC1_Count = 0;
uint8_t SOC2_Count = 0; uint8_t SOC2_Count = 0;
void Gauge_Power_SOC_CHAGING_Display(void) void Gauge_Power_SOC_CHAGING_Display(void)
{ {
uint8_t MBMS_TOTALSigAcc = Get_CAN_CH0_ID_18202922_Sig_MBMS_TOTALSigAcc(); uint8_t MBMS_TOTALSigAcc = Get_CAN_Num_MBMS_TOTALSigAcc();
uint8_t MBMS_TOTALSigCharge = Get_CAN_CH0_ID_18202922_Sig_MBMS_TOTALSigCharge(); uint8_t MBMS_TOTALSigCharge = Get_CAN_Num_MBMS_TOTALSigCharge();
uint8_t MBMS_StatBattWorkState = Get_CAN_CH0_ID_18203220_Sig_MBMS_StatBattWorkState(); uint8_t MBMS_StatBattWorkState = Get_CAN_Num_MBMS_StatBattWorkState();
// uint8_t MBMS_StatBattWorkState = Get_CAN_CH0_ID_18203220_Sig_MBMS_StatBattWorkState(); // uint8_t MBMS_StatBattWorkState = Get_CAN_CH0_ID_18203220_Sig_MBMS_StatBattWorkState();
if (Common_Get_IG_Sts() == COMMON_POWER_ON) if (Common_Get_IG_Sts() == COMMON_POWER_ON)
{ {
if (CAN_MSG_Status(&CAN_CH0_CanMsgOp, Co_Can_ConvertSubID_CAN_CH0(CAN_CH0_ID_CAN_0x18200A20_Msg)) == CAN_ERR_OK || CAN_MSG_Status(&CAN_CH0_CanMsgOp, Co_Can_ConvertSubID_CAN_CH0(CAN_CH0_ID_CAN_0x18200A21_Msg)) == CAN_ERR_OK) uint8_t SOC_1_Count = Get_CAN_Num_MBMS_Soc();
{ uint8_t SOC_2_Count = Get_CAN_Num_SBMS_Soc();
uint8_t SOC_1_Count = Get_CAN_CH0_ID_18200A20_Sig_MBMS_Soc();
uint8_t SOC_2_Count = Get_CAN_CH0_ID_18200A21_Sig_SBMS_Soc();
if ((MBMS_TOTALSigAcc == 0x1 && MBMS_TOTALSigCharge == 0x1) || (MBMS_TOTALSigAcc == 0x0 && MBMS_TOTALSigCharge == 0x1)) // 上电充电 if ((MBMS_TOTALSigAcc == 0x1 && MBMS_TOTALSigCharge == 0x1) || (MBMS_TOTALSigAcc == 0x0 && MBMS_TOTALSigCharge == 0x1)) // 上电充电
{ {
if (MBMS_StatBattWorkState == 0x1) // 主电池 if (MBMS_StatBattWorkState == 0x1) // 主电池
...@@ -137,15 +105,9 @@ void Gauge_Power_SOC_CHAGING_Display(void) ...@@ -137,15 +105,9 @@ void Gauge_Power_SOC_CHAGING_Display(void)
SOC1_Count = 0; SOC1_Count = 0;
} }
} }
if(CAN_MSG_Status(&CAN_CH0_CanMsgOp, Co_Can_ConvertSubID_CAN_CH0(CAN_CH0_ID_CAN_0x18200A21_Msg)))
{
SEG_SET_EleDial_2SOC(0, 0);
}
else
{
SEG_SET_EleDial_2SOC(1, SOC_2_Count); SEG_SET_EleDial_2SOC(1, SOC_2_Count);
} }
}
else if (MBMS_StatBattWorkState == 0x4) // 副电池 else if (MBMS_StatBattWorkState == 0x4) // 副电池
{ {
if (++SOC_Count_Time > 10) if (++SOC_Count_Time > 10)
...@@ -159,15 +121,9 @@ void Gauge_Power_SOC_CHAGING_Display(void) ...@@ -159,15 +121,9 @@ void Gauge_Power_SOC_CHAGING_Display(void)
SOC2_Count = 0; SOC2_Count = 0;
} }
} }
if(CAN_MSG_Status(&CAN_CH0_CanMsgOp, Co_Can_ConvertSubID_CAN_CH0(CAN_CH0_ID_CAN_0x18200A20_Msg)))
{
SEG_SET_EleDial_1SOC(0, 0);
}
else
{
SEG_SET_EleDial_1SOC(1, SOC_1_Count); SEG_SET_EleDial_1SOC(1, SOC_1_Count);
} }
}
else if (MBMS_StatBattWorkState == 0x7) // 主副电池 else if (MBMS_StatBattWorkState == 0x7) // 主副电池
{ {
if (++SOC_Count_Time > 10) if (++SOC_Count_Time > 10)
...@@ -224,12 +180,6 @@ void Gauge_Power_SOC_CHAGING_Display(void) ...@@ -224,12 +180,6 @@ void Gauge_Power_SOC_CHAGING_Display(void)
SEG_SET_EleDial_1SOC(0, 0); SEG_SET_EleDial_1SOC(0, 0);
SEG_SET_EleDial_2SOC(0, 0); SEG_SET_EleDial_2SOC(0, 0);
} }
}
else
{
SEG_SET_EleDial_1SOC(0, 0);
SEG_SET_EleDial_2SOC(0, 0);
}
} }
uint8_t AllSOC_DIS = 0; uint8_t AllSOC_DIS = 0;
void Gauge_EleDial_AllSOC_Display(void) void Gauge_EleDial_AllSOC_Display(void)
...@@ -237,20 +187,13 @@ void Gauge_EleDial_AllSOC_Display(void) ...@@ -237,20 +187,13 @@ void Gauge_EleDial_AllSOC_Display(void)
if (Common_Get_IG_Sts() == COMMON_POWER_ON) if (Common_Get_IG_Sts() == COMMON_POWER_ON)
{ {
if (CAN_MSG_Status(&CAN_CH0_CanMsgOp, Co_Can_ConvertSubID_CAN_CH0(CAN_CH0_ID_CAN_0x18203020_Msg)) == CAN_ERR_OK) AllSOC_DIS = Get_CAN_Num_MBMS_StatSoc();
{
AllSOC_DIS = Get_CAN_CH0_ID_18203020_Sig_MBMS_StatSoc();
SEG_SET_EleDial_AllSOC(1, AllSOC_DIS); SEG_SET_EleDial_AllSOC(1, AllSOC_DIS);
} }
else else
{ {
SEG_SET_EleDial_AllSOC(0, 0); SEG_SET_EleDial_AllSOC(0, 0);
} }
}
else
{
SEG_SET_EleDial_AllSOC(0, 0);
}
} }
uint8_t Get_EleDial_AllSOC_lenth(void) uint8_t Get_EleDial_AllSOC_lenth(void)
...@@ -267,27 +210,18 @@ uint8_t Get_EleDial_AllSOC_lenth(void) ...@@ -267,27 +210,18 @@ uint8_t Get_EleDial_AllSOC_lenth(void)
return num; return num;
} }
uint8_t Clockonetime_flag = 0; uint8_t Clockonetime_flag = 0;
uint8_t Clock_seconds = 0;
uint8_t Clock_hours = 0;
void Gauge_Clock_Display(void) void Gauge_Clock_Display(void)
{ {
uint32_t Clock_all = 0; uint32_t Clock_all = 0;
if (Common_Get_IG_Sts() == COMMON_POWER_ON && Charge_OFF_Flag == 0) if (Common_Get_IG_Sts() == COMMON_POWER_ON && Charge_OFF_Flag == 0)
{ {
if (CAN_MSG_Status(&CAN_CH0_CanMsgOp, Co_Can_ConvertSubID_CAN_CH0(CAN_CH0_ID_CAN_0x339_Msg)) == CAN_ERR_OK) Clock_all = Get_CAN_Num_MMCU_SingleWorkingHours();
{ uint8_t Clock_hours = Clock_all / 60;
Clock_all = Get_CAN_CH0_ID_339_Sig_MMCU_SingleWorkingHours(); uint8_t Clock_seconds = Clock_all % 60;
Clock_hours = Clock_all / 60;
Clock_seconds = Clock_all % 60;
SEG_SET_Clock(Clock_hours, Clock_seconds, FLASH_SYNC_1Hz, 1, 1); SEG_SET_Clock(Clock_hours, Clock_seconds, FLASH_SYNC_1Hz, 1, 1);
Clockonetime_flag = 1; Clockonetime_flag = 1;
} }
else else
{
SEG_SET_Clock(Clock_hours, Clock_seconds, 0, 0, 0);
}
}
else
{ {
SEG_SET_Clock(0, 0, 0, 0, 0); SEG_SET_Clock(0, 0, 0, 0, 0);
Clockonetime_flag = 0; Clockonetime_flag = 0;
...@@ -304,10 +238,10 @@ void Data_CumulativeWorkHours_EEPROM_Write(void) ...@@ -304,10 +238,10 @@ void Data_CumulativeWorkHours_EEPROM_Write(void)
{ {
uint32_t u32Data[1] = {0}; uint32_t u32Data[1] = {0};
uint32_t eeprom_back[1] = {0}; uint32_t eeprom_back[1] = {0};
if (CAN_MSG_Status(&CAN_CH0_CanMsgOp, Co_Can_ConvertSubID_CAN_CH0(CAN_CH0_ID_CAN_0x339_Msg)) == CAN_ERR_OK) if (Common_Get_IG_Sts() == COMMON_POWER_ON && Charge_OFF_Flag == 0)
{ {
u32Data[0] = Get_CAN_CH0_ID_339_Sig_MMCU_AccumulatedWorkHours(); u32Data[0] = Get_CAN_Num_MMCU_AccumulatedWorkHours();
if(u32Data[0] > 0XFFFA && EEPROM_Cumulativee_clean == 0) if (u32Data[0] > 0XFFFA && EEPROM_Cumulativee_clean == 0)
{ {
EEPROM_Cumulativee_clean = 1; EEPROM_Cumulativee_clean = 1;
eeprom_WriteRecord(EEPROM_BLOCK_00, (uint8_t *)eeprom_back, 4); eeprom_WriteRecord(EEPROM_BLOCK_00, (uint8_t *)eeprom_back, 4);
...@@ -334,7 +268,6 @@ void Data_CumulativeWorkHours_EEPROM_Write(void) ...@@ -334,7 +268,6 @@ void Data_CumulativeWorkHours_EEPROM_Write(void)
uint32_t u32Data_read[1] = {0}; uint32_t u32Data_read[1] = {0};
void Gauge_Clock_All_Display(void) void Gauge_Clock_All_Display(void)
{ {
eeprom_ReadRecord(EEPROM_BLOCK_00, (uint8_t *)u32Data_read, 4); eeprom_ReadRecord(EEPROM_BLOCK_00, (uint8_t *)u32Data_read, 4);
if (Common_Get_IG_Sts() == COMMON_POWER_ON && Charge_OFF_Flag == 0) if (Common_Get_IG_Sts() == COMMON_POWER_ON && Charge_OFF_Flag == 0)
{ {
...@@ -438,7 +371,6 @@ void Gauge_Service(void) ...@@ -438,7 +371,6 @@ void Gauge_Service(void)
if (Buzzer_time < 0xFFFF) if (Buzzer_time < 0xFFFF)
{ {
Buzzer_time++; Buzzer_time++;
} }
} }
} }
...@@ -501,8 +433,8 @@ void Gauge_CAN_setup_Service(void) ...@@ -501,8 +433,8 @@ void Gauge_CAN_setup_Service(void)
else else
{ {
Charge_OFF_Flag = 2; Charge_OFF_Flag = 2;
uint8_t MBMS_TOTALSigAcc = Get_CAN_CH0_ID_18202922_Sig_MBMS_TOTALSigAcc(); uint8_t MBMS_TOTALSigAcc = Get_CAN_Num_MBMS_TOTALSigAcc();
uint8_t MBMS_TOTALSigCharge = Get_CAN_CH0_ID_18202922_Sig_MBMS_TOTALSigCharge(); uint8_t MBMS_TOTALSigCharge = Get_CAN_Num_MBMS_TOTALSigCharge();
SEG_SET_EleDial_AllSOC(0, 0); SEG_SET_EleDial_AllSOC(0, 0);
SEG_SET_EleDial_1SOC(0, 0); SEG_SET_EleDial_1SOC(0, 0);
SEG_SET_EleDial_2SOC(0, 0); SEG_SET_EleDial_2SOC(0, 0);
......
...@@ -252,8 +252,8 @@ static void LED_Grass_Full_Execution(Tellib_uint16_t led_status) ...@@ -252,8 +252,8 @@ static void LED_Grass_Full_Execution(Tellib_uint16_t led_status)
static Tellib_uint16_t LED_OVERLOAD_Judgement(void) static Tellib_uint16_t LED_OVERLOAD_Judgement(void)
{ {
Tellib_uint16_t LED_STATE = 0u; Tellib_uint16_t LED_STATE = 0u;
Tellib_uint8_t Signal1 = Get_CAN_CH0_ID_38E_Sig_BMCU_Moto1_Locked_RotorFault(); Tellib_uint8_t Signal1 = Get_CAN_Num_BMCU_Moto1_Locked_RotorFault();
Tellib_uint8_t Signal2 = Get_CAN_CH0_ID_38E_Sig_BMCU_Moto2_Locked_RotorFault(); Tellib_uint8_t Signal2 = Get_CAN_Num_BMCU_Moto2_Locked_RotorFault();
if ((Signal1 == 0x1 || Signal2 == 0x1) && openLED_flag) if ((Signal1 == 0x1 || Signal2 == 0x1) && openLED_flag)
{ {
LED_STATE = 1; LED_STATE = 1;
...@@ -307,7 +307,7 @@ static void LED_READY_Execution(Tellib_uint16_t led_status) ...@@ -307,7 +307,7 @@ static void LED_READY_Execution(Tellib_uint16_t led_status)
static Tellib_uint16_t LED_Seat_Detection_Judgement(void) static Tellib_uint16_t LED_Seat_Detection_Judgement(void)
{ {
Tellib_uint16_t LED_STATE = 0u; Tellib_uint16_t LED_STATE = 0u;
Tellib_uint8_t Signal1 = Get_CAN_CH0_ID_125_Sig_MMCU_SeatDetectState(); Tellib_uint8_t Signal1 = Get_CAN_Num_MMCU_SeatDetectState();
if (Signal1 == 0x1 && openLED_flag) if (Signal1 == 0x1 && openLED_flag)
{ {
LED_STATE = 1; LED_STATE = 1;
...@@ -343,7 +343,7 @@ static void LED_Seat_Detection_Execution(Tellib_uint16_t led_status) ...@@ -343,7 +343,7 @@ static void LED_Seat_Detection_Execution(Tellib_uint16_t led_status)
static Tellib_uint16_t LED_Key_Access_Judgement(void) static Tellib_uint16_t LED_Key_Access_Judgement(void)
{ {
Tellib_uint16_t LED_STATE = 0u; Tellib_uint16_t LED_STATE = 0u;
Tellib_uint8_t Signal1 = Get_CAN_CH0_ID_18202922_Sig_MBMS_TOTALSigAcc(); Tellib_uint8_t Signal1 = Get_CAN_Num_MBMS_TOTALSigAcc();
if (Signal1 == 0x1 && openLED_flag) if (Signal1 == 0x1 && openLED_flag)
{ {
LED_STATE = 1; LED_STATE = 1;
...@@ -370,8 +370,8 @@ static void LED_Key_Access_Execution(Tellib_uint16_t led_status) ...@@ -370,8 +370,8 @@ static void LED_Key_Access_Execution(Tellib_uint16_t led_status)
static Tellib_uint16_t LED_Battery_Charging_Judgement(void) static Tellib_uint16_t LED_Battery_Charging_Judgement(void)
{ {
Tellib_uint16_t LED_STATE = 0u; Tellib_uint16_t LED_STATE = 0u;
Tellib_uint8_t Signal1 = Get_CAN_CH0_ID_18202922_Sig_MBMS_TOTALSigAcc(); Tellib_uint8_t Signal1 = Get_CAN_Num_MBMS_TOTALSigAcc();
Tellib_uint8_t Signal2 = Get_CAN_CH0_ID_18202922_Sig_MBMS_TOTALSigCharge(); Tellib_uint8_t Signal2 = Get_CAN_Num_MBMS_TOTALSigCharge();
Tellib_uint8_t Signal3 = Get_CAN_Power_State(); Tellib_uint8_t Signal3 = Get_CAN_Power_State();
if(ADC_Read_Signal(ADC_CH_KL30_VOLTAGE) >= 9000 && ADC_Read_Signal(ADC_CH_KL30_VOLTAGE) <= 16000 && (Get_CAN_Power_State() != PKEY_ON && Get_CAN_Power_State() != KEY_OFF && Charge_OFF_Flag != 2)) if(ADC_Read_Signal(ADC_CH_KL30_VOLTAGE) >= 9000 && ADC_Read_Signal(ADC_CH_KL30_VOLTAGE) <= 16000 && (Get_CAN_Power_State() != PKEY_ON && Get_CAN_Power_State() != KEY_OFF && Charge_OFF_Flag != 2))
{ {
...@@ -423,8 +423,8 @@ static void LED_Battery_Charging_Execution(Tellib_uint16_t led_status ...@@ -423,8 +423,8 @@ static void LED_Battery_Charging_Execution(Tellib_uint16_t led_status
// static Tellib_uint16_t LED_Battery_Charging_POWEROFF_Judgement(void) // static Tellib_uint16_t LED_Battery_Charging_POWEROFF_Judgement(void)
// { // {
// Tellib_uint16_t LED_STATE = 0u; // Tellib_uint16_t LED_STATE = 0u;
// Tellib_uint8_t Signal1 = Get_CAN_CH0_ID_18202922_Sig_MBMS_TOTALSigAcc(); // Tellib_uint8_t Signal1 = Get_CAN_Num_MBMS_TOTALSigAcc();
// Tellib_uint8_t Signal2 = Get_CAN_CH0_ID_18202922_Sig_MBMS_TOTALSigCharge(); // Tellib_uint8_t Signal2 = Get_CAN_Num_MBMS_TOTALSigCharge();
// Tellib_uint8_t Signal3 = Get_CAN_CH0_ID_125_Sig_MMCU_PowerMode(); // Tellib_uint8_t Signal3 = Get_CAN_CH0_ID_125_Sig_MMCU_PowerMode();
// if(ADC_Read_Signal(ADC_CH_KL30_VOLTAGE) >= 9 && ADC_Read_Signal(ADC_CH_KL30_VOLTAGE) <= 16) // if(ADC_Read_Signal(ADC_CH_KL30_VOLTAGE) >= 9 && ADC_Read_Signal(ADC_CH_KL30_VOLTAGE) <= 16)
// { // {
...@@ -449,7 +449,7 @@ static void LED_Battery_Charging_Execution(Tellib_uint16_t led_status ...@@ -449,7 +449,7 @@ static void LED_Battery_Charging_Execution(Tellib_uint16_t led_status
static Tellib_uint16_t LED_Cutterhead_Switch_Judgement(void) static Tellib_uint16_t LED_Cutterhead_Switch_Judgement(void)
{ {
Tellib_uint16_t LED_STATE = 0u; Tellib_uint16_t LED_STATE = 0u;
Tellib_uint8_t Signal1 = Get_CAN_CH0_ID_157_Sig_BMCU_PTOSwicthState(); Tellib_uint8_t Signal1 = Get_CAN_Num_BMCU_PTOSwicthState();
if (Signal1 == 0x1 && openLED_flag) if (Signal1 == 0x1 && openLED_flag)
{ {
LED_STATE = 1; LED_STATE = 1;
...@@ -476,8 +476,8 @@ static void LED_Cutterhead_Switch_Execution(Tellib_uint16_t led_statu ...@@ -476,8 +476,8 @@ static void LED_Cutterhead_Switch_Execution(Tellib_uint16_t led_statu
static Tellib_uint16_t LED_GEAR_Judgement(void) static Tellib_uint16_t LED_GEAR_Judgement(void)
{ {
Tellib_uint16_t LED_STATE = 0u; Tellib_uint16_t LED_STATE = 0u;
Tellib_uint8_t Signal1 = Get_CAN_CH0_ID_125_Sig_MMCU_TravelSpeedGear(); Tellib_uint8_t Signal1 = Get_CAN_Num_MMCU_TravelSpeedGear();
Tellib_uint8_t Signal2 = Get_CAN_CH0_ID_125_Sig_MMCU_ParkingGearState(); Tellib_uint8_t Signal2 = Get_CAN_Num_MMCU_ParkingGearState();
if(Signal2 != 0x1 && Charge_OFF_Flag == 0) if(Signal2 != 0x1 && Charge_OFF_Flag == 0)
{ {
if (Signal1 == 0x1 || Signal1 == 0x2) if (Signal1 == 0x1 || Signal1 == 0x2)
...@@ -693,8 +693,8 @@ static void LED_Tire_pressure_R_Execution(Tellib_uint16_t led_status) ...@@ -693,8 +693,8 @@ static void LED_Tire_pressure_R_Execution(Tellib_uint16_t led_status)
static Tellib_uint16_t LED_Gears_Judgement(void) static Tellib_uint16_t LED_Gears_Judgement(void)
{ {
Tellib_uint16_t LED_STATE = 0u; Tellib_uint16_t LED_STATE = 0u;
Tellib_uint8_t Signal1 = Get_CAN_CH0_ID_125_Sig_MMCU_TravelSpeedGear(); Tellib_uint8_t Signal1 = Get_CAN_Num_MMCU_TravelSpeedGear();
Tellib_uint8_t Signal2 = Get_CAN_CH0_ID_125_Sig_MMCU_ParkingGearState(); Tellib_uint8_t Signal2 = Get_CAN_Num_MMCU_ParkingGearState();
if(Signal2 != 0x1 && openLED_flag) if(Signal2 != 0x1 && openLED_flag)
{ {
if (Signal1 == 0x1 || Signal1 == 0x2) if (Signal1 == 0x1 || Signal1 == 0x2)
...@@ -728,8 +728,8 @@ static void LED_Gears_Execution(Tellib_uint16_t led_status) ...@@ -728,8 +728,8 @@ static void LED_Gears_Execution(Tellib_uint16_t led_status)
static Tellib_uint16_t LED_Cutterhead_Gear_Judgement(void) static Tellib_uint16_t LED_Cutterhead_Gear_Judgement(void)
{ {
Tellib_uint16_t LED_STATE = 0u; Tellib_uint16_t LED_STATE = 0u;
Tellib_uint8_t Signal1 = Get_CAN_CH0_ID_157_Sig_BMCU_BladeSpeedGear(); Tellib_uint8_t Signal1 = Get_CAN_Num_BMCU_BladeSpeedGear();
Tellib_uint8_t Signal2 = Get_CAN_CH0_ID_157_Sig_BMCU_ErrorGrage(); 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)
...@@ -832,8 +832,8 @@ static void LED_Fault_Codes_Execution(Tellib_uint16_t led_status) ...@@ -832,8 +832,8 @@ static void LED_Fault_Codes_Execution(Tellib_uint16_t led_status)
static Tellib_uint16_t LED_SystIndicator_R_Judgement(void) static Tellib_uint16_t LED_SystIndicator_R_Judgement(void)
{ {
Tellib_uint16_t LED_STATE = 0u; Tellib_uint16_t LED_STATE = 0u;
Tellib_uint8_t Signal1 = Get_CAN_CH0_ID_125_Sig_MMCU_ErrorGrage(); Tellib_uint8_t Signal1 = Get_CAN_Num_MMCU_ErrorGrage();
Tellib_uint8_t Signal2 = Get_CAN_CH0_ID_134_Sig_SMCU_ErrorGrage(); Tellib_uint8_t Signal2 = Get_CAN_Num_SMCU_ErrorGrage();
Tellib_uint8_t Signal3 = System_Indicator_CANFlag; Tellib_uint8_t Signal3 = System_Indicator_CANFlag;
if ((Signal1 == 0x4 || Signal1 == 0x5 ||Signal2 == 0x4 || Signal2 == 0x5 || Signal3 == 1) && openLED_flag) if ((Signal1 == 0x4 || Signal1 == 0x5 ||Signal2 == 0x4 || Signal2 == 0x5 || Signal3 == 1) && openLED_flag)
{ {
...@@ -862,7 +862,7 @@ static void LED_SystIndicator_R_Execution(Tellib_uint16_t led_status) ...@@ -862,7 +862,7 @@ static void LED_SystIndicator_R_Execution(Tellib_uint16_t led_status)
static Tellib_uint16_t LED_P_GEAR_G_Judgement(void) static Tellib_uint16_t LED_P_GEAR_G_Judgement(void)
{ {
Tellib_uint16_t LED_STATE = 0u; Tellib_uint16_t LED_STATE = 0u;
Tellib_uint8_t Signal1 = Get_CAN_CH0_ID_125_Sig_MMCU_ParkingGearState(); Tellib_uint8_t Signal1 = Get_CAN_Num_MMCU_ParkingGearState();
Tellib_uint8_t Signal2 = Get_CAN_Power_State(); Tellib_uint8_t Signal2 = Get_CAN_Power_State();
if ( Signal1 == 0x1 && openLED_flag && checkself_seg_Flag == 0) if ( Signal1 == 0x1 && openLED_flag && checkself_seg_Flag == 0)
{ {
...@@ -931,7 +931,7 @@ static void LED_Fuel_Alarm_W_Execution(Tellib_uint16_t led_status) ...@@ -931,7 +931,7 @@ static void LED_Fuel_Alarm_W_Execution(Tellib_uint16_t led_status)
static Tellib_uint16_t LED_Charging_Connection_R_Judgement(void) static Tellib_uint16_t LED_Charging_Connection_R_Judgement(void)
{ {
Tellib_uint16_t LED_STATE = 0u; Tellib_uint16_t LED_STATE = 0u;
Tellib_uint8_t Signal1 = Get_CAN_CH0_ID_18203220_Sig_MBMS_StatBattChargeState(); 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)) if ((Signal1 == 0x1 || Signal1 == 0x2 ||Signal1 == 0x3) && (Get_CAN_Power_State() != PKEY_ON && Get_CAN_Power_State() != KEY_OFF))
{ {
LED_STATE = 1; LED_STATE = 1;
...@@ -959,7 +959,7 @@ static void LED_Charging_Connection_R_Execution(Tellib_uint16_t led_s ...@@ -959,7 +959,7 @@ static void LED_Charging_Connection_R_Execution(Tellib_uint16_t led_s
static Tellib_uint16_t LED_Power_Battery_Failure_R_Judgement(void) static Tellib_uint16_t LED_Power_Battery_Failure_R_Judgement(void)
{ {
Tellib_uint16_t LED_STATE = 0u; Tellib_uint16_t LED_STATE = 0u;
// Tellib_uint8_t Signal1 = Get_CAN_CH0_ID_18203220_Sig_MBMS_StatBattChargeState(); // Tellib_uint8_t Signal1 = Get_CAN_Num_MBMS_StatBattChargeState();
// if (Signal1 == 0x1 || Signal1 == 0x2 ||Signal1 == 0x3) // if (Signal1 == 0x1 || Signal1 == 0x2 ||Signal1 == 0x3)
// { // {
// LED_STATE = 1; // LED_STATE = 1;
......
...@@ -44,6 +44,7 @@ void Sys_50ms_Tasks(void) ...@@ -44,6 +44,7 @@ void Sys_50ms_Tasks(void)
BU98R10_Update_Request(); BU98R10_Update_Request();
LED_Driver_Scan_Refresh(); LED_Driver_Scan_Refresh();
Telltales_Management(); Telltales_Management();
Set_CAN_ALL_Signal();
Gauge_Service(); Gauge_Service();
} }
......
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