Browse Source

【3.0.0.34】
Merge branch 'V3-7250-QTF' into V3-V30XX-6060

# Conflicts:
# inc/AppConfig.h

CHENJIE-PC\QiXiang_CHENJIE 3 years ago
parent
commit
2a955ebbff
8 changed files with 32 additions and 28 deletions
  1. 2 2
      inc/AppConfig.h
  2. 1 1
      src/AppFunc.c
  3. 1 1
      src/AppSignal.c
  4. 6 18
      src/AppTaskControl.c
  5. 1 1
      src/AppTaskMain.c
  6. 1 1
      src/AppTaskUart.c
  7. 16 1
      src/EmbeddedCoder_src/BCU.c
  8. 4 3
      src/EmbeddedCoder_src/SFM.c

+ 2 - 2
inc/AppConfig.h

@@ -2,7 +2,7 @@
  * @Author       : ChenJie
  * @Date         : 2021-10-14 09:27:15
  * @LastEditors  : ChenJie
- * @LastEditTime : 2021-11-05 11:14:31
+ * @LastEditTime : 2021-11-05 14:17:55
  * @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 0x03000021        //数据模块软件版本号
+#define APPSWVERSION 0x03000022        //数据模块软件版本号
 #define RELAYCONFIG 0                  //继电器配置
 #define TCP_ADD "iotp.fast-fun.cn"     //数据上传的地址
 #define TCP_PORT 8712                  //数据上传的端口

+ 1 - 1
src/AppFunc.c

@@ -3,7 +3,7 @@
  * @Date         : 2021-10-14 09:27:15
  * @Version      : V3.0
  * @LastEditors  : ChenJie
- * @LastEditTime : 2021-10-29 18:17:47
+ * @LastEditTime : 2021-11-03 11:59:55
  * @Description  : 应用层函数定义区,UTF-8
  * @FilePath     : \PLAT\project\ec616_0h00\apps\qx_app\src\AppFunc.c
  */

+ 1 - 1
src/AppSignal.c

@@ -3,7 +3,7 @@
  * @Date         : 2021-10-14 09:27:15
  * @Version      : V3.0
  * @LastEditors  : ChenJie
- * @LastEditTime : 2021-10-26 16:07:27
+ * @LastEditTime : 2021-11-04 14:13:04
  * @Description  : Global variable definition c file,此文件存放App使用到的全局变量
  * @FilePath     : \PLAT\project\ec616_0h00\apps\qx_app\src\AppSignal.c
  */

+ 6 - 18
src/AppTaskControl.c

@@ -20,7 +20,6 @@ static void ControlTask(void *arg)
     UINT32 param;
     PROC_CONTROL_STATE_SWITCH(PROCESS_CONTROL_STATE_IDLE);
     UINT32 CurrentTime = 0;
-    UINT8 AdcOrder = 1;
     UINT16 RingTimes = 0;
     while (true)
     {
@@ -78,12 +77,7 @@ static void ControlTask(void *arg)
             }
             if (TimeCounter % 10 == 0)
             {
-                GetAdcValue(AdcOrder);
-                AdcOrder++;
-                if (AdcOrder > 5)
-                {
-                    AdcOrder = 1;
-                }
+                GetAdcValue(1);
             }
             if (gProcess_app != WORK)
             {
@@ -104,12 +98,7 @@ static void ControlTask(void *arg)
             osDelay(100);
             if (TimeCounter % (10 * 600) == 0)
             {
-                GetAdcValue(AdcOrder);
-                AdcOrder++;
-                if (AdcOrder > 5)
-                {
-                    AdcOrder = 1;
-                }
+                GetAdcValue(1);
             }
             if (gProcess_app == WORK)
             {
@@ -146,23 +135,22 @@ void GetAdcValue(UINT8 num)
     case FAST_CHARGE_TEMP:
         NB_ADC_Get(&adcValue, FAST_CHARGE_TEMP);
         fastChargeTemp = LookUpRTtable(adcValue);
-        break;
+		osDelay(200);
     case NORMAL_CHARGE_TEMP:
         NB_ADC_Get(&adcValue, NORMAL_CHARGE_TEMP);
         normalChargeTemp = LookUpRTtable(adcValue);
-        break;
+		osDelay(200);
     case OTHER_TEMP_1:
         NB_ADC_Get(&adcValue, OTHER_TEMP_1);
         heatTemp1 = LookUpRTtable(adcValue);
-        break;
+		osDelay(200);
     case OTHER_TEMP_2:
         NB_ADC_Get(&adcValue, OTHER_TEMP_2);
         heatTemp2 = LookUpRTtable(adcValue);
-        break;
+		osDelay(200);
     case VBAT:
         NB_ADC_Get(&adcValue, VBAT);
         PowerVoltage = adcValue;
-        break;
     default:
         break;
     }

+ 1 - 1
src/AppTaskMain.c

@@ -3,7 +3,7 @@
  * @Date         : 2021-10-14 09:27:15
  * @Version      : V3.0
  * @LastEditors  : ChenJie
- * @LastEditTime : 2021-11-02 10:13:00
+ * @LastEditTime : 2021-11-04 14:14:26
  * @Description  : 主要负责:1.工作模式转换2.定时器定时3.定时保存运行数据4.异常状态重启
  * @FilePath     : \PLAT\project\ec616_0h00\apps\qx_app\src\AppTaskMain.c
  */

+ 1 - 1
src/AppTaskUart.c

@@ -146,10 +146,10 @@ static void UartTask(void *arg)
 #endif
 			if (Uart_Recv_LEN > 5)
 			{
+			    uartBattInfoDecode(UartAnswerData.data);
 				UartErrorFlag = 0;
 				UartRecvFlagCounter = 0;
 				UartRecvFlag = 1;
-				uartBattInfoDecode(UartAnswerData.data);
 				PROC_UART_STATE_SWITCH(PROCESS_UART_STATE_IDLE);
 				break;
 			}

+ 16 - 1
src/EmbeddedCoder_src/BCU.c

@@ -13,7 +13,22 @@ static process_Bcu gProcess_Bcu_Task;
 void BCU(void)
 {
     uint16_T i;
-    osDelay(5000);
+    uint16_T RecvCounter = 0;
+    while (TRUE)
+    {
+        if (UartRecvFlag == 1 || RecvCounter >= 15)
+        {   
+            //osDelay(1000);
+            break;
+        }
+        else
+        {
+            RecvCounter++;
+            osDelay(1000);
+        }
+		//printf("RecvCounter:%d\n ",RecvCounter);
+    }
+	
     PROC_BCU_STATE_SWITCH(PROCESS_STATE_INIT);
     while (TRUE)
     {

+ 4 - 3
src/EmbeddedCoder_src/SFM.c

@@ -1711,13 +1711,14 @@ void SFM(void)
         sfmd_st_fltAct = sfmd_st_fltAct | FltActArr[i];
     }
 
-    for(i=0;i < 20;i++)
+     
+   /*  for(i=0;i < 20;i++)
      {
          printf("%d  ",sfmv_idx_fltCode[i]);
      }
      printf("\n");
-    //printf("sfmd_st_fltAct:%d,sfmd_st_fltLevel:%d\n\n", sfmd_st_fltAct, sfmd_st_fltLevel);
-
+    
+*/
     ///=====================================================================
     //======================================================================