Kaynağa Gözat

匹配网页总电压显示线电压,L1,L2,L3显示相电压。

liyi 11 ay önce
ebeveyn
işleme
13b6632c8e
4 değiştirilmiş dosya ile 6 ekleme ve 4 silme
  1. 3 1
      pro/src/app.c
  2. 1 1
      pro/src/appweb_handle.c
  3. 1 1
      pro/src/json_handle.c
  4. 1 1
      pro/src/sqlite_handle.c

+ 3 - 1
pro/src/app.c

@@ -417,6 +417,7 @@ static void* power_thread(void* arg)
                         GlobalTreeACManager *_pTreeACPowerPhData = NULL;
                         memset(&_globalPowerInfo._power_info, 0, sizeof(_globalPowerInfo._power_info));
                         int k = 0;
+                        
                         list_for_each_entry(_pTreeACPowerMangerTemp, &_globalPowerMangerTemp->list_Tree_AC, list_Tree_AC)
                         {
                             //筛选控制中的数据
@@ -439,6 +440,7 @@ static void* power_thread(void* arg)
                             _globalPowerInfo._power_info.factor = _pTreeACPowerMangerTemp->_PowerInfo.factor;
                             //
                             pTreeAPowerInfo = NULL;
+                            _globalTotalPowerInfo._power_info.voltage = _globalPowerInfo._power_info.voltage*sqrt(3);
                             list_for_each_entry(pTreeAPowerInfo, &_globalDeviceManager->_globalPowerManger.list_Tree_AC, list_Tree_AC)
                             {
                                 int nTreeACType = pTreeAPowerInfo->product_ph_type;
@@ -1372,7 +1374,7 @@ static void* power_thread(void* arg)
         }
         if (__globalDeviceManage._globalDevInfo.product.pwr_type == SmartPDU_Tree_AC_One_B)
         {
-            _pTreeACPowerMangerTemp = NULL;      
+            _pTreeACPowerMangerTemp = NULL;  
             list_for_each_entry(_pTreeACPowerMangerTemp, &_globalDeviceManager->_globalPowerManger.list_Tree_AC, list_Tree_AC)
             {
                 int nTreeACType = _pTreeACPowerMangerTemp->product_ph_type;

+ 1 - 1
pro/src/appweb_handle.c

@@ -1022,7 +1022,7 @@ static void overallStatusMonitoring(void* conn)
                 for (int i = 0; i < TOTAL_COUNT; i++)
                 {
                     strcpy(pall->_total_voltage.xAxis[i], __globalPowerInfo._total_voltage.xAxis[i]);
-                    pall->_total_voltage.ydata[i] = __globalPowerInfo._total_voltage.ydata[i] * 1.732;
+                    pall->_total_voltage.ydata[i] = __globalPowerInfo._total_voltage.ydata[i];
                 }
 
                 // 返回电压统计

+ 1 - 1
pro/src/json_handle.c

@@ -2639,7 +2639,7 @@ char *over_all_data_t_ac_to_json(_OverAllPwrAckInfo *_over_all_pwr_back_info,_Ov
             for (int i = 0; i < TOTAL_COUNT; i++)
             {
                 strcpy(_over_all_pwr_back_info->_total_voltage.xAxis[i], __globalPowerInfo._total_voltage.xAxis[i]);
-                _over_all_pwr_back_info->_total_voltage.ydata[i] = __globalPowerInfo._total_voltage.ydata[i]*1.732;
+                _over_all_pwr_back_info->_total_voltage.ydata[i] = __globalPowerInfo._total_voltage.ydata[i];
             }
             break;
         case TOTAL_CURRENT_TYPE:

+ 1 - 1
pro/src/sqlite_handle.c

@@ -1043,7 +1043,7 @@ int dev_search_latest_t_ac_power_statistic_info(int nCh, int nType, _OverAllPwrA
             {
                 continue;
             }
-            __overChnPwrAckInfo->voltage = _pTreeACPowerMangerTemp->_PowerInfo.voltage * 1.732;
+            __overChnPwrAckInfo->voltage = _pTreeACPowerMangerTemp->_PowerInfo.voltage;
             __overChnPwrAckInfo->current = _pTreeACPowerMangerTemp->_PowerInfo.current;
             __overChnPwrAckInfo->power = _pTreeACPowerMangerTemp->_PowerInfo.power;
             __overChnPwrAckInfo->freq = _pTreeACPowerMangerTemp->_PowerInfo.freq;