Parcourir la source

新网页整改,传感器数据导出bug

liyi il y a 2 mois
Parent
commit
82885732d3

BIN
cust_data/db/pdu_dat _709.db


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 0
cust_data/web/unique/css/chunk-0a156276.ff2b8726.css


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 0
cust_data/web/unique/css/chunk-1a29a0f2.af4bd294.css


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
cust_data/web/unique/css/chunk-27610fb4.0e217755.css


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 1
cust_data/web/unique/css/chunk-4e99148e.70a5ce88.css


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 1
cust_data/web/unique/css/chunk-4f6a06c8.c512c5fc.css


+ 2 - 1
cust_data/web/unique/i18n/i18n_deguo.js

@@ -548,5 +548,6 @@ const i18n_deguo= {
   "ipsz":"IP-Einstellungen",
   "IPV6mask":"IPv6-Maske",
   "scpcrz":"Löschen Sie den Planungsprotokoll",
-  "wycgq":"Temperatur- und Drucksensor"
+  "wycgq":"Temperatur- und Drucksensor",
+  "ylz":"Hydraulischer Wert"
 }

+ 2 - 1
cust_data/web/unique/i18n/i18n_eguo.js

@@ -549,5 +549,6 @@ const i18n_eguo={
   "ipsz":"Настройки IP",
   "IPV6mask":"IPV6 маска",
   "scpcrz":"Удалить журнал планирования",
-  "wycgq":"Датчик температуры и давления"
+  "wycgq":"Датчик температуры и давления",
+  "ylz":"Гидравлическое значение"
 }

+ 2 - 1
cust_data/web/unique/i18n/i18n_faguo.js

@@ -548,5 +548,6 @@ const i18n_faguo={
   "ipsz":"Configuration IP",
   "IPV6mask":"Masque IPv6",
   "scpcrz":"Supprimer les journaux de planification",
-  "wycgq":"Capteur de température et de pression"
+  "wycgq":"Capteur de température et de pression",
+  "ylz":"Valeur hydraulique"
 }

+ 2 - 1
cust_data/web/unique/i18n/i18n_putaoya.js

@@ -548,6 +548,7 @@ const i18n_putaoya={
   "ipsz":"Configuração de IP",
   "IPV6mask":"IPV6mask",
   "scpcrz":"Excluir registro de agendamento",
-  "wycgq":"Sensor de temperatura e pressão"
+  "wycgq":"Sensor de temperatura e pressão",
+  "ylz":"Valor hidráulico"
 
 }

+ 2 - 1
cust_data/web/unique/i18n/i18n_riben.js

@@ -549,5 +549,6 @@ const i18n_riben={
   "ipsz":"IP設定",
   "IPV6mask":"IPV6マスク",
   "scpcrz":"スケジュールログ削除",
-  "wycgq":"温度圧力センサー"
+  "wycgq":"温度圧力センサー",
+  "ylz":"油圧値"
 }

+ 2 - 1
cust_data/web/unique/i18n/i18n_xibanya.js

@@ -550,5 +550,6 @@ const i18n_xibanya={
   "ipsz":"Configuración de IP",
   "IPV6mask":"máscara IPv6",
   "scpcrz":"Eliminar el registro de programación",
-  "wycgq":"Sensor de temperatura y presión"
+  "wycgq":"Sensor de temperatura y presión",
+  "ylz":"Valor hidráulico"
 }

+ 2 - 1
cust_data/web/unique/i18n/i18n_yidali.js

@@ -549,6 +549,7 @@ const i18n_yidali={
   "ipsz":"Impostazioni IP",
   "IPV6mask":"IPV6mask",
   "scpcrz":"Elimina i log di pianificazione",
-  "wycgq":"sensore di temperatura e pressione"
+  "wycgq":"sensore di temperatura e pressione",
+  "ylz":"Valore idraulico"
 
 }

+ 2 - 1
cust_data/web/unique/i18n/i18n_yingguo.js

@@ -549,5 +549,6 @@ const i18n_yingguo={
   "ipsz":"IP Settings",
   "IPV6mask":"IPV6mask",
   "scpcrz":"Delete scheduling log",
-  "wycgq":"Temperature and pressure sensor"
+  "wycgq":"Temperature and pressure sensor",
+  "ylz":"Hydraulic value"
 }

+ 2 - 1
cust_data/web/unique/i18n/i18n_zh_CN.js

