aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M/Transceiver.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Transceiver52M/Transceiver.cpp')
-rw-r--r--Transceiver52M/Transceiver.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp
index 4885654..31eea60 100644
--- a/Transceiver52M/Transceiver.cpp
+++ b/Transceiver52M/Transceiver.cpp
@@ -615,8 +615,16 @@ SoftVector *Transceiver::pullRadioVector(GSM::Time &wTime, int &RSSI,
else
success = detectRACH(state, *burst, amp, toa);
- if (!success) {
- state->mNoises.insert(avg);
+ /* Update noise average if no bust detected or alert on error */
+ if (success <= 0) {
+ if (!success) {
+ state->mNoises.insert(avg);
+ } else if (success == -SIGERR_CLIP) {
+ LOG(ALERT) << "Clipping detected on RACH input";
+ } else if (success < 0) {
+ LOG(ALERT) << "Unhandled RACH error";
+ }
+
delete radio_burst;
return NULL;
}