Переглянути джерело

【V3.1.0.17】-修改了3.1.0.15的bug,

CHENJIE-PC\QiXiang_CHENJIE 3 роки тому
батько
коміт
5704056b28
7 змінених файлів з 17 додано та 12 видалено
  1. 2 2
      inc/AppConfig.h
  2. 2 2
      inc/AppSignal.h
  3. 2 3
      src/AppFunc.c
  4. 2 1
      src/AppSignal.c
  5. 1 1
      src/AppTaskCan.c
  6. 6 1
      src/AppTaskControl.c
  7. 2 2
      src/hal_module_adapter.c

+ 2 - 2
inc/AppConfig.h

@@ -2,7 +2,7 @@
  * @Author       : ChenJie
  * @Date         : 2021-10-14 09:27:15
  * @LastEditors  : ChenJie
- * @LastEditTime : 2021-10-15 18:02:17
+ * @LastEditTime : 2021-10-18 14:12:44
  * @Description  : App Config H file 配置文件,可以针对不同参数进行更改
  * @FilePath     : \PLAT\project\ec616_0h00\apps\qx_app\inc\AppConfig.h
  */
@@ -14,7 +14,7 @@
 #define DATA_MODULE_TYPE (1)           //1表示NB模块,2表示4G cat1
 #define EOLSTATE (0)                   //1表示下线检测跳过,使用默认值,0表示使用下线检测
 #define DEFAULT_SN "RLTEST00000000001" //默认上传的SN编码
-#define APPSWVERSION 0x0301000F        //数据模块软件版本号
+#define APPSWVERSION 0x03010011        //数据模块软件版本号
 
 #define TCP_ADD "iotp.fast-fun.cn" //数据上传的地址
 #define TCP_PORT 8712              //数据上传的端口

+ 2 - 2
inc/AppSignal.h

@@ -2,7 +2,7 @@
  * @Author       : ChenJie
  * @Date         : 2021-10-14 09:27:15
  * @LastEditors  : ChenJie
- * @LastEditTime : 2021-10-15 10:26:39
+ * @LastEditTime : 2021-10-18 14:38:28
  * @Description  : Global variable definition H file
  * @FilePath     : \PLAT\project\ec616_0h00\apps\qx_app\inc\AppSignal.h
  */
@@ -73,7 +73,7 @@ extern UINT8 UDSService[2];              //uds 服务
 extern UINT8 UDSSubService[2];           // uds 子服务
 extern UINT8 UDSSubServiceActionCode[2]; // uds 子服务状态
 extern UINT8 UDSSwitch;
-extern UINT8 UDSSwitch;
+extern UINT8 UDSDialogMode;
 //declear the UINT16 vars
 extern UINT16 battCellU[28];
 extern UINT16 battI;

+ 2 - 3
src/AppFunc.c

@@ -3,7 +3,7 @@
  * @Date         : 2021-10-14 09:27:15
  * @Version      : V3.0
  * @LastEditors  : ChenJie
- * @LastEditTime : 2021-10-18 10:10:55
+ * @LastEditTime : 2021-10-18 15:43:29
  * @Description  : 应用层函数定义区,UTF-8
  * @FilePath     : \PLAT\project\ec616_0h00\apps\qx_app\src\AppFunc.c
  */
@@ -2084,8 +2084,7 @@ void UDS_Service(CAN_Msg_Type *CanRxMsg)
 	UINT32 flashStartAddr = 0x00;
 
 	static UINT32 updateDifferDataSliceCounter = 0;
-	static UINT8 UDSSwitch = 0;
-	static UINT8 UDSDialogMode = 01;
+	//static UINT8 UDSSwitch = 0;
 	static UINT8 UDSBattSN[BATT_SN_LEN];
 
 	for (i = 0; i < 2; i++)

+ 2 - 1
src/AppSignal.c

@@ -3,7 +3,7 @@
  * @Date         : 2021-10-14 09:27:15
  * @Version      : V3.0
  * @LastEditors  : ChenJie
- * @LastEditTime : 2021-10-15 10:26:16
+ * @LastEditTime : 2021-10-18 14:36:41
  * @Description  : Global variable definition c file,此文件存放App使用到的全局变量
  * @FilePath     : \PLAT\project\ec616_0h00\apps\qx_app\src\AppSignal.c
  */
@@ -69,6 +69,7 @@ UINT8 UDSSubService[2] = {0};           // uds 子服务
 UINT8 UDSSubServiceActionCode[2] = {0}; // uds 子服务状态
 UINT8 UDSSwitch = 0;                    //下线检测标志位
 UINT8 UartInterruptcount = 0;           //串口中断累加值
+UINT8 UDSDialogMode = 01;               //UDS诊断模式
 /**declear the uint16 vars**/
 UINT16 avrgCellVol = 0;                    //平均单体电压
 UINT16 battCellU[28] = {0};                //电池包单体电压

+ 1 - 1
src/AppTaskCan.c

@@ -156,7 +156,7 @@ static void CanTask()
 			{
 				CanMsgTx1000ms();
 			}
-			if (delayconuter >= 100 && msgFlag == 0)
+			if (delayconuter >= 500 && msgFlag == 0)
 			{
 				delayconuter = 0;
 				clrbit(PadInterrupt, 0);

+ 6 - 1
src/AppTaskControl.c

@@ -46,6 +46,7 @@ static void ControlTask(void *arg)
             {
                 LEDDisplay();
                 UINT8 Buzzerperiod = 5; //500ms
+
                 if (AppDataInfo.BattLock == FALSE && getbit(UartCmdRecvFlag, 0) == 1)
                 {
                     relayControlFunc(Buzzerperiod, 0.6);
@@ -66,10 +67,14 @@ static void ControlTask(void *arg)
                         clrbit(UartCmdRecvFlag, 0);
                     }
                 }
-                else if (BuzzerControl == TRUE || getbit(sfmd_st_fltAct, 2) == 1)
+                else if (BuzzerControl == TRUE || getbit(sfmd_st_fltAct, 2) == 1 || UDSSwitch == 1)
                 {
                     relayControlFunc(Buzzerperiod, 0.4);
                 }
+                else if (TimeCounter % 50 == 0)
+                {
+                    relayControl(FALSE);
+                }
                 CurrentTime = TimeCounter;
             }
             if (TimeCounter % 10 == 0)

+ 2 - 2
src/hal_module_adapter.c

@@ -2438,12 +2438,12 @@ void relayControl(BOOL onOrOff)
 	if (onOrOff == TRUE)
 	{
 		GPIO_PinWrite(1, 1 << AON_RELAY_DRV, 1 << AON_RELAY_DRV); //switch on
-		printf("switcht on\n");
+																  //printf("switcht on\n");
 	}
 	else
 	{
 		GPIO_PinWrite(1, 1 << AON_RELAY_DRV, 0 << AON_RELAY_DRV); //switch off
-		printf("switch off\n");
+																  //printf("switch off\n");
 	}
 }