Skip to content

Commit 9bcab09

Browse files
author
Scott Powell
committed
* noise floor lower bound now clamped to -120
1 parent 647d712 commit 9bcab09

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/helpers/RadioLibWrappers.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ void RadioLibWrapper::loop() {
6363
}
6464
} else if (_num_floor_samples >= NUM_NOISE_FLOOR_SAMPLES && _floor_sample_sum != 0) {
6565
_noise_floor = _floor_sample_sum / NUM_NOISE_FLOOR_SAMPLES;
66+
if (_noise_floor < -120) {
67+
_noise_floor = -120; // clamp to lower bound of -120dBi
68+
}
6669
_floor_sample_sum = 0;
6770

6871
MESH_DEBUG_PRINTLN("RadioLibWrapper: noise_floor = %d", (int)_noise_floor);

0 commit comments

Comments
 (0)