Jelajahi Sumber

【V3.0.250.65】 6060测试

CHENJIE-PC\QiXiang_CHENJIE 2 tahun lalu
induk
melakukan
00db409a78
3 mengubah file dengan 38 tambahan dan 36 penghapusan
  1. 21 21
      inc/AppConfig.h
  2. 3 3
      src/AppTaskTcp.c
  3. 14 12
      src/EmbeddedCoder_src/BCUCal.c

+ 21 - 21
inc/AppConfig.h

@@ -2,26 +2,26 @@
  * @Author       : ChenJie
  * @Date         : 2021-10-14 09:27:15
  * @LastEditors  : ChenJie
- * @LastEditTime : 2021-11-17 16:11:22
+ * @LastEditTime : 2021-12-24 09:50:27
  * @Description  : App Config H file 配置文件,可以针对不同参数进行更改
  * @FilePath     : \PLAT\project\ec616_0h00\apps\qx_app\inc\AppConfig.h
  */
 
 #ifndef APPCONFIG_H
 #define APPCONFIG_H
-#define BMS_MANUFACTURE (2)            //BMS制造商表示1-超力源,2-美顺
-#define BMS_INFO (3)                   //1-1表示超力源4830,1-2表示超力源6060,2-1表示美顺4830,2-2表示美顺6060 2-3表示美顺7250
-#define DATA_MODULE_TYPE (1)           //1表示NB模块,2表示4G cat1
-#define EOLSTATE (0)                   //1表示下线检测跳过,使用默认值,0表示使用下线检测
+#define BMS_MANUFACTURE (2)            // BMS制造商表示1-超力源,2-美顺
+#define BMS_INFO (3)                   // 1-1表示超力源4830,1-2表示超力源6060,2-1表示美顺4830,2-2表示美顺6060 2-3表示美顺7250
+#define DATA_MODULE_TYPE (1)           // 1表示NB模块,2表示4G cat1
+#define EOLSTATE (0)                   // 1表示下线检测跳过,使用默认值,0表示使用下线检测
 #define DEFAULT_SN "RLTEST00000000001" //默认上传的SN编码
-#define APPSWVERSION 0x0300002E        //数据模块软件版本号
+#define APPSWVERSION 0x0300FA41        //数据模块软件版本号
 #define RELAYCONFIG 0                  //继电器配置
 #define TCP_ADD "iotp.fast-fun.cn"     //数据上传的地址
 #define TCP_PORT 8712                  //数据上传的端口
 
-#define NB_OTHER_TEMP_NUM (4)   //NB采集的温度个数
+#define NB_OTHER_TEMP_NUM (4)   // NB采集的温度个数
 #define HWVERSION 0x0102        //硬件主版本,现为V1.2板
-#define BLSWVERSION 0x01020000  //BootLoader版本号V1.2.0.0
+#define BLSWVERSION 0x01020000  // BootLoader版本号V1.2.0.0
 #define DRVSWVERSION 0x01050000 //驱动层版本号V1.4.0.0  驱动层1.5.0.0,增加了三轴
 
 #define APP_CONFIG_FILE_NAME "qxappconfig.nvm"
@@ -49,27 +49,27 @@
 #define TCP_CONCMD_SYM 0x82
 /*----------------end----------------*/
 
-//encrypt methord
+// encrypt methord
 #define TCP_ENCPT_ENABLE 0x00
 #define TCP_ENCPT_DISABLE 0x01
 
-//message type mark 0x02上报数据单元定义区
+// message type mark 0x02上报数据单元定义区
 #define BATTMSG 0x80
 #define GPSMSG 0x82
 #define STATESMSG 0x85
 #define VERSIONMSG 0x86
 #define DEBUGMSG 0x8C
 
-//BMS升级区定义
-#define FLASH_BMS_FOTA_START_ADDR 0x2E6000 //BMS升级文件存储起始地址
-#define FLASH_BMS_FOTA_LEN 0x32000         //BMS升级文件存储长度 = =200k
-#define FLASH_BMS_FOTA_END_ADDR 0x318000   //BMS升级文件存储结束地址
-//declear struct vars   结构体变量定义
+// BMS升级区定义
+#define FLASH_BMS_FOTA_START_ADDR 0x2E6000 // BMS升级文件存储起始地址
+#define FLASH_BMS_FOTA_LEN 0x32000         // BMS升级文件存储长度 = =200k
+#define FLASH_BMS_FOTA_END_ADDR 0x318000   // BMS升级文件存储结束地址
+// declear struct vars   结构体变量定义
 typedef struct _AppConfigDataType //该结构体只允许下线检测写入
 {
     BOOL appDataModify;        //数据更改标志位
     UINT8 battSN[BATT_SN_LEN]; //电池SN号码
-    BOOL isBattLocked;         //0:not locked;	1:locked  //暂时取消没有使用
+    BOOL isBattLocked;         // 0:not locked;	1:locked  //暂时取消没有使用
     UINT8 reserved1;           //
     UINT8 reserved2;           //电池温度个数
     UINT8 reserved3;           //电池电压串数
@@ -77,13 +77,13 @@ typedef struct _AppConfigDataType //该结构体只允许下线检测写入
     UINT8 reserved5;
     UINT32 reserved6;
     UINT32 reserved7;
-    UINT32 reserved8; //APP软件版本
+    UINT32 reserved8; // APP软件版本
     UINT8 EOLState;
 } AppConfigDataType;
 
 typedef struct _AppConfigDataHeader
 {
-    UINT16 fileBodySize; //file body size, not include size of header;
+    UINT16 fileBodySize; // file body size, not include size of header;
     UINT8 checkSum;
 } AppConfigDataHeader;
 
