All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit eedc5492 authored by Mike Hibler's avatar Mike Hibler

A value of 0 for amps/watts is perfectly possible

parent c1c24bfa
......@@ -169,9 +169,9 @@ sub dostatus(@) {
}
my $msg = "$ctrl: ";
$msg .= $status{current} . "A, "
if ($docurrent && $status{current});
if ($docurrent && defined($status{current}));
$msg .= $status{power} . "W, "
if ($dopower && $status{power});
if ($dopower && defined($status{power}));
if ($dotemps &&
defined($status{tempF}) || defined($status{tempC})) {
my $temp = $status{tempF};
......
......@@ -399,9 +399,9 @@ sub dostatus(@) {
}
print "$ctrl: ";
print $status{current}, " Amps, "
if $status{current};
if defined($status{current});
print $status{power}, " Watts, "
if $status{power};
if defined($status{power});
if (defined($status{tempF}) || defined($status{tempC})) {
my $temp = $status{tempF};
if (!defined($temp)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment