Browse Source

【V3.1.245.65】 屏蔽内短路加热禁止,转入放电模式增加电流判定

CHENJIE-PC\QiXiang_CHENJIE 2 years ago
parent
commit
3c9e3cd3fb
3 changed files with 16 additions and 19 deletions
  1. 2 2
      inc/AppConfig.h
  2. 10 13
      src/AppFunc.c
  3. 4 4
      src/AppTaskTcp.c

+ 2 - 2
inc/AppConfig.h

@@ -2,7 +2,7 @@
  * @Author       : ChenJie
  * @Date         : 2021-10-14 09:27:15
  * @LastEditors  : ChenJie
- * @LastEditTime : 2021-12-29 17:51:58
+ * @LastEditTime : 2021-12-30 15:42:06
  * @Description  : App Config H file 配置文件,可以针对不同参数进行更改
  * @FilePath     : \PLAT\project\ec616_0h00\apps\qx_app\inc\AppConfig.h
  */
@@ -16,7 +16,7 @@
 #define DEFAULT_SN "RLTEST00000000001" //默认上传的SN编码
 
 #define APPSWRELEASE 0          //软件测试版本标志位,0-测试,1-发布
-#define APPSWVERSION 0x0301F641 //数据模块软件版本号
+#define APPSWVERSION 0x0301F541 //数据模块软件版本号
 
 #define RELAYCONFIG 1              //继电器配置
 #define TCP_ADD "iotp.fast-fun.cn" //数据上传的地址

+ 10 - 13
src/AppFunc.c

@@ -3,7 +3,7 @@
  * @Date         : 2021-11-09 12:08:17
  * @Version      : V3.0
  * @LastEditors  : ChenJie
- * @LastEditTime : 2021-12-17 17:15:33
+ * @LastEditTime : 2021-12-30 15:50:04
  * @Description  : file content
  * @FilePath     : \PLAT\project\ec616_0h00\apps\qx_app\src\AppFunc.c
  */
@@ -368,7 +368,7 @@ void BattWorkDelayFunc(UINT8 battWorkCurrentState)
 	if (battWorkCurrentState == BATT_IDLE_SYM && BattWorkStateDelay == BATT_DISCHARGE_SYM) //从放电转静置 60s延时
 	{
 		workDelayCounter++;
-		if (workDelayCounter >= 60) //
+		if (workDelayCounter >= 60)
 		{
 			workDelayCounter = 0;
 			BattWorkStateDelay = battWorkCurrentState;
@@ -383,10 +383,10 @@ void BattWorkDelayFunc(UINT8 battWorkCurrentState)
 			BattWorkStateDelay = battWorkCurrentState;
 		}
 	}
-	else if (battWorkCurrentState == BATT_DISCHARGE_SYM && BattWorkStateDelay != BATT_DISCHARGE_SYM) //从 充电或者静置 转放电 1s延时
+	else if (battWorkCurrentState == BATT_DISCHARGE_SYM && (battI > 10010) && BattWorkStateDelay != BATT_DISCHARGE_SYM) //从 充电或者静置 转放电 2s延时
 	{
 		workDelayCounter++;
-		if (workDelayCounter >= 1)
+		if (workDelayCounter >= 2)
 		{
 			workDelayCounter = 0;
 			BattWorkStateDelay = battWorkCurrentState;
@@ -885,19 +885,16 @@ BOOL uartBattInfoDecode(UINT8 *dataPtr)
 	battWorkState = (dataPtr[(0x03 + BATT_CELL_VOL_NUM) * 2 + 1]) & 0x03; //电池状态(原始数据),0表示静置,1表示放电,2表示充电
 	TEMP_NUM = BATT_TEMP_NUM + BMS_OTHER_TEMP;
 
-	
-	
 	for (i = 0; i < BATT_TEMP_NUM; i++)
-	{   
-	    if(First_Run)
-	    {
-		   battCellTemp[i] = dataPtr[(0x06 + BATT_CELL_VOL_NUM + i) * 2 + 1];
-	    }
-		battCellTemp[i] = DataFilt8(dataPtr[(0x06 + BATT_CELL_VOL_NUM + i) * 2 + 1],&battCellTemp[i],5);
+	{
+		if (First_Run)
+		{
+			battCellTemp[i] = dataPtr[(0x06 + BATT_CELL_VOL_NUM + i) * 2 + 1];
+		}
+		battCellTemp[i] = DataFilt8(dataPtr[(0x06 + BATT_CELL_VOL_NUM + i) * 2 + 1], &battCellTemp[i], 5);
 	}
 	First_Run = FALSE;
 
-	
 	MOSTemp = dataPtr[(0x06 + BATT_CELL_VOL_NUM + BATT_TEMP_NUM) * 2 + 1];
 	packTemp = dataPtr[(0x06 + BATT_CELL_VOL_NUM + BATT_TEMP_NUM + 1) * 2 + 1];
 	chargerConnectState = (dataPtr[(0x03 + BATT_CELL_VOL_NUM) * 2 + 1] >> 2) & 0x01; //充电器连接状态,0表示未连接,1表示已连接

+ 4 - 4
src/AppTaskTcp.c

@@ -584,14 +584,14 @@ static void TcpDataInfoAssembleSend()
                                 %d,%d,%d,%d,,\
                                 %d,%d,%d,%d,%d,%d,,\
                                 %d,%d,%d,,\
-                                %f,%f,%f,%f",
+                                %.3f,%.3f,%.3f,%.3f",
                 socd_pct_ahSoc, socd_pct_ekfSoc, socd_pct_battSoc, socd_pct_vcuSoc,
                 sfmd_I_curr, maxCellVol, minCellVol, 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,
+                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,
                 pimv_V_cellOcv[0], pimv_V_cellOcv[1], pimv_V_cellOcv[2], pimv_R_cellOhm[0], pimv_R_cellOhm[1], pimv_R_cellOhm[2],
-                iscd_flg_flt[0],iscd_flg_flt[1],iscd_flg_flt[2],
-                test_U1,test_U[0],test_U[1],test_U[2]);
+                iscd_flg_flt[0], iscd_flg_flt[1], iscd_flg_flt[2],
+                test_U1, test_U[0], test_U[1], test_U[2]);
         if (Debugcounter % 5 == 0)
         {
             sprintf((char *)rbuf + strlen(rbuf), ",A-%x,%d,%d,%x,%x,,%d,%d,,%x,%d",