Skip to content

Commit

Permalink
drivers/usbhid-ups.c: upsdrv_initups(): update comments about logical…
Browse files Browse the repository at this point in the history
… progression through init

Signed-off-by: Jim Klimov <[email protected]>
  • Loading branch information
jimklimov committed Dec 16, 2024
1 parent cabab95 commit c641cff
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/usbhid-ups.c
Original file line number Diff line number Diff line change
Expand Up @@ -1562,6 +1562,7 @@ void upsdrv_initups(void)
fatalx(EXIT_FAILURE, "Can't initialize data from HID UPS");
}

/* Set values below from user settings only if supported by UPS */
if (dstate_getinfo("battery.charge.low")) {
/* Retrieve user defined battery settings */
val = getval(HU_VAR_LOWBATT);
Expand All @@ -1586,6 +1587,7 @@ void upsdrv_initups(void)
}
}

/* Enable instant commands below only if supported by UPS */
if (find_nut_info("load.off.delay")) {
/* Adds default with a delay value of '0' (= immediate) */
dstate_addcmd("load.off");
Expand Down

0 comments on commit c641cff

Please sign in to comment.