Przeglądaj źródła

添加litech配置

guohui 2 lat temu
rodzic
commit
fcf2146f3b
3 zmienionych plików z 145 dodań i 20 usunięć
  1. 118 0
      cust_data/cfg/cfg_litech.h
  2. 1 1
      pro/src/file.c
  3. 26 19
      pub

+ 118 - 0
cust_data/cfg/cfg_litech.h

@@ -0,0 +1,118 @@
+#ifndef __CONFIG_Hx__
+#define __CONFIG_Hx__
+
+
+#define VERSION                         "V0.0.1"
+
+
+#define PROD_ID                         1
+#define PROD_TYPE                       1
+#define PROD_POWER_TYPE                 1
+
+
+#define LANGUAGE                        0
+#define SMPLE_TIME                      100         //ms
+#define SAVE_TIME                       1000        //ms
+#define CASCADE_CNT                     5
+
+#define MAX_CHN_COUNT                   16
+#define PHASE_GROUP_CNT                 8
+#define CHANNEL_DELAY_SEC               8
+
+#define USE_SMTP
+
+/////////////customer demannd//////////////////////
+//#define PRJ_XIAN_GOM037
+//#define PRJ_USA_SL
+//#define PRJ_ANDERSON
+//#define PRJ_HYPERTEC
+//#define PRJ_RUSSIA_ITK
+#define PRJ_LITECH
+
+//#define PRJ_GENERAL
+//#define PRJ_TEST
+
+
+#ifdef PRJ_TEST
+    #define SMTP_SEND_BUILTIN
+    
+    #undef MAX_CHN_COUNT
+    #define MAX_CHN_COUNT               24
+#endif
+
+
+#ifdef PRJ_GENERAL
+    #define SMTP_SEND_BUILTIN
+#endif
+
+#ifdef PRJ_LITECH
+    #define SMTP_SEND_BUILTIN
+#endif
+
+
+
+#ifdef PRJ_XIAN_GOM037
+    #define SMTP_SEND_BUILTIN
+    
+    #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
+  
+
+    #ifdef GOM037PDU_GC20_04K_125H
+        #undef CHANNEL_DELAY_SEC
+        #define CHANNEL_DELAY_SEC        5
+    #endif
+#endif
+
+#ifdef PRJ_USA_SL
+    #define SMTP_SEND_BUILTIN
+    
+    #define PDU_GC40_03K_125H           //ac_in3_out3_40a_p8_12ch_nologo_en
+
+    //#define PDU_GC60_04K_125H         //ac_in3_out1_40a_p4_24ch_nologo_en
+#endif
+
+
+#ifdef PRJ_RUSSIA_ITK
+    #define SMTP_SEND_BUILTIN
+#endif
+
+
+#ifdef PRJ_ANDERSON
+    //#define USE_MQTT
+    //#define MQTT_SERVER_BUILTIN
+
+    #define SMTP_SEND_BUILTIN
+
+    #define USE_NETSWITCH
+
+    #define SW_STATIC_PORT_START
+    #define SW_PORT_INDEX_START         0
+    #define SW_PORT_INDEX_END           21
+
+    //#define SW_STATIC_IP
+    #ifdef SW_STATIC_IP
+        #define SW_HOST_IP              "192.168.234.1"
+        #define SW_PDU_IP               "192.168.234.132"
+    #endif
+    
+    #undef MAX_CHN_COUNT
+    #define MAX_CHN_COUNT               24
+#endif
+
+
+#ifdef PRJ_HYPERTEC
+    //ac_in3_out1_36ch_nologo_en_hypertec
+    #define SMTP_SEND_BUILTIN
+    
+    #undef PHASE_GROUP_CNT
+    #undef CHANNEL_DELAY_SEC
+
+    #define PHASE_GROUP_CNT             6
+    #define CHANNEL_DELAY_SEC           6
+#endif
+
+
+#endif
+
+

+ 1 - 1
pro/src/file.c

@@ -73,7 +73,7 @@ int file_load(char* path, buf_t *fbuf)
 
     fp = fopen(path, "r");
     if (!fp) {
-        LOGE("file_load, fopen %s failed\n", path); free(fbuf->buf);
+        LOGE("file_load, fopen %s failed\n", path);;
         free(fbuf->buf);
         return -1;
     }

+ 26 - 19
pub

@@ -10,18 +10,18 @@
 #PRJS="PRJ_USASL_AC_I3_O3"
 #PRJS="PRJ_HYPERTEC"
 #PRJS="PRJ_INSPUR"
