Forráskód Böngészése

Merge remote-tracking branch 'QX/V3-7250-QTF' into V3-V31XX-7250

# Conflicts:
#	src/AppTaskTcp.c
CHENJIE-PC\QiXiang_CHENJIE 2 éve
szülő
commit
91aa5ac630

+ 1 - 0
inc/EmbeddedCoder_inc/BCUDisp.h

@@ -177,6 +177,7 @@ extern uint16_T  pimv_R_cellOhm[cmnc_num_cellUNumMax];
 extern uint16_T  pimd_pct_battSoc;
 extern uint16_T  pimv_pct_cellSoc[cmnc_num_cellUNumMax];
 extern boolean_T pimv_flg_inval[cmnc_num_cellUNumMax];
+extern boolean_T  pimd_flg_inval; 
 
 extern uint16_T test_cellCap[cmnc_num_cellUNumMax];
 extern real_T test_U1;

+ 4 - 4
src/AppTaskTcp.c

@@ -579,14 +579,14 @@ static void TcpDataInfoAssembleSend()
         static UINT8 Debugcounter = 0;
         sprintf((char *)rbuf, "B-%d,%d,%d,%d,%d,,\
                                 %d,%d,%d,%d,%d,%d,,\
-                                %d,%d,%d,%d,%d,%d,,\
-                                %d,%d,%d,%d,,\
+                                %d,%d,%d,%d,%d,%d,%d,,\
+                                %d,%d,%d,%d,%d,,\
                                 %d,%d,%d,%d,%d,%d,%d,,\
                                 %d,%d,%d,,",
                 socd_pct_ahSoc, socd_pct_ekfSoc, socd_pct_battSoc, socd_pct_bcuSoc, pimd_pct_battSoc,
                 sfmd_I_curr, sfmd_V_cellUMax, sfmd_V_cellUMin, sfmv_V_cellU[0], sfmv_V_cellU[1], sfmv_V_cellU[2],
-                cand_idx_cellNr, cand_Q_cellCap, ihd_tm_parkTime, sohd_Q_chrgEo, iscv_Q_remainCpEi[cand_idx_cellNr - 1], iscd_tm_totalEi,
-                pimd_V_ocv, pimd_R_ohm, pimd_R_polar, pimd_F_polar,
+                cand_idx_cellNr, appv_V_cellU[cand_idx_cellNr - 1], cand_Q_cellCap, ihd_tm_parkTime, sohd_Q_chrgEo, iscv_Q_remainCpEi[cand_idx_cellNr - 1], iscd_tm_totalEi,
+                pimd_V_ocv, pimd_R_ohm, pimd_R_polar, pimd_F_polar, pimd_flg_inval,
                 pimv_V_cellOcv[0], pimv_V_cellOcv[1], pimv_V_cellOcv[2], pimv_R_cellOhm[0], pimv_R_cellOhm[1], pimv_R_cellOhm[2], pimv_R_cellOhm[sfmd_idx_cellUMin],
                 iscd_flg_flt[0], iscd_flg_flt[1], iscd_flg_flt[2]);
         if (Debugcounter % 5 == 0)

+ 5 - 8
src/EmbeddedCoder_src/BCU.c

@@ -39,6 +39,7 @@ void BCU(void)
             BCU_Init();
             cmnc_num_cellUNum = AppDataInfo.BattCellCount; /* 电压采样点实际个数; */
             cmnc_num_modTNum = AppDataInfo.BattTempCount;  /* 温度采样点实际个数; */
+			ihd_st_EOLState = AppNVMData.EOLState;
             memcpy(blcv_Q_totalCpEi, BcuDataInfo.blcv_Q_totalCpE, sizeof(blcv_Q_totalCpEi));
             memcpy(blcv_Q_reqCpEi, BcuDataInfo.blcv_Q_reqCpE, sizeof(blcv_Q_reqCpEi));
             socd_pct_bcuSocEi = BcuDataInfo.socd_pct_bcuSocE;
@@ -58,7 +59,8 @@ void BCU(void)
             sfmd_flg_heatRunFltEi = BcuDataInfo.sfmd_flg_heatRunFltE;
             sfmd_flg_iscFltEi = BcuDataInfo.sfmd_flg_iscFltE;
             ihd_tm_parkTime = BcuDataInfo.ihd_tm_parkTimeE;
-            ihd_st_EOLState = AppNVMData.EOLState;
+			BcuDataInfo.ihd_tm_parkTimeE = 0;
+            BcuDataInfo.appDataModify = TRUE;
             appd_st_preCyc = 1;
             PROC_BCU_STATE_SWITCH(PROCESS_STATE_WORK);
             break;
@@ -130,9 +132,7 @@ void BCU(void)
                     ihd_st_chrgMosControl = ChargeForbiddenControl == 0;
                     ihd_st_disChrgMosControl = DisChargeForbiddenControl == 0;
                     ihd_st_relayControl = RelayForbiddenControl == 0;
-
                     ihd_st_heatStat = battHeatEnableState;
