From b5057b87e8887e3f1d9154bc8dcd8f10622fa24c Mon Sep 17 00:00:00 2001 From: colt Date: Tue, 2 Aug 2022 18:44:28 -0500 Subject: [PATCH] Report an amplitude of value -INFINITY as is instead of showing it as -0.0 dBfs --- host/hackrf-tools/src/hackrf_transfer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/host/hackrf-tools/src/hackrf_transfer.c b/host/hackrf-tools/src/hackrf_transfer.c index 76d15beb..df32e3d5 100644 --- a/host/hackrf-tools/src/hackrf_transfer.c +++ b/host/hackrf-tools/src/hackrf_transfer.c @@ -1149,7 +1149,7 @@ int main(int argc, char** argv) { // This is only an approximate measure, to assist getting receive levels right: double full_scale_ratio = ((double)stream_amplitude_now / (byte_count_now ? byte_count_now : 1))/128; double dB_full_scale_ratio = 10*log10(full_scale_ratio); - if (dB_full_scale_ratio > 1 || dB_full_scale_ratio == -INFINITY) // Guard against ridiculous reports + if (dB_full_scale_ratio > 1) // Guard against ridiculous reports dB_full_scale_ratio = -0.0; fprintf(stderr, "%4.1f MiB / %5.3f sec = %4.1f MiB/second, amplitude %3.1f dBfs", (byte_count_now / 1e6f),