Browse Source
reset noise_floor sampling after agc reset
pull/1743/head
Wessel Nieboer
4 months ago
committed by
Wessel Nieboer
No known key found for this signature in database
GPG Key ID: 27BB1C3D63DEEFFF
1 changed files with
8 additions and
0 deletions
-
src/helpers/radiolib/RadioLibWrappers.cpp
|
|
@ -63,6 +63,14 @@ void RadioLibWrapper::resetAGC() { |
|
|
|
|
|
|
|
|
doResetAGC(); |
|
|
doResetAGC(); |
|
|
state = STATE_IDLE; // trigger a startReceive()
|
|
|
state = STATE_IDLE; // trigger a startReceive()
|
|
|
|
|
|
|
|
|
|
|
|
// Reset noise floor sampling so it reconverges from scratch.
|
|
|
|
|
|
// Without this, a stuck _noise_floor of -120 makes the sampling threshold
|
|
|
|
|
|
// too low (-106) to accept normal samples (~-105), self-reinforcing the
|
|
|
|
|
|
// stuck value even after the receiver has recovered.
|
|
|
|
|
|
_noise_floor = 0; |
|
|
|
|
|
_num_floor_samples = 0; |
|
|
|
|
|
_floor_sample_sum = 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void RadioLibWrapper::loop() { |
|
|
void RadioLibWrapper::loop() { |
|
|
|