-                    // ihd_flg_DTCClear = 1;   //////clear
 
                     //调用算法
                     SFM();
@@ -148,18 +148,15 @@ void BCU(void)
                     }
 
                     //
-                    if (BattWorkStateDelay == 0 && battI == 10000)
+                    if (BattWorkStateDelay == 0)
                     {
                         memcpy(appv_V_cellU, sfmv_V_cellU, sizeof(sfmv_V_cellU));
                     }
 
-                    if (ihd_tm_parkTime < cmnc_tm_parkTime || battI != 10000)
+                    if (ihd_tm_parkTime < cmnc_tm_parkTime || BattWorkStateDelay != 0)
                     {
                         appd_st_preCyc = 0;
                     }
-
-                    BcuDataInfo.ihd_tm_parkTimeE = 0;
-                    BcuDataInfo.appDataModify = TRUE;
                 }
                 osDelay(100);
             }

+ 2 - 0
src/EmbeddedCoder_src/BCUDisp.c

@@ -175,6 +175,8 @@ uint16_T   pimv_R_cellOhm[cmnc_num_cellUNumMax];
 uint16_T   pimd_pct_battSoc;
 uint16_T   pimv_pct_cellSoc[cmnc_num_cellUNumMax];
 boolean_T  pimv_flg_inval[cmnc_num_cellUNumMax];
+boolean_T  pimd_flg_inval; 
+	
 
 uint16_T test_cellCap[cmnc_num_cellUNumMax];
 real_T test_U1;

+ 3 - 4
src/EmbeddedCoder_src/ISC.c

@@ -104,17 +104,16 @@ void ISC(void)
 		
     }
    
-	
-    
+
     //=====================================================================
     //================放电过程中诊断=================================== 2A
     //=====================================================================
-    if(!socd_flg_cellSocDisable)
+    if(!pimd_flg_inval)
     {
         TimeCtn = TimeCtn + 1;
         for (i = 0; i < cmnc_num_cellUNum;i++)
         {
-            iscn_Q_cellAh[i] = (uint16_T)((uint32_T)(socv_pct_cellSoc[i] * sohv_Q_cellCap[i])/1000);
+            iscn_Q_cellAh[i] = (uint16_T)((uint32_T)(pimv_pct_cellSoc[i] * sohv_Q_cellCap[i])/1000);
         }
         if (TimeCtn == 60)
         {

+ 19 - 7
src/EmbeddedCoder_src/PIM.c

@@ -197,22 +197,34 @@ void PIM(void)
     //全部单体参数---------------------
     for(i = 0;i < cmnc_num_cellUNum;i++)
     {
+        pimv_V_cellOcv[i]   = pimd_V_ocv + cdmv_V_deltOCV[i];
+        pimv_R_cellOhm[i]   = pimd_R_ohm + cdmv_R_deltOhm[i];
+        pimv_pct_cellSoc[i] = look1_u16tu16(pimv_V_cellOcv[i], cmnm_V_ocv, cmnm_pct_soc, 13);
         if((!pimn_flg_inval && !cdmv_flg_inval[i]))
-        {
-            pimv_flg_inval[i]   = 0;
-            pimv_V_cellOcv[i]   = pimd_V_ocv + cdmv_V_deltOCV[i];
-            pimv_R_cellOhm[i]   = pimd_R_ohm + cdmv_R_deltOhm[i];
-            pimv_pct_cellSoc[i] = look1_u16tu16(pimv_V_cellOcv[i], cmnm_V_ocv, cmnm_pct_soc, 13);
+        {   
 			if (pimv_V_cellOcv[i] > 4400 || pimv_V_cellOcv[i] < 1000 || pimv_R_cellOhm[i] < 1000 || pimv_R_cellOhm[i] > 10000)
 			{ 
-			    pimv_flg_inval[i]   = 1;
+				pimd_flg_inval = 1;
+			}
+			else
+			{
+			    pimv_flg_inval[i]  = 0;
 			}
         }
         else
         {
-            pimv_flg_inval[i]   = 1;
+            pimv_flg_inval[i] = 1;
         }
     }
+	pimd_flg_inval = 0;
+	for(i = 0;i < cmnc_num_cellUNum;i++)
+	{
+       if(pimv_flg_inval[i] == 1)
+       {
+           pimd_flg_inval = 1;
+		   break;
+       }
+	}
     // 整包SOC
     socMin = 1000;
     socMax = 0;

+ 1 - 1
src/EmbeddedCoder_src/SOC.c

@@ -447,7 +447,7 @@ void SOC(void)
         overFlg = false;
         fulFlg = false;
         fulCntl = 0;
-		if (!pimv_flg_inval[sfmd_idx_cellUMin] && 0)
+		if (!pimv_flg_inval[sfmd_idx_cellUMin])
 		{
 		    socn_V_disChrgCCV = look1_i16tu16(sfmd_I_curr,socm_I_disChrgCor,socm_V_disChrgCor,3) + (uint16_T)(sfmd_I_curr * (pimv_R_cellOhm[sfmd_idx_cellUMin]) * 0.001 * 0.1);
 		}