diff options
author | Tom Tsou <tom@tsou.cc> | 2014-12-18 15:26:57 -0800 |
---|---|---|
committer | Alexander Chemeris <Alexander.Chemeris@gmail.com> | 2015-05-14 00:15:06 -0400 |
commit | a6e2d6f9a109662ff4e95bff1d49dfa00c4b164c (patch) | |
tree | 82d91caabe30fb31a2b6192e817395b4eea7fae1 /Transceiver52M/Transceiver.cpp | |
parent | 456cf7f068e7244c4558c0e6eaa02dcbdfdc210b (diff) |
Transceiver52M: Add clipping detection on RACH input
Alert user of overdriven RACH input indicated by a positive
threshold detector result. This indication serves as notification
that the receive RF gain level is too high for the configured
transceiver setup.
Signed-off-by: Tom Tsou <tom@tsou.cc>
Diffstat (limited to 'Transceiver52M/Transceiver.cpp')
-rw-r--r-- | Transceiver52M/Transceiver.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp index 7f3187e..f8ed51a 100644 --- a/Transceiver52M/Transceiver.cpp +++ b/Transceiver52M/Transceiver.cpp @@ -523,10 +523,18 @@ SoftVector *Transceiver::pullRadioVector(GSM::Time &wTime, int &RSSI, else success = detectRACH(state, *burst, amp, toa); - if (!success) { + if (success == 0) { state->mNoises.insert(avg); delete radio_burst; return NULL; + } else if (success < 0) { + if (success == -SIGERR_CLIP) { + LOG(ALERT) << "Clipping detected on RACH input"; + } else { + LOG(ALERT) << "Unhandled RACH error"; + } + delete radio_burst; + return NULL; } /* Demodulate and set output info */ |