mirror of
https://github.com/f4exb/sdrangel.git
synced 2026-06-05 07:24:44 -04:00
dB calculator: add floor value (default -100.0dB) when argument is 0
This commit is contained in:
+2
-2
@@ -17,7 +17,7 @@
|
||||
#include "util/db.h"
|
||||
#include <cmath>
|
||||
|
||||
Real CalcDb::dbPower(Real magsq)
|
||||
Real CalcDb::dbPower(Real magsq, Real floordB)
|
||||
{
|
||||
if (magsq > 0)
|
||||
{
|
||||
@@ -25,6 +25,6 @@ Real CalcDb::dbPower(Real magsq)
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
return floordB;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user