mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Merge pull request #632 from laf/issue-631
Set yocto division and multiplier to 1
This commit is contained in:
@@ -69,6 +69,7 @@ if (is_array($oids))
|
|||||||
if ($entry['entPhySensorScale'] == "kilo") { $divisor = "1"; $multiplier = "1000"; }
|
if ($entry['entPhySensorScale'] == "kilo") { $divisor = "1"; $multiplier = "1000"; }
|
||||||
if ($entry['entPhySensorScale'] == "mega") { $divisor = "1"; $multiplier = "1000000"; }
|
if ($entry['entPhySensorScale'] == "mega") { $divisor = "1"; $multiplier = "1000000"; }
|
||||||
if ($entry['entPhySensorScale'] == "giga") { $divisor = "1"; $multiplier = "1000000000"; }
|
if ($entry['entPhySensorScale'] == "giga") { $divisor = "1"; $multiplier = "1000000000"; }
|
||||||
|
if ($entry['entPhySensorScale'] == "yocto") { $divisor = "1"; $multiplier = "1"; }
|
||||||
|
|
||||||
if (is_numeric($entry['entPhySensorPrecision']) && $entry['entPhySensorPrecision'] > "0") { $divisor = $divisor . str_pad('', $entry['entPhySensorPrecision'], "0"); }
|
if (is_numeric($entry['entPhySensorPrecision']) && $entry['entPhySensorPrecision'] > "0") { $divisor = $divisor . str_pad('', $entry['entPhySensorPrecision'], "0"); }
|
||||||
$current = $current * $multiplier / $divisor;
|
$current = $current * $multiplier / $divisor;
|
||||||
|
Reference in New Issue
Block a user