@@ -121,7 +121,7 @@ typedef struct _AppAlgorithmType
     BOOL sohd_flg_chrgEndE;           //充电结束标志位读取量;
     UINT16 sohv_V_chrgStartStatE[28]; //充电开始时刻的单体电压(数组)读取量;
     UINT16 sohd_Q_chrgE;              //充入容量读取量;
-    UINT16 sohv_Q_packCapArrE[10];    //10次整包容量(数组)读取量;
+    UINT16 sohv_Q_packCapArrE[10];    // 10次整包容量(数组)读取量;
     UINT16 sohv_Q_cellCapArrE[28];    //
     BOOL sfmd_flg_mainCirClosFltE;
     BOOL sfmd_flg_heatCirClosFltE;
@@ -133,12 +133,12 @@ typedef struct _AppAlgorithmType
 } AppAlgorithmData;
 typedef struct _AppDataHeader
 {
-    UINT16 fileBodySize; //file body size, not include size of header;
+    UINT16 fileBodySize; // file body size, not include size of header;
     UINT8 checkSum;
 } AppDataHeader;
 typedef struct _BCUDataHeader
 {
-    UINT16 fileBodySize; //file body size, not include size of header;
+    UINT16 fileBodySize; // file body size, not include size of header;
     UINT8 checkSum;
 } BcuDataHeader;
 typedef struct AppSocketConnectionContext_Tag

+ 3 - 3
src/AppTaskTcp.c

@@ -583,10 +583,10 @@ static void TcpDataInfoAssembleSend()
                                 %d,%d,%d,%d,%d,,\
                                 %d,%d,%d,%d",
                     socd_pct_ahSoc, socd_pct_ekfSoc, socd_pct_battSoc, socd_pct_vcuSoc, socd_pct_cellBattSoc, sohv_Q_packCapArrEo[9], cdmv_ohm_deltR[cand_idx_cellNr - 1],
-                    sfmd_I_curr, maxCellVol, minCellVol, sfmd_V_cellUAvrg, sfmv_V_cellU[1],
+                    sfmd_I_curr, maxCellVol, minCellVol, sfmd_V_cellUAvrg, sfmv_V_cellU[0],
                     cand_idx_cellNr, cand_Q_cellCap, cand_V_chrgStartStat, ihd_tm_parkTime, sohd_Q_chrgEo, sohd_flg_chrgEndEo,
-                    pimd_V_ocv, pimd_R_ohm, pimd_R_polar, pimd_F_polar,test_deltU,
-                    sopd_I_chrgCurrMax,sopd_P_chrgPMax,sopd_I_disChrgCurrMax,sopd_P_disChrgPMax);
+                    pimd_V_ocv, pimd_R_ohm, pimd_R_polar, pimd_F_polar, test_deltU,
+                    sopd_I_chrgCurrMax, sopd_P_chrgPMax, sopd_I_disChrgCurrMax, sopd_P_disChrgPMax);
         }
         Debugcounter++;
         if (Debugcounter > 100)

+ 14 - 12
src/EmbeddedCoder_src/BCUCal.c

@@ -6,20 +6,20 @@ const uint16_T blcc_T_close = 125U; /* 均衡暂停温度; */
 const uint16_T blcc_T_open = 100U;  /* 均衡暂停恢复温度; */
 const uint16_T blcc_V_low = 10U;    /* 均衡开启电压阈值 */
 
-const uint16_T cmnc_Q_ratedCp = 500U;                                                                                                      /* 电池容量; */
-uint16_T cmnc_num_cellUNum = 20U;                                                                                                          /* 电压采样点实际个数; */
+const uint16_T cmnc_Q_ratedCp = 600U;                                                                                                      /* 电池容量; */
+uint16_T cmnc_num_cellUNum = 17U;                                                                                                          /* 电压采样点实际个数; */
 uint16_T cmnc_num_modTNum = 4U;                                                                                                            /* 温度采样点实际个数; */
 const uint16_T cmnc_tm_parkTime = 1800U;                                                                                                   /* 静置时间阈值; */