@@ -547,5 +547,6 @@ const i18n_zh_CN = {
   "ipsz":"IP设置",
   "IPV6mask":"IPV6mask",
   "scpcrz":"删除排程日志",
-  "wycgq":"温压传感器"
+  "wycgq":"温压传感器",
+  "ylz":"液压值"
 }

Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
cust_data/web/unique/index.html


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
cust_data/web/unique/js/app.78509b05.js


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 0
cust_data/web/unique/js/chunk-0a156276.8c8f4acc.js


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 1
cust_data/web/unique/js/chunk-4e99148e.e5846b8b.js


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 1
cust_data/web/unique/js/chunk-27610fb4.f0242603.js


Fichier diff supprimé car celui-ci est trop grand
+ 1 - 0
cust_data/web/unique/js/chunk-2c41a226.a9bc77a1.js


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 1
cust_data/web/unique/js/chunk-4f6a06c8.70f191b7.js


+ 1 - 1
pro/src/app.c

@@ -2734,7 +2734,7 @@ static void* sensor_thread(void* arg)
 #endif
                 if (ret == -1)
                 {
-                    //log_i("485 Timeout sensorAddr=%d, ret=%d\n", _globalSensorMangerTemp->sensor_addr, ret);
+                    //log_e("485 Timeout sensorAddr=%d, ret=%d\n", _globalSensorMangerTemp->sensor_addr, ret);
                     _globalSensorMangerTemp->sensor_check_count++;
 
                     if (_globalSensorMangerTemp->sensor_check_count >= SENSOR_MAX_CHECK_COUNT)

+ 9 - 6
pro/src/appweb_handle.c

@@ -256,14 +256,15 @@ static int gettime2(char *buf, char *tok, char *timestr)
     return 0;
 }
 
-static int get_sensor2(char* buf,char *tok,char *sensor_type)
+static int get_sensor2(char* buf,char *tok,uint32_t *sensor_type)
 {
     char *p=strstr(buf, tok);
     if(!p) {
         return -1;
     }
     p += strlen(tok);
-    memcpy(sensor_type, p, 1); 
+    //memcpy(sensor_type, p, 1); 
+    *sensor_type = atoi(p);
     //sensor_type[1] = 0;
     return 0; 
 }
@@ -335,7 +336,7 @@ static int power_export(char *path, char *start, char *end,uint32_t channel_id)
 }
 
 
-static int sensor_export(char *path, char *start, char *end,char type)
+static int sensor_export(char *path, char *start, char *end,uint32_t type)
 {
     int r;
     time_t from,to;
@@ -346,9 +347,9 @@ static int sensor_export(char *path, char *start, char *end,char type)
     get_time_str2(tmp1,sizeof(tmp1),from);
     get_time_str2(tmp2,sizeof(tmp2),to);
     sprintf(path, "/tmp/sensor_%s_%s.csv", tmp1, tmp2);
-    int sensor_type = atoi(&type);
+    //int sensor_type = atoi(&type);
 
-    return dev_sensor_info_xport(from, to, path,sensor_type);
+    return dev_sensor_info_xport(from, to, path,type);
 }
 
 
@@ -526,11 +527,13 @@ static int file_io(void *conn, int ftype, int io, char *buf)
         case FILE_SENSOR_INFO:
         {
             char start[100],end[100];
-            char sensor_type;
+            uint32_t sensor_type;
             if(io==FILE_EXPORT) {
                 gettime2(buf, "startTime=", start);
                 gettime2(buf, "endTime=", end);
                 get_sensor2(buf,"sensorType=",&sensor_type);
+
+                //printf("sensor_type=%d\n",(uint32_t)sensor_type);
                 r = sensor_export(path, start, end,sensor_type);
                 if(r==0) {
                     download_file(conn, path);

+ 1 - 1
pro/src/sensor_handle.h

@@ -8,7 +8,7 @@ typedef union {
     float     val[2];
 }sensor_dat_t;
 
-#define SENSOR_MAX_CHECK_COUNT      3
+#define SENSOR_MAX_CHECK_COUNT      10
 
 int sensor_get_temperature_value(void* manger,int saddr,float* temp,float* humi);
 int sensor_get_temperature_value_anderson(void* manger,int saddr,float* temp,float* humi);

+ 1 - 1
pub

@@ -271,7 +271,7 @@ function do_copy()
 	    rm -f $appdir/Qt_Test  
     elif [ "$1" = "PRJ_709_AC_I3_O1_OLED" ];then
         name=ac_in3_out1_709_oled_release
-        cp -f $custdir/db/pdu_dat_wenya.db $appdir/pdu_dat.db
+        cp -f $custdir/db/pdu_dat_709.db $appdir/pdu_dat.db
         rm -f $appdir/Qt_Test	
     elif [ "$1" = "PRJ_CHANGCUN_20260701_AC_I3_O1_OLED" ];then
         name=ac_in3_out1_changcun_20260701_oled_release