Procházet zdrojové kódy

增加项目配置
修改默认配置

guohui před 1 rokem
rodič
revize
d3e39edb3a
7 změnil soubory, kde provedl 39 přidání a 54 odebrání
  1. binární
      cust_data/qt/Qt_Test
  2. 2 0
      output/t113i/pack_dir/etc/init.d/S90PDUApp
  3. 16 1
      pro/config/cfg.h
  4. 11 2
      pro/src/dflt.c
  5. 3 39
      pro/src/switch_ctrl.c
  6. 0 10
      pro/ui/ui.c
  7. 7 2
      pub

binární
cust_data/qt/Qt_Test


+ 2 - 0
output/t113i/pack_dir/etc/init.d/S90PDUApp

@@ -55,9 +55,11 @@ led_on()
 start_lcd()
 {
     #light lcd
+if [ -f $APPDIR/Qt_Test ]; then
     led_on
     fbinit
     $APPDIR/Qt_Test --platform linuxfb &
+fi
 }
 
 

+ 16 - 1
pro/config/cfg.h

@@ -20,11 +20,12 @@
 //#define PRJ_ANDERSON_AC_I3_O3
 //#define PRJ_HYPERTEC_AC_I3_O1
 //#define PRJ_SG_I3_O3
-#define PRJ_TEST
+//#define PRJ_TEST
 //#define PRJ_TEST_AC_I1_O1
 //#define PRJ_TEST_AC_I3_O1
 //#define PRJ_IP_AC_I3_O3
 //#define PRJ_INST2302_DC_OLED
+#define PRJ_INST2106_AC_I3_O1_OLED
 
 
 //#define USE_BOARD_UPGRADE
@@ -222,6 +223,20 @@
     #define USE_UI
     #define USE_SCREEN_LED
     //#define USE_SCREEN_LCD
+#elif defined PRJ_INST2106_AC_I3_O1_OLED
+    #define LANGUAGE                            0           //chinese
+    #define SMPLE_TIME                          30          //ms
+    #define SAVE_TIME                           60000       //ms
+    #define CASCADE_CNT                         0
+
+    #define PHASE_GROUP                         8
+    #define CHANNEL_DELAY                       8
+
+    #define PROD_POWER_TYPE                     5
+
+    #define USE_UI
+    #define ROTATE                              180
+    #define FLIP_TIME                           3
 #else
     #error define a PRJ_XXXX please!
 #endif

+ 11 - 2
pro/src/dflt.c

@@ -66,10 +66,19 @@ GlobalDeviceInfo DFLT_PARAS={
 
         .misc = {
             .watchdog = 0,
-            .flip_time = 3,
+        #ifdef FLIP_TIME
+            .flip_time = FLIP_TIME,
+        #else
+            .flip_time = 0,
+        #endif
+
             .led = 0,
             .beep = 0,
-            .rotate = 180,
+        #ifdef ROTATE
+            .rotate = ROTATE,
+        #else
+            .rotate = 0,
+        #endif
         },
 };
 

+ 3 - 39
pro/src/switch_ctrl.c

@@ -1049,20 +1049,7 @@ int g_switch_set_all_single_threshold(void* manger,int ntype,int saddr,char chn,
     case AC_SINGLE_B_TYPE:
     {
         ret = g_switch_set_ac_single_threshold(manger, saddr, (chn - 1), _global_over_manager);
-            if (_global_over_manager->product_vol_upper_enable == 1)
-                sts |= ENABLE_V_UP;
-            if (_global_over_manager->product_vol_lower_enable == 1)
-                sts |= ENABLE_V_DOWN;
-            if (_global_over_manager->product_cur_upper_enable == 1)
-                sts |= ENABLE_A_UP;
-            if (_global_over_manager->product_pwr_upper_enable == 1)
-                sts |= ENABLE_W_UP;
-            if (_global_over_manager->product_pwrcon_upper_enable == 1)
-                sts |= ENABLE_P_UP;
-        ret = g_switch_set_ac_alarm_ctrl(manger, saddr, (chn - 1), _global_over_manager);
-        if(setCh) {
-            ret = g_switch_set_ac_single_s_chn_ctrl(manger, saddr, (chn - 1), sts);
-        }
+        if(setCh)  ret = g_switch_set_ac_alarm_ctrl(manger, saddr, (chn - 1), _global_over_manager);
     }
     break;
     case DC_OUT_TYPE:
@@ -1078,9 +1065,8 @@ int g_switch_set_all_single_threshold(void* manger,int ntype,int saddr,char chn,
         ret = g_switch_set_dcpdu_max_power_threshold(manger, saddr, (chn - 1), _global_over_manager);
         ret = g_switch_set_dcpdu_max_pwrcon_threshold(manger, saddr, (chn - 1), _global_over_manager);
 
-        if(setCh) {
-            ret = g_switch_set_dcpdu_alarm_ctrl(manger, saddr, (chn - 1), _global_over_manager);
-        }
+        if(setCh)  ret = g_switch_set_dcpdu_alarm_ctrl(manger, saddr, (chn - 1), _global_over_manager);
+        
     }
     break;
     case TREE_AC_TYPE:
@@ -1131,28 +1117,6 @@ int g_switch_set_all_single_threshold(void* manger,int ntype,int saddr,char chn,
                     log_e("Threshold AlarmCtrl Set Error=%s", modbus_strerror(errno));
                 }
             }
