Sfoglia il codice sorgente

加热时可进行PIM和CDM计算

LAPTOP-EG88H5BE\86151 2 anni fa
parent
commit
9ba1296c94

+ 1 - 0
inc/EmbeddedCoder_inc/BCUDisp.h

@@ -67,6 +67,7 @@ extern uint8_T   ihd_st_heatForceControl;
 extern uint8_T   ihd_st_EOLState;
 extern boolean_T ihd_flg_urtRecFlg;
 extern uint8_T   ihd_st_reSet;
+extern uint8_T ihd_st_heatStat;
 
 extern int16_T   sfmd_I_curr;                              /*处理后整包电流 */
 extern uint16_T  sfmd_T_modTMax;                          /*处理后模组温度最小 */

+ 1 - 0
src/EmbeddedCoder_src/BCU.c

@@ -131,6 +131,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();

+ 1 - 0
src/EmbeddedCoder_src/BCUDisp.c

@@ -66,6 +66,7 @@ uint8_T   ihd_st_heatForceControl;
 uint8_T   ihd_st_EOLState;
 boolean_T ihd_flg_urtRecFlg;
 uint8_T   ihd_st_reSet;
+uint8_T ihd_st_heatStat;
 
 int16_T   sfmd_I_curr;                              /*处理后整包电流 */
 uint16_T  sfmd_T_modTMax;                          /*处理后模组温度最小 */

+ 1 - 1
src/EmbeddedCoder_src/CDM.c

@@ -65,7 +65,7 @@ void CDM(void)
 	
 
     //放电使能----------------------------------------
-    if (ihd_st_workStat == 1) 
+    if (ihd_st_workStat == 1 && ihd_st_heatStat == 0) 
     { 
         for (i = 1; i < 2; i++)
         {

+ 2 - 2
src/EmbeddedCoder_src/PIM.c

@@ -71,7 +71,7 @@ void PIM(void)
 		pimn_st_workStat_Delay = 0;
     }
     //放电使能
-    if(pimn_st_workStat_Delay == 1)
+    if(pimn_st_workStat_Delay == 1 && ihd_st_heatStat == 0)
     {
         pimn_num_cnt = pimn_num_cnt + 1;
         //新增-------------------
@@ -185,7 +185,7 @@ void PIM(void)
         pimd_R_ohm   = 0;
         pimd_R_polar = 0;
         pimd_F_polar = 0;
-		pimn_flg_inval = 0;
+		pimn_flg_inval = 1;
 	}
 
 	//全部单体参数---------------------