Explorar o código

1、针对西安客户修改干节点映射
2、修改数据库俄文翻译

guohui %!s(int64=2) %!d(string=hai) anos
pai
achega
f13e3fb377

+ 3 - 1
cust_data/cfg/cfg_xian_p4.h

@@ -41,9 +41,11 @@
 
 
 #ifdef PRJ_XIAN_GOM037
 #ifdef PRJ_XIAN_GOM037
     #define SMTP_SEND_BUILTIN
     #define SMTP_SEND_BUILTIN
+
+    #define IN_INDEX_MAP                {3,2,0,1}
     
     
     //#define GOM037_PDU_GC10_08K_80H        //ac_in1_out1_40a_p8_5ch_nologo_cn
     //#define GOM037_PDU_GC10_08K_80H        //ac_in1_out1_40a_p8_5ch_nologo_cn
-    #define GOM037PDU_GC20_04K_125H        //ac_in1_out1_40a_p4_5ch_nologo_cn
+    #define GOM037PDU_GC20_04K_125H          //ac_in1_out1_40a_p4_5ch_nologo_cn
   
   
 
 
     #ifdef GOM037PDU_GC20_04K_125H
     #ifdef GOM037PDU_GC20_04K_125H

+ 2 - 0
cust_data/cfg/cfg_xian_p8.h

@@ -41,6 +41,8 @@
 
 
 #ifdef PRJ_XIAN_GOM037
 #ifdef PRJ_XIAN_GOM037
     #define SMTP_SEND_BUILTIN
     #define SMTP_SEND_BUILTIN
+
+    #define IN_INDEX_MAP                {3,2,0,1}
     
     
     #define GOM037_PDU_GC10_08K_80H        //ac_in1_out1_40a_p8_5ch_nologo_cn
     #define GOM037_PDU_GC10_08K_80H        //ac_in1_out1_40a_p8_5ch_nologo_cn
     //#define GOM037PDU_GC20_04K_125H        //ac_in1_out1_40a_p4_5ch_nologo_cn
     //#define GOM037PDU_GC20_04K_125H        //ac_in1_out1_40a_p4_5ch_nologo_cn

BIN=BIN
cust_data/db/ac_i1_o1_chinese.db


BIN=BIN
cust_data/db/ac_i1_o1_chinese_xian.db


BIN=BIN
cust_data/db/ac_i1_o1_russian.db


BIN=BIN
cust_data/db/ac_i3_o1_russian.db


BIN=BIN
cust_data/db/ac_i3_o3_russian.db


+ 14 - 9
pro/src/appweb_handle.c

@@ -2038,7 +2038,7 @@ static void sensorStatusMonitoring(void* conn)
              #ifdef IN_INDEX_MAP
              #ifdef IN_INDEX_MAP
                 char index_map[4]=IN_INDEX_MAP;
                 char index_map[4]=IN_INDEX_MAP;
              #else 
              #else 