-#PRJS="PRJ_GOWONE_AC_I1_O1"
-#PRJS="PRJ_GOWONE_AC_I3_O1"
-#PRJS="PRJ_GOWONE_AC_I3_O3"
+#PRJS="PRJ_RELEASE_DC_I_DC_O"
+#PRJS="PRJ_RELEASE_AC_I1_O1"
+#PRJS="PRJ_RELEASE_AC_I3_O1"
+#PRJS="PRJ_RELEASE_AC_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_TEST"
-#PRJS="PRJ_ANDERSON"
-#PRJS="PRJ_STSC_I3_O3"
-PRJS="PRJ_INSPUR"
 #PRJS="PRJ_ITK_AC_I1_O1 PRJ_ITK_AC_I3_O1 PRJ_XIAN_P4 PRJ_XIAN_P8"
+#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"
+
 
 fulldir=$(realpath $0)
 curdir=$(dirname $fulldir)
@@ -67,38 +67,45 @@ function do_copy()
 
         cp -f $custdir/db/ac_i3_o1_russian.db $curdir/output/t113i/root/run/app/pdu_dat.db
         cp -f $custdir/logo/logo_itk.png $curdir/output/t113i/root/run/app/image/logo.png
-    elif [ "$PRJ" = "PRJ_GOWONE_AC_I1_O1" ]; then
-        name=ac_in1_out1_gowone
+    elif [ "$PRJ" = "PRJ_RELEASE_DC_I_DC_O" ]; then
+        name=dc_in_dc_out_release
+        cp -rf $custdir/web/general  $curdir/output/t113i/root/run/web
+        cp -rf $custdir/cfg/cfg_general.h  $curdir/pro/config/cfg.h
+
+        cp -f $custdir/db/dc_i_dc_o_chinese.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
+    elif [ "$PRJ" = "PRJ_RELEASE_AC_I1_O1" ]; then
+        name=ac_in1_out1_release
         cp -rf $custdir/web/general  $curdir/output/t113i/root/run/web
         cp -rf $custdir/cfg/cfg_general.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/logo/logo_gowone.png $curdir/output/t113i/root/run/app/image/logo.png
-    elif [ "$PRJ" = "PRJ_GOWONE_AC_I3_O1" ]; then
-        name=ac_in3_out1_gowone
+        cp -f $custdir/logo/logo_neuter.png $curdir/output/t113i/root/run/app/image/logo.png
+    elif [ "$PRJ" = "PRJ_RELEASE_AC_I3_O1" ]; then
+        name=ac_in3_out1_release
         cp -rf $custdir/web/general  $curdir/output/t113i/root/run/web
         cp -rf $custdir/cfg/cfg_general.h  $curdir/pro/config/cfg.h
 
         cp -f $custdir/db/ac_i3_o1_chinese.db $curdir/output/t113i/root/run/app/pdu_dat.db
-        cp -f $custdir/logo/logo_gowone.png $curdir/output/t113i/root/run/app/image/logo.png
-    elif [ "$PRJ" = "PRJ_GOWONE_AC_I3_O3" ]; then
-        name=ac_in3_out3_gowone
+        cp -f $custdir/logo/logo_neuter.png $curdir/output/t113i/root/run/app/image/logo.png
+    elif [ "$PRJ" = "PRJ_RELEASE_AC_I3_O3" ]; then
+        name=ac_in3_out3_release
         cp -rf $custdir/web/general  $curdir/output/t113i/root/run/web
         cp -rf $custdir/cfg/cfg_general.h  $curdir/pro/config/cfg.h
 
         cp -f $custdir/db/ac_i3_o3_chinese.db $curdir/output/t113i/root/run/app/pdu_dat.db
-        cp -f $custdir/logo/logo_gowone.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_LITECH_AC_I1_O1" ]; then
         name=ac_in1_out1_litech
         cp -rf $custdir/web/general  $curdir/output/t113i/root/run/web
-        cp -rf $custdir/cfg/cfg_general.h  $curdir/pro/config/cfg.h
+        cp -rf $custdir/cfg/cfg_litech.h  $curdir/pro/config/cfg.h
 
         cp -f $custdir/db/ac_i1_o1_english.db $curdir/output/t113i/root/run/app/pdu_dat.db
         cp -f $custdir/logo/logo_litech.png $curdir/output/t113i/root/run/app/image/logo.png
     elif [ "$PRJ" = "PRJ_LITECH_AC_I3_O1" ]; then
         name=ac_in3_out1_litech
         cp -rf $custdir/web/general  $curdir/output/t113i/root/run/web
-        cp -rf $custdir/cfg/cfg_general.h  $curdir/pro/config/cfg.h
+        cp -rf $custdir/cfg/cfg_litech.h  $curdir/pro/config/cfg.h
 
         cp -f $custdir/db/ac_i3_o1_english.db $curdir/output/t113i/root/run/app/pdu_dat.db
         cp -f $custdir/logo/logo_litech.png $curdir/output/t113i/root/run/app/image/logo.png