Bladeren bron

改双火线的一个bug,会导致控制板越界

guohui 2 jaren geleden
bovenliggende
commit
e4cc9f05dd
3 gewijzigde bestanden met toevoegingen van 28 en 8 verwijderingen
  1. 19 3
      pro/config/cfg.h
  2. 1 1
      pro/src/switch_ctrl.c
  3. 8 4
      pub

+ 19 - 3
pro/config/cfg.h

@@ -18,9 +18,11 @@
 //#define PRJ_LITECH_AC_I1_O1
 //#define PRJ_LITECH_AC_I3_O1
 //#define PRJ_INSPUR_DC_I_DC_O
-#define PRJ_ANDERSON_AC_I3_O3
+//#define PRJ_ANDERSON_AC_I3_O3
 //#define PRJ_HYPERTEC_AC_I3_O1
-//#define PRJ_TEST
+//#define PRJ_SG24016
+#define PRJ_TEST
+
 
 
 #if (defined PRJ_XIAN_AC_I1_O1_P4) || (defined PRJ_XIAN_AC_I1_O1_P8)  //GOM037
@@ -173,13 +175,27 @@
     #define SMTP_SEND_BUILTIN
 
     #define PROD_POWER_TYPE                     1
+#elif defined PRJ_SG24016
+    #define LANGUAGE                            0           //english
+    #define SMPLE_TIME                          30          //ms
+    #define SAVE_TIME                           60000       //ms
+    #define CASCADE_CNT                         0
+
+    #define MAX_CHN_COUNT                       16
+    #define PHASE_GROUP                         6
+    #define CHANNEL_DELAY                       6
+
+    #define USE_SMTP
+    #define SMTP_SEND_BUILTIN
+
+    #define PROD_POWER_TYPE                     0
 #elif defined PRJ_TEST
     #define LANGUAGE                            0           //chinese
     #define SMPLE_TIME                          30          //ms
     #define SAVE_TIME                           60000       //ms
     #define CASCADE_CNT                         0
 
-    #define MAX_CHN_COUNT                       24//4
+    #define MAX_CHN_COUNT                       16//24//4
     #define PHASE_GROUP                         8
     #define CHANNEL_DELAY                       8
     

+ 1 - 1
pro/src/switch_ctrl.c

@@ -157,7 +157,7 @@ int g_switch_get_ac_single_s_all_cur_info(void* manger,int saddr,int nNumb,Power
 
     offset = _SWITCH_AC_SINGLE_S_STS_INFO;
     memset(data_temp, 0,sizeof(data_temp));
-    ret = g_modbus_read_x_reg(manger, saddr, offset, 8, data_temp);
+    ret = g_modbus_read_x_reg(manger, saddr, offset, nNumb, data_temp);
     // 解控制数据
     if (ret < 0)
     {

+ 8 - 4
pub

@@ -1,7 +1,7 @@
 
 #PRJS="PRJ_XIAN_AC_I1_O1_P4"
 #PRJS="PRJ_XIAN_AC_I1_O1_P8"
-#PRJS="PRJ_ITK_AC_I1_O1"
+PRJS="PRJ_ITK_AC_I1_O1"
 #PRJS="PRJ_ITK_AC_I3_O1"
 #PRJS="PRJ_LITECH_AC_I1_O1"
 #PRJS="PRJ_LITECH_AC_I3_O1"
@@ -15,7 +15,8 @@
 #PRJS="PRJ_RELEASE_AC_I3_O1"
 #PRJS="PRJ_RELEASE_AC_I3_O3"
 #PRJS="PRJ_STSC_I3_O3"
-PRJS="PRJ_TEST"
+#PRJS="PRJ_SG24016"
+#PRJS="PRJ_TEST"
 
 #PRJS="PRJ_USASL_AC_I3_O1 PRJ_USASL_AC_I3_O3"
 #PRJS="PRJ_XIAN_AC_I1_O1_P4 PRJ_XIAN_AC_I1_O1_P8"
@@ -112,14 +113,17 @@ function do_copy()
     elif [ "$1" = "PRJ_STSC_I3_O3" ]; then
         name=ac_in3_out3_stsc
         cp -f $custdir/logo/logo_neuter.png $curdir/output/t113i/root/run/app/image/logo.png
+    elif [ "$1" = "PRJ_SG24016" ]; then
+        name=ac_in2_out1_sg24016
+    	cp -f $custdir/logo/logo_neuter.png $curdir/output/t113i/root/run/app/image/logo.png
     else
         echo error! $RPJ not define!!!
         exit 1
     fi
 
     rm -rf $curdir/output/t113i/root/run/web
-    if [ $flag -gt 0 ]; then
-        cp -rf $custdir/web/general  $curdir/output/t113i/root/run/web
+    if [ $flag -eq 0 ]; then
+        cp -rf $custdir/web/general   $curdir/output/t113i/root/run/web
     else
         cp -rf $custdir/web/anderson  $curdir/output/t113i/root/run/web
     fi