Parcourir la source

服务器ota测试成功版本

CHENJIE-PC\QiXiang_CHENJIE il y a 4 ans
Parent
commit
f564e0009b
4 fichiers modifiés avec 11 ajouts et 11 suppressions
  1. 4 4
      inc/TcpTask.h
  2. 1 1
      inc/app.h
  3. 5 5
      src/Fota.c
  4. 1 1
      src/MainTask.c

+ 4 - 4
inc/TcpTask.h

@@ -23,10 +23,10 @@ extern UINT32 TcpService;
 // #define QX_TCP_IPADRRES				"47.97.127.222"
 // #define QX_TCP_PORT					8712
 /*---------------测试IP地址-----------------------------------*/
-// #define QX_TCP_IPADRRES				"39.103.177.126"
-// #define QX_TCP_PORT					8712
-#define QX_TCP_IPADRRES				"120.26.68.165"
-#define QX_TCP_PORT					14319
+#define QX_TCP_IPADRRES				"39.103.177.126"
+#define QX_TCP_PORT					8712
+// #define QX_TCP_IPADRRES				"120.26.68.165"
+// #define QX_TCP_PORT					14319
 /*---------------测试IP地址END-----------------------------------*/
 #define BATT_SN_LEN             17
 #define TCP_START_SYM1			0x23

+ 1 - 1
inc/app.h

@@ -34,7 +34,7 @@ extern "C" {
 #define HWVERSION		    0x0102    //硬件主版本,现为V1.2板
 #define	BLSWVERSION		0x01020000    //BootLoader版本号V1.2.0.0
 #define	DRVSWVERSION		0x01030000     //驱动层版本号V1.3.0.0
-#define	APPSWVERSION		0x01020101       
+#define	APPSWVERSION		0x01020101      
 #define APP_CONFIG_FILE_LATEST_VERSION 0
 #define APP_CONFIG_FILE_NAME  "qxappconfig.nvm"
 //--------------------------------------------------------------------------------

+ 5 - 5
src/Fota.c

@@ -20,7 +20,7 @@ static UINT8 Fota_crc_chk(UINT8* data,UINT8 length);
 volatile bool Fota_update_flag = FALSE; //可以升级标志
 void Fota_Func(UINT8 *DataPtr,INT32 connectId)
 {
-    UINT8 Fota_Answer[42];
+    UINT8 Fota_Answer[43];
     UINT8 Fota_Cmd;
     INT8 ret;
     Fota_S.Fota_Flash_Addres = FLASH_FOTA_REGION_START;
@@ -42,7 +42,7 @@ void Fota_Func(UINT8 *DataPtr,INT32 connectId)
                 Fota_Answer[22] = 0x00;
                 Fota_Answer[23] = 0x12;
                 memcpy(&Fota_Answer[24],(DataPtr+24),18);
-                Fota_Answer[42] =  bcc_chk_fota(Fota_Answer,41);
+                Fota_Answer[42] =  bcc_chk_fota(Fota_Answer,42);
                 tcpipConnectionSend(connectId,Fota_Answer,43,0,0,0);
                 BSP_QSPI_Erase_Safe(FLASH_FOTA_REGION_START,Fota_S.Fota_All_Data_Len + 4 - (Fota_S.Fota_All_Data_Len%4)); //512k-32k = 480k -> 0x75300  0x78000
                 break;
@@ -115,7 +115,7 @@ void Fota_Func(UINT8 *DataPtr,INT32 connectId)
                 Fota_Answer[22] = 0x00;
                 Fota_Answer[23] = 0x12;
                 memcpy(&Fota_Answer[24],(DataPtr+24),18);
-                Fota_Answer[42] =  bcc_chk_fota(Fota_Answer,41);
+                Fota_Answer[42] =  bcc_chk_fota(Fota_Answer,42);
                 tcpipConnectionSend(connectId,Fota_Answer,43,0,0,0);
                 break;
             }
@@ -127,9 +127,9 @@ void Fota_Func(UINT8 *DataPtr,INT32 connectId)
                 memcpy(&Fota_Answer[4],(DataPtr+4),BATT_SN_LEN);
                 Fota_Answer[21] = TCP_ENCPT_DISABLE;
                 Fota_Answer[22] = 0x00;
-                Fota_Answer[23] = 0x12;
+                Fota_Answer[23] = 0x13;
                 memcpy(&Fota_Answer[24],(DataPtr+24),18);
-                Fota_Answer[42] =  bcc_chk_fota(Fota_Answer,41);
+                Fota_Answer[42] =  bcc_chk_fota(Fota_Answer,42);
                 tcpipConnectionSend(connectId,Fota_Answer,43,0,0,0);
                 if(Fota_S.Fota_All_Data_Len==Fota_S.Fota_Current_Addres)
                 {

+ 1 - 1
src/MainTask.c

@@ -555,7 +555,7 @@ static void setDefaultAppDataValue(void)
 	}
 	AppNVMData.isBattLocked = false;
 	AppNVMData.chargEndWorkTime = 30;  //30 min
-	AppNVMData.wakeupWorkTime = 5;	//2min
+	AppNVMData.wakeupWorkTime = 15;	//2min
 	AppNVMData.sleepTime = 5;			//5min
     AppNVMData.HwVersion = HWVERSION;
     AppNVMData.BLSwVersion = BLSWVERSION;