mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
correctly calculate limits for negative voltage sensors
git-svn-id: http://www.observium.org/svn/observer/trunk@2192 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
@@ -87,7 +87,7 @@ function sensor_low_limit($class, $current)
|
||||
$limit = $current * 0.7;
|
||||
break;
|
||||
case 'voltage':
|
||||
$limit = $current * 0.85;
|
||||
$limit = $current * (1 - (sgn($current) * 0.15));
|
||||
break;
|
||||
case 'humidity':
|
||||
$limit = "70";
|
||||
@@ -119,7 +119,7 @@ function sensor_limit($class, $current)
|
||||
$limit = $current * 1.60;
|
||||
break;
|
||||
case 'voltage':
|
||||
$limit = $current * 1.15;
|
||||
$limit = $current * (1 + (sgn($current) * 0.15));
|
||||
break;
|
||||
case 'humidity':
|
||||
$limit = "70";
|
||||
|
||||
Reference in New Issue
Block a user