Commit 89ce4066 authored by 郑萍's avatar 郑萍

🐞 fix:51365 【润通草地车】【下电充电显示】根据电源信号发送下电充电显示状态,关闭其他显示

parent a1a8fb8f
...@@ -30,7 +30,7 @@ void Gauge_Cutterhead_Gear_Display(void) ...@@ -30,7 +30,7 @@ void Gauge_Cutterhead_Gear_Display(void)
uint8_t Signal1 = Get_CAN_Num_BMCU_BladeSpeedGear(); uint8_t Signal1 = Get_CAN_Num_BMCU_BladeSpeedGear();
uint8_t Signal2 = Get_CAN_Num_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)&& (System_Indicator_CANFlag != 1)) if ((Common_Get_IG_Sts() == COMMON_POWER_ON) && (Charge_OFF_Flag == 0) && (System_Indicator_CANFlag != 1))
{ {
if ((Signal2 == 0x1) || (Signal2 == 0x2) || (Signal2 == 0x3) || (Signal2 == 0x4)) if ((Signal2 == 0x1) || (Signal2 == 0x2) || (Signal2 == 0x3) || (Signal2 == 0x4))
{ {
...@@ -59,7 +59,7 @@ void Gauge_Gears_Display(void) ...@@ -59,7 +59,7 @@ void Gauge_Gears_Display(void)
uint8_t Signal1 = Get_CAN_Num_MMCU_TravelSpeedGear(); uint8_t Signal1 = Get_CAN_Num_MMCU_TravelSpeedGear();
uint8_t Signal2 = Get_CAN_Num_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) &&(Get_CAN_Power_State() != KEY_OFF) && (System_Indicator_CANFlag != 1)) if ((Common_Get_IG_Sts() == COMMON_POWER_ON) && (Charge_OFF_Flag == 0) && (Get_CAN_Power_State() != KEY_OFF) && (System_Indicator_CANFlag != 1))
{ {
if (Signal2 != 0x1) if (Signal2 != 0x1)
{ {
...@@ -84,19 +84,18 @@ uint8_t Get_CAN_Num_MBMS_Soc_1_Grid(void) ...@@ -84,19 +84,18 @@ uint8_t Get_CAN_Num_MBMS_Soc_1_Grid(void)
uint8_t num = 0; uint8_t num = 0;
uint8_t Current_SOC_1_Num = Get_CAN_Num_MBMS_Soc(); uint8_t Current_SOC_1_Num = Get_CAN_Num_MBMS_Soc();
num = (Current_SOC_1_Num / 10); num = (Current_SOC_1_Num / 10);
if((Current_SOC_1_Num % 10) != 0) if ((Current_SOC_1_Num % 10) != 0)
{ {
num++; num++;
} }
return num; return num;
} }
uint8_t Get_CAN_Num_SBMS_Soc_2_Grid(void) uint8_t Get_CAN_Num_SBMS_Soc_2_Grid(void)
{ {
uint8_t num = 0; uint8_t num = 0;
uint8_t Current_SOC_2_Num = Get_CAN_Num_SBMS_Soc(); uint8_t Current_SOC_2_Num = Get_CAN_Num_SBMS_Soc();
num = (Current_SOC_2_Num / 10); num = (Current_SOC_2_Num / 10);
if((Current_SOC_2_Num % 10) != 0) if ((Current_SOC_2_Num % 10) != 0)
{ {
num++; num++;
} }
...@@ -210,10 +209,10 @@ uint8_t AllSOC_DIS = 0; ...@@ -210,10 +209,10 @@ uint8_t AllSOC_DIS = 0;
void Gauge_EleDial_AllSOC_Display(void) void Gauge_EleDial_AllSOC_Display(void)
{ {
if ((Common_Get_IG_Sts() == COMMON_POWER_ON) && (Get_CAN_Power_State() != KEY_OFF) && (Get_CAN_Power_State() != PKEY_ON)&& (System_Indicator_CANFlag != 1)) if ((Common_Get_IG_Sts() == COMMON_POWER_ON) && (Get_CAN_Power_State() != KEY_OFF) && (Get_CAN_Power_State() != PKEY_ON) && (System_Indicator_CANFlag != 1))
{ {
AllSOC_DIS = Get_CAN_Num_MBMS_StatSoc(); AllSOC_DIS = Get_CAN_Num_MBMS_StatSoc();
if(AllSOC_DIS > 100) if (AllSOC_DIS > 100)
{ {
AllSOC_DIS = 100; AllSOC_DIS = 100;
} }
...@@ -246,7 +245,7 @@ void Gauge_Clock_Display(void) ...@@ -246,7 +245,7 @@ void Gauge_Clock_Display(void)
{ {
Clock_all = Get_CAN_Num_MMCU_SingleWorkingHours(); Clock_all = Get_CAN_Num_MMCU_SingleWorkingHours();
uint8_t Clock_hours = Clock_all / 10; uint8_t Clock_hours = Clock_all / 10;
uint8_t Clock_min = (Clock_all % 10)*6; uint8_t Clock_min = (Clock_all % 10) * 6;
SEG_SET_Clock(Clock_hours, Clock_min, FLASH_SYNC_1Hz, 1, 1); SEG_SET_Clock(Clock_hours, Clock_min, FLASH_SYNC_1Hz, 1, 1);
Clockonetime_flag = 1; Clockonetime_flag = 1;
} }
...@@ -413,6 +412,8 @@ void Gauge_CAN_setup_Service(void) ...@@ -413,6 +412,8 @@ void Gauge_CAN_setup_Service(void)
Gauge_Frame_Display(); Gauge_Frame_Display();
Gauge_Cutterhead_Gear_Display(); Gauge_Cutterhead_Gear_Display();
Gauge_Gears_Display(); Gauge_Gears_Display();
uint8_t MBMS_TOTALSigAcc = Get_CAN_Num_MBMS_TOTALSigAcc();
uint8_t MBMS_TOTALSigCharge = Get_CAN_Num_MBMS_TOTALSigCharge();
switch (state) switch (state)
{ {
case KEY_ACC: case KEY_ACC:
...@@ -437,24 +438,22 @@ void Gauge_CAN_setup_Service(void) ...@@ -437,24 +438,22 @@ void Gauge_CAN_setup_Service(void)
if (poweroff_time < 3600) if (poweroff_time < 3600)
{ {
Gauge_Power_SOC_CHAGING_Display(); Gauge_Power_SOC_CHAGING_Display();
if (poweroff_time == 0) if (MBMS_TOTALSigAcc == 0x0 && MBMS_TOTALSigCharge == 0x1) // 下电充电)
{ {
Charge_OFF_Flag = 0; Charge_OFF_Flag = 1;
} }
else else
{ {
Charge_OFF_Flag = 1; Charge_OFF_Flag = 0;
} }
} }
else else
{ {
Charge_OFF_Flag = 2; Charge_OFF_Flag = 2;
uint8_t MBMS_TOTALSigAcc = Get_CAN_Num_MBMS_TOTALSigAcc();
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);
if (MBMS_TOTALSigAcc == 0x1 && MBMS_TOTALSigCharge == 0x1) // 电充电) if (MBMS_TOTALSigAcc == 0x1 && MBMS_TOTALSigCharge == 0x1) // 电充电)
{ {
Charge_OFF_Flag = 0; Charge_OFF_Flag = 0;
poweroff_time = 0; poweroff_time = 0;
...@@ -463,18 +462,24 @@ void Gauge_CAN_setup_Service(void) ...@@ -463,18 +462,24 @@ void Gauge_CAN_setup_Service(void)
} }
break; break;
case CHRG_PLUGIN: case CHRG_PLUGIN:
case CHRGEND:
{ {
Charge_OFF_Flag = 0; if (MBMS_TOTALSigAcc == 0x0 && MBMS_TOTALSigCharge == 0x1) // 下电充电)
Gauge_Power_SOC_pull_Display(); {
poweroff_time = 0; Charge_OFF_Flag = 2;
SEG_SET_EleDial_AllSOC(0, 0);
SEG_SET_EleDial_1SOC(0, 0);
SEG_SET_EleDial_2SOC(0, 0);
SOC1_Count = 0;
SOC2_Count = 0;
} }
break; else
case CHRGEND:
{ {
poweroff_time = 0;
Charge_OFF_Flag = 0; Charge_OFF_Flag = 0;
Gauge_Power_SOC_pull_Display(); Gauge_Power_SOC_pull_Display();
} }
poweroff_time = 0;
}
break; break;
default: default:
......
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