Преглед изворни кода

修复BDH自检时间戳问题

zhunk пре 2 година
родитељ
комит
5136f3d619

+ 1 - 0
Application_CBD/applications/control.c

@@ -2732,6 +2732,7 @@ static void Control_Heat_thread_entry(void *parameter)
                 rt_thread_delay(1000);
                 current_second++;
             }
+            device_status.selfcheck_ws = 0;
         }
         rt_thread_delay(1000);
         #endif

+ 2 - 2
Application_CBD/applications/dtu_uart2.c

@@ -526,7 +526,7 @@ char *makeJson_selfCheck_(uint8_t sta)  //sta==0 应答,sta==1结果
         memset(device_status.qianming,0,sizeof(device_status.qianming));
         memset(device_status.photolink,0,sizeof(device_status.photolink));
     }
-    cJSON_AddItemToObject(pRoot, "ts", cJSON_CreateNumber(tv.tv_sec));
+    cJSON_AddItemToObject(pRoot, "ts", cJSON_CreateNumber(tv.tv_sec-8*3600));
     char * t = cJSON_PrintUnformatted(pRoot);
     if(NULL == t)
     {
@@ -636,7 +636,7 @@ char *makeJson_C01_Warn(uint16_t code,double process)
         LOG_E("cJSON pJsonRoot NULL!!!");
         return NULL;
     }
-    cJSON_AddStringToObject(pJsonRoot, "cmd", "warn");
+    cJSON_AddStringToObject(pJsonRoot, "cmd", "selfcheck");
     cJSON * pubstring = NULL;
     pubstring = cJSON_CreateObject();
     if(NULL==pubstring)

+ 1 - 1
Application_CBD/applications/hmi.c

@@ -1572,7 +1572,7 @@ static void Ctr_Mortor_entry(void* parameter)
         {
             struct timeval tv;
             gettimeofday(&tv, NULL);
-            device_status.photo_stamp = tv.tv_sec;
+            device_status.photo_stamp = tv.tv_sec-8*3600;
             ctr_led(ON);
             //打开补光灯
             if(photo_led_sec==300&&device_status.version_type==48)

+ 1 - 1
Application_CBD/applications/selfcheck.c

@@ -123,7 +123,7 @@ int selfcheck(uint8_t type)
 
     rt_thread_delay(1000);
     /********************************************************/
-    ctr_lamp(ON, 0);        //打开镇流器
+    ctr_lamp(ON, 1);        //打开镇流器
     rt_thread_delay(1000);
     for(int i = 0;i<5;i++)
     {