mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix dbm calculation to return -60 instead of 0 (#14858)
* Fix calculation * Update iosxr_asr9001.json * Update iosxr_asr9001.json * Update iosxr_asr9001.json * Update iosxr_asr9001.json * Update iosxr_asr9001.json * Update iosxr_asr9010.json * Update iosxr_asr9001.json * Update iosxr_asr9001.json * Update iosxr_asr9001.json * Update iosxr_asr9001.json * rebuild using SNMPRec * Update iosxr_asr9001.json * Update iosxr_asr9001.json * Update iosxr_asr9010.json * Update iosxr_asr9901.json * Update iosxr_asr9001.json * Update iosxr_asr9010.json * Update iosxr_asr9901.json * Update iosxr_asr9010.json * Update iosxr_asr9001.json * Update iosxr_asr9010.json * Update iosxr_asr9901.json * Update iosxr_asr9001.json * Update iosxr_asr9001.json * Update iosxr_asr9001.json * Update iosxr_asr9001.json * Update iosxr_asr9001.json * Update iosxr_asr9001.json * Update iosxr_asr9010.json * Update iosxr_asr9901.json
This commit is contained in:
@@ -820,7 +820,7 @@ function string_to_float($value)
|
||||
*/
|
||||
function uw_to_dbm($value)
|
||||
{
|
||||
return $value == 0 ? $value : 10 * log10($value / 1000);
|
||||
return $value == 0 ? -60 : 10 * log10($value / 1000);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -829,7 +829,7 @@ function uw_to_dbm($value)
|
||||
*/
|
||||
function mw_to_dbm($value)
|
||||
{
|
||||
return $value == 0 ? $value : 10 * log10($value);
|
||||
return $value == 0 ? -60 : 10 * log10($value);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user