Commit fce23654 authored by 郑萍's avatar 郑萍

🐞 fix:下电充电逻辑整改以及增加逻辑括号修改语法错误

parent 65da23a8
......@@ -92,7 +92,7 @@ uint8_t Get_CAN_Num_MBMS_Soc_1_Grid(void)
{
num++;
}
if(num > 10)
if (num > 10)
{
num = 10;
}
......@@ -107,7 +107,7 @@ uint8_t Get_CAN_Num_SBMS_Soc_2_Grid(void)
{
num++;
}
if(num > 10)
if (num > 10)
{
num = 10;
}
......@@ -198,6 +198,8 @@ void Gauge_Power_SOC_CHAGING_Display(void)
}
else
{
SOC1_Count = 0;
SOC2_Count = 0;
SEG_SET_EleDial_1SOC(1, Current_1_Grid);
SEG_SET_EleDial_2SOC(1, Current_2_Grid);
}
......@@ -302,7 +304,9 @@ void Data_CumulativeWorkHours_EEPROM_Write(void)
CumulativeWorkHours_Writeback = CurrentData;
}
}
else if(CumulativeWorkHours_Writeback != 0)
else
{
if (CumulativeWorkHours_Writeback != 0)
{
if (CurrentData < CumulativeWorkHours_Writeback)
{
......@@ -314,6 +318,7 @@ void Data_CumulativeWorkHours_EEPROM_Write(void)
}
}
}
}
}
void Gauge_Clock_All_Display(void)
......@@ -490,7 +495,7 @@ void Gauge_CAN_setup_Service(void)
if (poweroff_time < 3600)
{
Gauge_Power_SOC_CHAGING_Display();
if (MBMS_TOTALSigAcc == 0x0 && MBMS_TOTALSigCharge == 0x1) // 下电充电)
if ((MBMS_TOTALSigAcc == 0x0) && (MBMS_TOTALSigCharge == 0x1)) // 下电充电)
{
Charge_OFF_Flag = 1;
}
......@@ -504,7 +509,7 @@ void Gauge_CAN_setup_Service(void)
Charge_OFF_Flag = 2;
SEG_SET_EleDial_1SOC(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;
poweroff_time = 0;
......@@ -515,20 +520,17 @@ void Gauge_CAN_setup_Service(void)
case CHRG_PLUGIN:
case CHRGEND:
{
if (MBMS_TOTALSigAcc == 0x0 && MBMS_TOTALSigCharge == 0x1) // 下电充电)
if ((MBMS_TOTALSigAcc == 0x0) && (MBMS_TOTALSigCharge == 0x1)) // 下电充电)
{
Charge_OFF_Flag = 1;
Gauge_Power_SOC_pull_Display();
SOC1_Count = 0;
SOC2_Count = 0;
}
else
else if ((MBMS_TOTALSigAcc == 0x1) && (MBMS_TOTALSigCharge == 0x1))
{
Charge_OFF_Flag = 0;
}
Gauge_Power_SOC_pull_Display();
SOC1_Count = 0;
SOC2_Count = 0;
}
poweroff_time = 0;
}
break;
......
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