Skip to content

Commit f1f7d95

Browse files
author
Michael
committed
Fix low battery on invt_modbus UPS
1 parent 46c0e2d commit f1f7d95

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/invt_modbus.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,8 @@ void upsdrv_updateinfo(void)
138138
upsdebugx(2, "battery.voltage %.2f", (double) h_tab_reg[50 - 1] / 10);
139139
dstate_setinfo("battery.current", "%.2f", (double) h_tab_reg[52 - 1] / 10);
140140
upsdebugx(2, "battery.current %.2f", (double) h_tab_reg[52 - 1] / 10);
141-
dstate_setinfo("battery.runtime", "%.2f", (double) h_tab_reg[55 - 1] / 10);
142-
upsdebugx(2, "battery.runtime %.2f", (double) h_tab_reg[55 - 1] / 10);
141+
dstate_setinfo("battery.runtime", "%.2f", (double) h_tab_reg[55 - 1]);
142+
upsdebugx(2, "battery.runtime %.2f", (double) h_tab_reg[55 - 1]);
143143

144144

145145
if (h_tab_reg[79 - 1] == 3) {
@@ -245,7 +245,7 @@ void upsdrv_updateinfo(void)
245245
if ((i_tab_reg[88 - 81] == 0)&&(i_tab_reg[81-81] == 1)) {
246246
status_set("OL");
247247
upsdebugx(2, "OL");
248-
} else if ((i_tab_reg[88 - 81] == 1)&&(i_tab_reg[81-81] == 1)&&(h_tab_reg[55-1] < 50)) {
248+
} else if ((i_tab_reg[88 - 81] == 1)&&(i_tab_reg[81-81] == 1)&&(h_tab_reg[55-1] < 5)) {
249249
status_set("LB");
250250
upsdebugx(2, "LB");
251251
} else if ((i_tab_reg[88 - 81] == 1)&&(i_tab_reg[81-81] == 1)) {

0 commit comments

Comments
 (0)