-const uint16_T cmnm_F_polar[13] = {5708U, 10079U, 18901U, 24298U, 25621U, 24240U, 26329U, 29043U, 23753U, 25286U, 25622U, 25968U, 28782U}; /* 电池放电参数的RC数组; */
-const uint16_T cmnm_R_ohm[13] = {2364U, 2284U, 2234U, 2166U, 2128U, 2111U, 2090U, 2077U, 2077U, 2072U, 2085U, 2090U, 2077U};               /* 电池放电参数的Ro数组; */
-const uint16_T cmnm_R_polar[13] = {4955U, 2073U, 1504U, 1197U, 1098U, 1072U, 1141U, 1700U, 1637U, 1626U, 1496U, 1486U, 1436U};             /* 电池放电参数的Rp数组; */
-const uint16_T cmnm_V_ocv[13] = {3327U, 3453U, 3487U, 3563U, 3617U, 3652U, 3700U, 3791U, 3897U, 4006U, 4129U, 4197U, 4276U};               /* 电池放电参数的OCV数组; */
+const uint16_T cmnm_F_polar[13] = {7127U, 5340U, 14745U, 15689U, 15217U, 14614U, 17269U, 13797U, 11516U, 12274U, 11694U, 13977U, 12079U};; /* 电池放电参数的RC数组; */
+const uint16_T cmnm_R_ohm[13] = {2181U, 2043U, 2040U, 1927U, 1850U, 1802U, 1771U, 1743U, 1733U, 1728U, 1748U, 1762U, 1789U};               /* 电池放电参数的Ro数组; */
+const uint16_T cmnm_R_polar[13] = {1837U, 1055U, 1352U, 1453U, 1181U, 1125U, 1205U, 1283U, 1228U, 1187U, 1104U, 1170U, 1049U};           /* 电池放电参数的Rp数组; */
+const uint16_T cmnm_V_ocv[13] = {3234U, 3444U, 3476U, 3553U, 3610U, 3638U, 3674U, 3758U, 3845U, 3942U, 4051U, 4106U, 4175U};                 /* 电池放电参数的OCV数组; */
 const uint16_T cmnm_pct_soc[13] = {0U, 50U, 100U, 200U, 300U, 400U, 500U, 600U, 700U, 800U, 900U, 950U, 1000U};                            /* 电池放电参数的SOC数组; */
 const uint16_T cmnc_V_disChrgLim = 2900U;
 const uint16_T cmnc_V_chrgFul = 4200U; /* 充满电的截至电压; */
 const uint16_T cmnm_R_voloffset[28] = {0, 0, 0, 0, 0,
-                                       0, 770, 0, 0, 0,
-                                       0, 0, 0, 540, 0,
+                                       0, 0, 0, 0, 0,
+                                       0, 0, 0, 0, 0,
                                        0, 0, 0, 0, 0,
                                        0, 0, 0, 0, 0,
                                        0, 0, 0}; /*电压铜牌阻值补偿,单位moh*/
@@ -99,13 +99,15 @@ const int16_T sopc_I_currUp = 500;
 const int16_T sopc_I_currLow = -500;
 
 const uint16_T socc_pct_battSocLow = 0U;                     /* SOC下限值; */
-const uint16_T socc_pct_battSocUp = 930U;                    /* SOC上限值; */
+const uint16_T socc_pct_battSocUp = 1000U;                   /* SOC上限值; */
 const int16_T socm_I_chrgCor[3] = {50, 100, 150};            /* 充电CCV对应的电流数据; */
-const int16_T socm_I_disChrgCor[3] = {-240, -160, -100};     /* 放电CCV对应的电流数据; */
+const int16_T socm_I_disChrgCor[3] = {-300, -100, -60};      /* 放电CCV对应的电流数据; */
 const uint16_T socm_V_chrgCor[3] = {4160U, 4175U, 4188U};    /* 充电CCV对应的电压; */
-const uint16_T socm_V_disChrgCor[3] = {3238U, 3319U, 3369U}; /* 放电CCV对应的电压; */
-const uint16_T socc_pct_chrgCor = 910;                       /* 充电CCV对应的SOC; */
+const uint16_T socm_V_disChrgCor[3] = {3215U, 3265U, 3280U}; /* 放电CCV对应的电压; */
+const uint16_T socc_pct_chrgCor = 980;                       /* 充电CCV对应的SOC; */
 const uint16_T socc_pct_disChrgCor = 50;                     /* 放电CCV对应的SOC; */
+
+
 const uint16_T cmm_T_ChrgCurr[3] = {40, 60, 80};
 const uint16_T cmm_V_ChrgCurr[6] = {3200, 3201, 3900, 3901, 4100, 4101};
 const uint16_T cmm_I_ChrgCurr[18] = {0, 100, 100, 100, 100, 50,