-                char index_map[4]={0,1,3,2}};
+                char index_map[4]={0,1,3,2};
              #endif
              #endif
                 if (strcmp(_over_all_sensor_request.cgqtd, "RS485") == 0)
                 if (strcmp(_over_all_sensor_request.cgqtd, "RS485") == 0)
                 {
                 {
@@ -2149,6 +2149,11 @@ static void sensorStatusMonitoring(void* conn)
         }
         }
         if (_over_all_sensor_request.cgqtd)
         if (_over_all_sensor_request.cgqtd)
         {
         {
+        #ifdef IN_INDEX_MAP
+            char index_map[4]=IN_INDEX_MAP;
+        #else 
+            char index_map[4]={0,1,3,2};
+        #endif
             if (strcmp(_over_all_sensor_request.cgqtd, "RS485") == 0)
             if (strcmp(_over_all_sensor_request.cgqtd, "RS485") == 0)
             {
             {
                 _globalSensorMangerTemp->sensor_interface_type = 1;
                 _globalSensorMangerTemp->sensor_interface_type = 1;
@@ -2166,31 +2171,31 @@ static void sensorStatusMonitoring(void* conn)
                        strcpy(_globalSensorMangerTemp->sensor_port_name, "COM");
                        strcpy(_globalSensorMangerTemp->sensor_port_name, "COM");
                 //  }
                 //  }
             }
             }
-            else if (strcmp(_over_all_sensor_request.cgqtd, "IN3") == 0)
+            else if (strcmp(_over_all_sensor_request.cgqtd, "IN1") == 0)
             {
             {
                 _globalSensorMangerTemp->sensor_interface_type = 2;
                 _globalSensorMangerTemp->sensor_interface_type = 2;
-                _globalSensorMangerTemp->sensor_addr = IN3_Map_Index;
+                _globalSensorMangerTemp->sensor_addr = index_map[0];
                 strcpy(_globalSensorMangerTemp->sensor_port_name, _over_all_sensor_request.cgqtd);
                 strcpy(_globalSensorMangerTemp->sensor_port_name, _over_all_sensor_request.cgqtd);
                  _globalSensorMangerTemp->sensor_baud = 0;
                  _globalSensorMangerTemp->sensor_baud = 0;
             }
             }
-            else if (strcmp(_over_all_sensor_request.cgqtd, "IN4") == 0)
+            else if (strcmp(_over_all_sensor_request.cgqtd, "IN2") == 0)
             {
             {
                 _globalSensorMangerTemp->sensor_interface_type = 2;
                 _globalSensorMangerTemp->sensor_interface_type = 2;
-                _globalSensorMangerTemp->sensor_addr = IN4_Map_Index;
+                _globalSensorMangerTemp->sensor_addr = index_map[1];
                 strcpy(_globalSensorMangerTemp->sensor_port_name, _over_all_sensor_request.cgqtd);
                 strcpy(_globalSensorMangerTemp->sensor_port_name, _over_all_sensor_request.cgqtd);
                  _globalSensorMangerTemp->sensor_baud = 0;
                  _globalSensorMangerTemp->sensor_baud = 0;
             }
             }
-            else if (strcmp(_over_all_sensor_request.cgqtd, "IN2") == 0)
+            else if (strcmp(_over_all_sensor_request.cgqtd, "IN3") == 0)
             {
             {
                 _globalSensorMangerTemp->sensor_interface_type = 2;
                 _globalSensorMangerTemp->sensor_interface_type = 2;
-                _globalSensorMangerTemp->sensor_addr = IN2_Map_Index;
+                _globalSensorMangerTemp->sensor_addr =index_map[2];
                 strcpy(_globalSensorMangerTemp->sensor_port_name, _over_all_sensor_request.cgqtd);
                 strcpy(_globalSensorMangerTemp->sensor_port_name, _over_all_sensor_request.cgqtd);
                  _globalSensorMangerTemp->sensor_baud = 0;
                  _globalSensorMangerTemp->sensor_baud = 0;
             }
             }
-            else if (strcmp(_over_all_sensor_request.cgqtd, "IN1") == 0)
+            else if (strcmp(_over_all_sensor_request.cgqtd, "IN4") == 0)
             {
             {
                 _globalSensorMangerTemp->sensor_interface_type = 2;
                 _globalSensorMangerTemp->sensor_interface_type = 2;
-                _globalSensorMangerTemp->sensor_addr = IN1_Map_Index;
+                _globalSensorMangerTemp->sensor_addr = index_map[3];
                 strcpy(_globalSensorMangerTemp->sensor_port_name, _over_all_sensor_request.cgqtd);
                 strcpy(_globalSensorMangerTemp->sensor_port_name, _over_all_sensor_request.cgqtd);
                  _globalSensorMangerTemp->sensor_baud = 0;
                  _globalSensorMangerTemp->sensor_baud = 0;
             }
             }

+ 2 - 7
pro/src/mqtt.c

@@ -496,12 +496,10 @@ int mqtt_deinit(void)
     return r;
     return r;
 }
 }
 
 
-
+#ifdef USE_MQTT
 static int send_stat(mqtt_handle_t *h, int type)
 static int send_stat(mqtt_handle_t *h, int type)
 {
 {
     int i,r=-1;
     int i,r=-1;
-
-#ifdef USE_MQTT
     float p1,p2,p3;
     float p1,p2,p3;
     char topic[256];
     char topic[256];
     char* content=NULL;
     char* content=NULL;
@@ -760,12 +758,9 @@ static int send_stat(mqtt_handle_t *h, int type)
         return -1;
         return -1;
     }
     }
 
 
-    
-    
-#endif
-
     return r;
     return r;
 }
 }
