aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M/Transceiver.cpp
diff options
context:
space:
mode:
authorTom Tsou <tom.tsou@ettus.com>2015-05-18 13:57:54 -0700
committerTom Tsou <tom.tsou@ettus.com>2015-05-18 16:35:35 -0700
commit577cd020c16e8d74d7464ea59157e7a44cbb6683 (patch)
treecdf1912d07046590d17c832a35e64c29262f194e /Transceiver52M/Transceiver.cpp
parent88bbf1aafd4c5701608a319693a8e69222981eba (diff)
sigproc: Add clipping detection on RACH and TSC input
Alert user of overdriven burst 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@ettus.com>
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;
}