Fix calculated dbm (#14771)

This commit is contained in:
electrocret
2023-01-04 12:13:52 -06:00
committed by GitHub
parent dc74ba03ae
commit 56f13f1a13

View File

@@ -820,7 +820,7 @@ function string_to_float($value)
*/ */
function uw_to_dbm($value) function uw_to_dbm($value)
{ {
return 10 * log10($value / 1000); return $value == 0 ? $value : 10 * log10($value / 1000);
} }
/** /**
@@ -829,7 +829,7 @@ function uw_to_dbm($value)
*/ */
function mw_to_dbm($value) function mw_to_dbm($value)
{ {
return 10 * log10($value); return $value == 0 ? $value : 10 * log10($value);
} }
/** /**