+#endif
 
 
 
 
 static int post_alarm(int type, int subtype, char *content, alarm_para_t *para)
 static int post_alarm(int type, int subtype, char *content, alarm_para_t *para)

+ 5 - 4
pub

@@ -15,10 +15,11 @@
 #PRJS="PRJ_RELEASE_AC_I3_O1"
 #PRJS="PRJ_RELEASE_AC_I3_O1"
 #PRJS="PRJ_RELEASE_AC_I3_O3"
 #PRJS="PRJ_RELEASE_AC_I3_O3"
 #PRJS="PRJ_STSC_I3_O3"
 #PRJS="PRJ_STSC_I3_O3"
-PRJS="PRJ_TEST"
+#PRJS="PRJ_TEST"
 
 
 #PRJS="PRJ_USASL_AC_I3_O1 PRJ_USASL_AC_I3_O3"
 #PRJS="PRJ_USASL_AC_I3_O1 PRJ_USASL_AC_I3_O3"
-#PRJS="PRJ_ITK_AC_I1_O1 PRJ_ITK_AC_I3_O1 PRJ_XIAN_P4 PRJ_XIAN_P8"
+#PRJS="PRJ_XIAN_P4 PRJ_XIAN_P8"
+#PRJS="PRJ_ITK_AC_I1_O1 PRJ_ITK_AC_I3_O1"
 #PRJS="PRJ_LITECH_AC_I1_O1 PRJ_LITECH_AC_I3_O1"
 #PRJS="PRJ_LITECH_AC_I1_O1 PRJ_LITECH_AC_I3_O1"
 #PRJS="PRJ_RELEASE_DC_I_DC_O PRJ_RELEASE_AC_I1_O1 PRJ_RELEASE_AC_I3_O1 PRJ_RELEASE_AC_I3_O3"
 #PRJS="PRJ_RELEASE_DC_I_DC_O PRJ_RELEASE_AC_I1_O1 PRJ_RELEASE_AC_I3_O1 PRJ_RELEASE_AC_I3_O3"
 
 
@@ -44,14 +45,14 @@ function do_copy()
         cp -rf $custdir/web/general  $curdir/output/t113i/root/run/web
         cp -rf $custdir/web/general  $curdir/output/t113i/root/run/web
         cp -rf $custdir/cfg/cfg_xian_p4.h  $curdir/pro/config/cfg.h
         cp -rf $custdir/cfg/cfg_xian_p4.h  $curdir/pro/config/cfg.h
 
 
-        cp -f $custdir/db/ac_i1_o1_chinese.db $curdir/output/t113i/root/run/app/pdu_dat.db
+        cp -f $custdir/db/ac_i1_o1_chinese_xian.db $curdir/output/t113i/root/run/app/pdu_dat.db
         cp -f $custdir/logo/logo_neuter.png $curdir/output/t113i/root/run/app/image/logo.png
         cp -f $custdir/logo/logo_neuter.png $curdir/output/t113i/root/run/app/image/logo.png
     elif [ "$PRJ" = "PRJ_XIAN_P8" ]; then
     elif [ "$PRJ" = "PRJ_XIAN_P8" ]; then
         name=ac_in1_out1_p8_xian
         name=ac_in1_out1_p8_xian
         cp -rf $custdir/web/general  $curdir/output/t113i/root/run/web
         cp -rf $custdir/web/general  $curdir/output/t113i/root/run/web
         cp -rf $custdir/cfg/cfg_xian_p8.h  $curdir/pro/config/cfg.h
         cp -rf $custdir/cfg/cfg_xian_p8.h  $curdir/pro/config/cfg.h
         
         
-        cp -f $custdir/db/ac_i1_o1_chinese.db $curdir/output/t113i/root/run/app/pdu_dat.db
+        cp -f $custdir/db/ac_i1_o1_chinese_xian.db $curdir/output/t113i/root/run/app/pdu_dat.db
         cp -f $custdir/logo/logo_neuter.png $curdir/output/t113i/root/run/app/image/logo.png
         cp -f $custdir/logo/logo_neuter.png $curdir/output/t113i/root/run/app/image/logo.png
     elif [ "$PRJ" = "PRJ_ITK_AC_I1_O1" ]; then
     elif [ "$PRJ" = "PRJ_ITK_AC_I1_O1" ]; then
         name=ac_in1_out1_russia_itk
         name=ac_in1_out1_russia_itk