From 577cd020c16e8d74d7464ea59157e7a44cbb6683 Mon Sep 17 00:00:00 2001 From: Tom Tsou Date: Mon, 18 May 2015 13:57:54 -0700 Subject: 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 --- Transceiver52M/Transceiver.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'Transceiver52M/Transceiver.cpp') 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; } -- cgit v1.2.3