Skip to content

Commit

Permalink
Merge pull request #2751 from goodspeed34/gxe-bad-runtime
Browse files Browse the repository at this point in the history
drivers/liebert-gxe.c: fix bad backup time report
  • Loading branch information
jimklimov authored Jan 5, 2025
2 parents 99ea972 + 518c527 commit 8bc2bdd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/liebert-gxe.c
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,9 @@ static void upsdrv_updateinfo_analog(void)
/* Field 19, AC_OUT POWER, kVA */
dstate_setinfo("ups.power", "%d",
ydn23_val_from_hex(YDN23_FRAME_REG(frame, 35), 4)*10);
/* Field 22, BATTERY BACKUP TIME, Min */
dstate_setinfo("battery.runtime.low", "%.2f",
ydn23_val_from_hex(YDN23_FRAME_REG(frame, 41), 4)/100.0f*60.0f);
/* Field 22, BATTERY BACKUP TIME, Minutes */
dstate_setinfo("battery.runtime", "%d",
ydn23_val_from_hex(YDN23_FRAME_REG(frame, 41), 4)*60);

dstate_dataok();
}
Expand Down

0 comments on commit 8bc2bdd

Please sign in to comment.