-
-            if (_global_over_manager->product_vol_upper_enable == 1)
-                sts |= ENABLE_TAC_V_UP;
-            if (_global_over_manager->product_vol_lower_enable == 1)
-                sts |= ENABLE_TAC_V_DOWN;
-            if (_global_over_manager->product_cur_upper_enable == 1)
-                sts |= ENABLE_TAC_A_UP;
-            if (_global_over_manager->product_pwr_upper_enable == 1)
-                sts |= ENABLE_TAC_W_UP;
-            if (_global_over_manager->product_pwrcon_upper_enable == 1)
-                sts |= ENABLE_TAC_P_UP;
-
-            if(setCh) {
-                if (__globalDeviceManage._globalDevInfo.product.pwr_type == SmartPDU_Tree_AC_Tree)
-                {
-                    ret = g_switch_set_t_ac_phchn_ctrl(manger, saddr, (chn - 1), sts);
-                }
-                else
-                {
-                    ret = g_switch_set_t_ac_chn_ctrl(manger, saddr, (chn - 1), sts);
-                }
-            }
         }
     }
     break;

+ 0 - 10
pro/ui/ui.c

@@ -43,22 +43,12 @@ static void *ui_thread(void *arg)
     pthread_exit(NULL);
 }
 /////////////////////////////////////////////////////
-static void rm_qt(void)
-{
-#if 0
-    sys_kill("Qt_Test");
-    remove("/root/run/app/Qt_Test");
-#else
-    system("killall Qt_Test; rm /root/run/app/Qt_Test");
-#endif
-}
 
 int ui_init(void)
 {
     ui_handle_t *h=&uiHandle;
 
 #ifdef USE_UI
-    rm_qt();
     thread_start(THREAD_ID_UI, ui_thread, h);
 #endif
 

+ 7 - 2
pub

@@ -14,12 +14,13 @@
 #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_STSC_I3_O3"
 #PRJS="PRJ_SG_I3_O3"
 #PRJS="PRJ_TEST"
 #PRJS="PRJ_TEST_AC_I1_O1"
 #PRJS="PRJ_TEST_AC_I3_O1"
 #PRJS="PRJ_INST2302_DC_OLED"
+PRJS="PRJ_INST2106_AC_I3_O1_OLED"
 
 #PRJS="PRJ_USASL_AC_I3_O1 PRJ_USASL_AC_I3_O3"
 #PRJS="PRJ_XIAN_AC_I1_O1_P4 PRJ_XIAN_AC_I1_O1_P8"
@@ -145,7 +146,11 @@ function do_copy()
     elif [ "$1" = "PRJ_INST2302_DC_OLED" ];then
         name=dc_in_dc_out_oled
         cp -f $custdir/logo/logo_neuter.png $appdir/image/logo.png
-        cp -f $custdir/qt/Qt_Test_oled $appdir/Qt_Test
+        rm -f $appdir/Qt_Test
+    elif [ "$1" = "PRJ_INST2106_AC_I3_O1_OLED" ];then
+        name=ac_in3_out1_inst2106_oled
+        cp -f $custdir/logo/logo_neuter.png $appdir/image/logo.png
+        rm -f $appdir/Qt_Test
     else
         echo error! $RPJ not define!!!
         exit 1