Skip to content

Commit

Permalink
drivers/riello_usb.c: do not set bogus "ups.temperature" as 0, log lo…
Browse files Browse the repository at this point in the history
…w-prio message instead [networkupstools#1692]
  • Loading branch information
jimklimov committed Nov 3, 2022
1 parent 73d2530 commit 786b5ae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/riello_usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1107,7 +1107,10 @@ void upsdrv_updateinfo(void)
}

if (DevData.Tsystem == 255) {
dstate_setinfo("ups.temperature", "%u", 0 );
/*dstate_setinfo("ups.temperature", "%u", 0);*/
upsdebugx(4, "Reported temperature value is 0xFF, "
"probably meaning \"-1\" for error or "
"missing sensor - ignored");
}
else if (DevData.Tsystem < 0xFF) {
dstate_setinfo("ups.temperature", "%u", DevData.Tsystem);
Expand Down

0 comments on commit 786b5ae

Please sign in to comment.