mirror of https://github.com/mikaku/Monitorix.git
Merge branch 'master' of github.com:mikaku/Monitorix
This commit is contained in:
commit
32848627a0
|
@ -153,9 +153,7 @@ sub gensens_update {
|
||||||
$val = <IN>;
|
$val = <IN>;
|
||||||
$val = trim($val);
|
$val = trim($val);
|
||||||
$unit = $gensens->{unit}->{$str} || 0;
|
$unit = $gensens->{unit}->{$str} || 0;
|
||||||
$c = () = $unit =~ /0/g;
|
$val /= $unit if $unit != 0;
|
||||||
$val /= 10**$c if $unit > 1;
|
|
||||||
$val *= 10**$c if $unit > 0 && $unit < 1;
|
|
||||||
close(IN);
|
close(IN);
|
||||||
} else {
|
} else {
|
||||||
logger("$myself: ERROR: unable to open '$gensens->{desc}->{$str}'.");
|
logger("$myself: ERROR: unable to open '$gensens->{desc}->{$str}'.");
|
||||||
|
|
Loading…
Reference in New Issue