|
|
@@ -1111,11 +1111,11 @@ static void* power_thread(void* arg)
|
|
|
uint32_t p_data = 0;
|
|
|
for(int i = 0; i < 3;i++)
|
|
|
{
|
|
|
- c_data += (_globalDeviceManager->triphasic_mmap->i_total.pw_i_total[i].i_total_consumption / 100);
|
|
|
- p_data += (_globalDeviceManager->triphasic_mmap->i_total.pw_i_total[i].i_total_power / 10);
|
|
|
+ c_data += (_globalDeviceManager->triphasic_mmap->i_total.pw_i_total[i].i_total_consumption);
|
|
|
+ p_data += (_globalDeviceManager->triphasic_mmap->i_total.pw_i_total[i].i_total_power);
|
|
|
}
|
|
|
- __globalDeviceManage.north_user.total_elec_energy = c_data;
|
|
|
- __globalDeviceManage.north_user.total_power = p_data;
|
|
|
+ __globalDeviceManage.north_user.total_elec_energy = c_data / 100;
|
|
|
+ __globalDeviceManage.north_user.total_power = p_data / 10;
|
|
|
__globalDeviceManage.north_user.frequency = _globalDeviceManager->_globalPowerManger._PowerInfo.freq * 100;
|
|
|
#endif
|
|
|
}
|
|
|
@@ -1191,11 +1191,16 @@ static void* power_thread(void* arg)
|
|
|
bool nTotalAup = _globalDeviceManager->_globalPowerManger._PowerWarninginfo.w_current;
|
|
|
bool nTotalPower = _globalDeviceManager->_globalPowerManger._PowerWarninginfo.w_power;
|
|
|
bool nTotalConsumption = _globalDeviceManager->_globalPowerManger._PowerWarninginfo.w_consumption;
|
|
|
-
|
|
|
+#ifdef NORTH_USER_SPECILS
|
|
|
+ uint8_t total_wanning = 0;
|
|
|
+#endif
|
|
|
if (_globalTotalPowerInfo._power_info.voltage >= _globalDeviceManager->_globalPowerManger.global_over_manager.product_vol_upper_threshold &&
|
|
|
abs(_globalDeviceManager->_globalPowerManger.global_over_manager.product_vol_upper_threshold) >= 0.05)
|
|
|
{
|
|
|
_globalDeviceManager->_globalPowerManger._PowerWarninginfo.w_voltage_up = true;
|
|
|
+#ifdef NORTH_USER_SPECILS
|
|
|
+ total_wanning ++;
|
|
|
+#endif
|
|
|
}
|
|
|
else
|
|
|
_globalDeviceManager->_globalPowerManger._PowerWarninginfo.w_voltage_up = false;
|
|
|
@@ -1204,6 +1209,9 @@ static void* power_thread(void* arg)
|
|
|
abs(_globalDeviceManager->_globalPowerManger.global_over_manager.product_vol_lower_threshold) >= 0.05)
|
|
|
{
|
|
|
_globalDeviceManager->_globalPowerManger._PowerWarninginfo.w_voltage_down = true;
|
|
|
+#ifdef NORTH_USER_SPECILS
|
|
|
+ total_wanning ++;
|
|
|
+#endif
|
|
|
}
|
|
|
else
|
|
|
_globalDeviceManager->_globalPowerManger._PowerWarninginfo.w_voltage_down = false;
|
|
|
@@ -1212,6 +1220,9 @@ static void* power_thread(void* arg)
|
|
|
abs(_globalDeviceManager->_globalPowerManger.global_over_manager.product_cur_upper_threshold) >= 0.05)
|
|
|
{
|
|
|
_globalDeviceManager->_globalPowerManger._PowerWarninginfo.w_current = true;
|
|
|
+#ifdef NORTH_USER_SPECILS
|
|
|
+ total_wanning ++;
|
|
|
+#endif
|
|
|
}
|
|
|
else
|
|
|
_globalDeviceManager->_globalPowerManger._PowerWarninginfo.w_current = false;
|
|
|
@@ -1220,6 +1231,9 @@ static void* power_thread(void* arg)
|
|
|
abs(_globalDeviceManager->_globalPowerManger.global_over_manager.product_pwr_upper_threshold) >= 0.05)
|
|
|
{
|
|
|
_globalDeviceManager->_globalPowerManger._PowerWarninginfo.w_power = true;
|
|
|
+#ifdef NORTH_USER_SPECILS
|
|
|
+ total_wanning ++;
|
|
|
+#endif
|
|
|
}
|
|
|
else
|
|
|
_globalDeviceManager->_globalPowerManger._PowerWarninginfo.w_power = false;
|
|
|
@@ -1228,9 +1242,21 @@ static void* power_thread(void* arg)
|
|
|
abs(_globalDeviceManager->_globalPowerManger.global_over_manager.product_pwrcon_upper_threshold) >= 0.05)
|
|
|
{
|
|
|
_globalDeviceManager->_globalPowerManger._PowerWarninginfo.w_consumption = true;
|
|
|
+#ifdef NORTH_USER_SPECILS
|
|
|
+ total_wanning ++;
|
|
|
+#endif
|
|
|
}
|
|
|
else
|
|
|
_globalDeviceManager->_globalPowerManger._PowerWarninginfo.w_consumption = false;
|
|
|
+#ifdef NORTH_USER_SPECILS
|
|
|
+ if (__globalDeviceManage.triphasic_mmap)
|
|
|
+ {
|
|
|
+ if(total_wanning)
|
|
|
+ __globalDeviceManage.north_user.total_wanning = 1;
|
|
|
+ else
|
|
|
+ __globalDeviceManage.north_user.total_wanning = 0;
|
|
|
+ }
|
|
|
+#endif
|
|
|
|
|
|
// 报警信息及动作
|
|
|
if (_globalDeviceManager->_globalPowerManger._PowerWarninginfo.w_voltage_up && !nTotalVup)
|