Explorar o código

fix calculate CurrentInput

balbekova %!s(int64=2) %!d(string=hai) anos
pai
achega
c788e5ee10
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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;