Don't try to log signal peak power if no peaks recorded.

This commit is contained in:
Oliver Jowett 2015-02-06 13:27:47 +00:00
parent 965ac96493
commit 704d8aaffb

View file

@ -96,8 +96,10 @@ void display_stats(struct stats *st) {
10 * log10(st->signal_power_sum / st->signal_power_count)); 10 * log10(st->signal_power_sum / st->signal_power_count));
} }
if (st->peak_signal_power) {
printf(" %.1f dBFS peak signal power\n", printf(" %.1f dBFS peak signal power\n",
10 * log10(st->peak_signal_power)); 10 * log10(st->peak_signal_power));
}
printf(" %u messages with signal power above -3dBFS\n", printf(" %u messages with signal power above -3dBFS\n",
st->strong_signal_count); st->strong_signal_count);