Ver Fonte

版本号:2.0.1.4,里程计算需增加电池状态判断,电池不放电,里程不计算

CHENJIE-PC\QiXiang_CHENJIE há 3 anos atrás
pai
commit
6cae3538e1
3 ficheiros alterados com 4 adições e 3 exclusões
  1. 1 1
      inc/app.h
  2. 2 1
      src/GpsTask.c
  3. 1 1
      src/TcpTask.c

+ 1 - 1
inc/app.h

@@ -45,7 +45,7 @@ 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		0x02000103
+#define	APPSWVERSION		0x02000104
 //#define	APPSWVERSION		0x02010003
 //--------------------------------------------------------------------------------
 

+ 2 - 1
src/GpsTask.c

@@ -32,6 +32,7 @@
 //全局变量区输入
 extern volatile BOOL Sleep_flag; 
 extern AppDataBody AppDataInfo;
+extern UINT8 WorkFlag;
 //全局变量区输出
 UINT8 GpsData[16];
 osMutexId_t GpsMutex = NULL;
@@ -121,7 +122,7 @@ static void GpsTask(void* arg)
                         GpsData[2] = 0xff;
                         GpsData[3] = 0xfe;
                     }
-                    if(speedtemp>=30 && speedtemp<=1500)
+                    if(speedtemp>=30 && speedtemp<=1500 && WorkFlag!=0x00)
                     {
                         AppDataInfo.appDataModify = true;
                         AppDataInfo.AccMileage = speedtemp/36 + AppDataInfo.AccMileage;

+ 1 - 1
src/TcpTask.c

@@ -33,6 +33,7 @@
 #include "Signal.h"
 //全局变量输出区
 UINT32 TcpService = 0;
+UINT8 WorkFlag=0;
 //全局变量输入区
 extern UINT32 Timer_count;
 extern volatile BOOL Sleep_flag;
@@ -251,7 +252,6 @@ static void TcpDataInfoAssembleSend()
     UINT16 year;
     UINT8 month,day,hour,minute,sec;
     UTC8TimeType UTC8TimeTcp;
-    static UINT8 WorkFlag=0;
 	int i = 0;
 	INT8 len = -1;
     WorkState = battWorkState;