فهرست منبع

fix calculate CurrentInput

balbekova 2 سال پیش
والد
کامیت
c788e5ee10
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      modules/parameters.c

+ 2 - 2
modules/parameters.c

@@ -300,7 +300,7 @@ void GetConnectMonitorStr(char *str, uint8_t *len)
 void GetInputCurrentStr(char *str, uint8_t *len)
 {
     float value;
-    if (UPS.VAC_in != 0) {
+    if (UPS.VAC_in != 0 && UPS.Mode != 'B') {
         value = (sSettings.UPS_Setting.ups_power * UPS.Load) / (100 * K_EFFICIENCY * UPS.VAC_in);
     } else {
         value = 0;
@@ -314,7 +314,7 @@ void GetInputCurrentStr(char *str, uint8_t *len)
   */
 void GetInputCurrentInt(float *value)
 {
-    if (UPS.VAC_in != 0) {
+    if (UPS.VAC_in != 0 && UPS.Mode != 'B') {
         *value = (sSettings.UPS_Setting.ups_power * UPS.Load) / (100 * K_EFFICIENCY * UPS.VAC_in);
     } else {
         *value = 0;