소스 검색

【V3.1.241.65】 增加了租期上传,BCU也进行了修改

CHENJIE-PC\QiXiang_CHENJIE 2 년 전
부모
커밋
f20d8b39a2
4개의 변경된 파일18개의 추가작업 그리고 10개의 파일을 삭제
  1. 2 2
      inc/AppConfig.h
  2. 3 2
      inc/AppSignal.h
  3. 3 3
      src/AppSignal.c
  4. 10 3
      src/AppTaskTcp.c

+ 2 - 2
inc/AppConfig.h

@@ -2,7 +2,7 @@
  * @Author       : ChenJie
  * @Date         : 2021-10-14 09:27:15
  * @LastEditors  : ChenJie
- * @LastEditTime : 2022-01-07 14:35:52
+ * @LastEditTime : 2022-01-10 12:04:52
  * @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 0x0301F241 //数据模块软件版本号
+#define APPSWVERSION 0x0301F141 //数据模块软件版本号
 
 #define RELAYCONFIG 1              //继电器配置
 #define TCP_ADD "iotp.fast-fun.cn" //数据上传的地址

+ 3 - 2
inc/AppSignal.h

@@ -3,7 +3,7 @@
  * @Date         : 2021-12-28 19:25:29
  * @Version      : V3.0
  * @LastEditors  : ChenJie
- * @LastEditTime : 2022-01-07 14:47:12
+ * @LastEditTime : 2022-01-10 12:05:47
  * @Description  : file content
  * @FilePath     : \PLAT\project\ec616_0h00\apps\qx_app\inc\AppSignal.h
  */
@@ -26,8 +26,9 @@
 // declear the bool vars
 extern volatile BOOL NB_Fota_update_flag;
 extern volatile BOOL BMS_Fota_update_flag;
+extern volatile BOOL Rentalupdate;
 extern UINT32 ErrFlg;
-extern BOOL Rentalupdate;
+
 extern BOOL downloadReady;
 
 // extern declear the UINT8 vars

+ 3 - 3
src/AppSignal.c

@@ -3,7 +3,7 @@
  * @Date         : 2021-10-14 09:27:15
  * @Version      : V3.0
  * @LastEditors  : ChenJie
- * @LastEditTime : 2022-01-07 14:46:52
+ * @LastEditTime : 2022-01-10 12:02:22
  * @Description  : Global variable definition c file,此文件存放App使用到的全局变量
  * @FilePath     : \PLAT\project\ec616_0h00\apps\qx_app\src\AppSignal.c
  */
@@ -13,10 +13,10 @@
 volatile BOOL NB_Fota_update_flag = FALSE;
 volatile BOOL BMS_Fota_update_flag = FALSE;
 volatile BOOL CanInterruptFlag = FALSE;
-
+volatile BOOL Rentalupdate = FALSE;
 UINT32 ErrFlg = FALSE;
 BOOL downloadReady = FALSE;
-BOOL Rentalupdate = FALSE;
+
 /**declear the uint8 vars**/
 UINT8 AvgBattTemp = 0;
 UINT8 battCellTemp[8] = {0};            // Battery temperature 电池温度数值

+ 10 - 3
src/AppTaskTcp.c

@@ -691,9 +691,16 @@ static void TcpDataInfoAssembleSend()
         OtherMsgToTcpInfo.OtherInfo.RentalStartTime[5] = AppDataInfo.RentalStartTime[5];
         INT16 RetalDays = 0;
         INT16 ExpiryDays = 0;
-        RetalDays = day_diff(AppDataInfo.RentalStartTime, AppDataInfo.ExpiryTimeArray);
-        ExpiryDays = day_diff(AppDataInfo.ExpiryTimeArray, OtherMsgToTcpInfo.OtherInfo.msgCollectionTimeBTC);
-        printf("%d,%d\n", RetalDays, ExpiryDays);
+        if (AppDataInfo.RentalType == 2)
+        {
+            RetalDays = day_diff(AppDataInfo.RentalStartTime, AppDataInfo.ExpiryTimeArray);
+            ExpiryDays = day_diff(AppDataInfo.ExpiryTimeArray, OtherMsgToTcpInfo.OtherInfo.msgCollectionTimeBTC);
+        }
+        else
+        {
+            RetalDays = 0;
+            ExpiryDays = 0;
+        }
         OtherMsgToTcpInfo.OtherInfo.RentalDays[0] = RetalDays >> 8;
         OtherMsgToTcpInfo.OtherInfo.RentalDays[1] = RetalDays;
         OtherMsgToTcpInfo.OtherInfo.ExpiryDays[0] = ExpiryDays >> 8;