mirror of
https://gitea.osmocom.org/cellular-infrastructure/osmo-trx.git
synced 2025-11-14 19:05:43 +00:00
Transceiver: Simplify code on early error return when calling detectAnyBurst
We get rid of one branch and simplify code logic. Change-Id: I026e35262bfe42c3d23ebdc06d84e4908a8380e2
This commit is contained in:
@@ -650,20 +650,16 @@ bool Transceiver::pullRadioVector(size_t chan, struct trx_ul_burst_ind *bi)
|
|||||||
|
|
||||||
/* Detect normal or RACH bursts */
|
/* Detect normal or RACH bursts */
|
||||||
rc = detectAnyBurst(*burst, mTSC, BURST_THRESH, mSPSRx, type, amp, toa, max_toa);
|
rc = detectAnyBurst(*burst, mTSC, BURST_THRESH, mSPSRx, type, amp, toa, max_toa);
|
||||||
|
if (rc <= 0) {
|
||||||
if (rc > 0) {
|
if (rc == -SIGERR_CLIP)
|
||||||
type = (CorrType) rc;
|
|
||||||
} else if (rc <= 0) {
|
|
||||||
if (rc == -SIGERR_CLIP) {
|
|
||||||
LOG(WARNING) << "Clipping detected on received RACH or Normal Burst";
|
LOG(WARNING) << "Clipping detected on received RACH or Normal Burst";
|
||||||
} else if (rc != SIGERR_NONE) {
|
else if (rc != SIGERR_NONE)
|
||||||
LOG(WARNING) << "Unhandled RACH or Normal Burst detection error";
|
LOG(WARNING) << "Unhandled RACH or Normal Burst detection error";
|
||||||
}
|
|
||||||
|
|
||||||
delete radio_burst;
|
delete radio_burst;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type = (CorrType) rc;
|
||||||
bi->toa = toa;
|
bi->toa = toa;
|
||||||
rxBurst = demodAnyBurst(*burst, mSPSRx, amp, toa, type);
|
rxBurst = demodAnyBurst(*burst, mSPSRx, amp, toa, type);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user