Browse Source

【V2.3.0.44】 增加BMS升级状态反馈

CHENJIE-PC\QiXiang_CHENJIE 3 years ago
parent
commit
5cb83adce5
5 changed files with 10 additions and 7 deletions
  1. 1 0
      inc/Signal.h
  2. 2 1
      inc/app.h
  3. 2 0
      src/Signal.c
  4. 4 4
      src/TcpTask.c
  5. 1 2
      src/UartTask.c

+ 1 - 0
inc/Signal.h

@@ -57,6 +57,7 @@ extern UINT8 	TcpSendLen;
 extern osMutexId_t Error_Mutex;
 extern INT16  Data_Current ;
 
+extern UINT8 BmsUpdateState;
 #ifdef SOC_TEST
 extern UINT8 SOC1;
 extern UINT8 SOC2;

+ 2 - 1
inc/app.h

@@ -51,7 +51,8 @@ extern "C" {
 #define	BLSWVERSION		0x01020000    //BootLoader版本号V1.2.0.0
 #define	DRVSWVERSION		0x01050000     //驱动层版本号V1.4.0.0  驱动层1.5.0.0,增加了三轴
 //#define	APPSWVERSION		0x01020209     
-#define	APPSWVERSION		0x0203002B
+#define	APPSWVERSION		0x0203002C
+// #define	APPSWVERSION		0x02030000
 //#define	APPSWVERSION		0x0201000E
 //--------------------------------------------------------------------------------
 

+ 2 - 0
src/Signal.c

@@ -86,6 +86,8 @@ UINT16 ErrorNum[5]={0};
 osMutexId_t Error_Mutex = NULL;
 INT16  Data_Current = 0;
 
+UINT8 BmsUpdateState = 0xFF;
+
 #ifdef SOC_TEST
 UINT8 SOC1 = 100;
 UINT8 SOC2 = 100;

+ 4 - 4
src/TcpTask.c

@@ -585,8 +585,8 @@ static void TcpDataInfoAssembleSend()
         UINT8 *SendBuffer = NULL;
         UINT8 BufferLen = 0;
         UINT8 rbuf[100];
-        sprintf((char *)rbuf,"%d,%x,%x,%d,%d,,%d,%d,%d,%d,%d,%d,%d",
-        Data_Current,BattRemainCap,battProtectState,AppDataInfo.RelayControl,chargerConnectState,
+        sprintf((char *)rbuf,"%d,%x,%x,%d,%d,%x,,%d,%d,%d,%d,%d,%d,%d",
+        Data_Current,BattRemainCap,battProtectState,AppDataInfo.RelayControl,chargerConnectState,BmsUpdateState,
         AppDataInfo.rentaltype,AppDataInfo.ExpiryTimeArray[0],AppDataInfo.ExpiryTimeArray[1],AppDataInfo.ExpiryTimeArray[2],AppDataInfo.ExpiryTimeArray[3],AppDataInfo.ExpiryTimeArray[4],AppDataInfo.ExpiryTimeArray[5]);
         BufferLen  = strlen(rbuf);
         SendBuffer = malloc(BufferLen+sizeof(DebugMsgInfo));
@@ -635,11 +635,11 @@ static void TcpDataInfoAssembleSend()
         UINT8 *SendBuffer = NULL;
         UINT16 BufferLen = 0;
         BufferLen = Debug_GetSize();
-        if(BufferLen>200)
+        if(BufferLen>500)
         {
             Debug_Del_Logfile();
             #ifdef DEBUGLOG
-                Debug_printf("Sys:%d\n",AppDataInfo.SysReStart);
+                Debug_printf("Sys:%d,%d\n",AppDataInfo.SysReStart,BufferLen);
             #endif
             BufferLen = Debug_GetSize();
         }

+ 1 - 2
src/UartTask.c

@@ -329,9 +329,8 @@ static void UartTask(void* arg)
 					SP_BMS_Update_Service();
 				}		
 				#elif BMS_MANUFACTURE==2
-					MS_BMS_Update_Service();
+					BmsUpdateState = MS_BMS_Update_Service();
 				#endif
-
 				PROC_UART_STATE_SWITCH(PROCESS_UART_STATE_IDLE);
 				BMS_Fota_update_flag = FALSE;
 				break;