sigProcLib: detectAnyBurst() family: Use struct to gather all out params
Currently we have 2 out parameters, but in forthcoming commits will add
a third one. All those functions already have too many parameters, so
let's put together all the output params in a struct to pass them easily
and make it easier to understand they are the estimated output values.
Related: OS#4006
Change-Id: I05cfa0ceaa2e633a5e6e404e2eae497ff4442dea
diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp
index 4462cdd..5c5707b 100644
--- a/Transceiver52M/Transceiver.cpp
+++ b/Transceiver52M/Transceiver.cpp
@@ -575,8 +575,8 @@
bool Transceiver::pullRadioVector(size_t chan, struct trx_ul_burst_ind *bi)
{
int rc;
- complex amp;
- float toa, max = -1.0, avg = 0.0;
+ struct estim_burst_params ebp;
+ float max = -1.0, avg = 0.0;
unsigned max_toa;
int max_i = -1;
signalVector *burst;
@@ -654,7 +654,7 @@
mMaxExpectedDelayAB : mMaxExpectedDelayNB;
/* 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, max_toa, &ebp);
if (rc <= 0) {
if (rc == -SIGERR_CLIP)
LOG(WARNING) << "Clipping detected on received RACH or Normal Burst";
@@ -664,8 +664,8 @@
}
type = (CorrType) rc;
- bi->toa = toa;
- rxBurst = demodAnyBurst(*burst, mSPSRx, amp, toa, type);
+ bi->toa = ebp.toa;
+ rxBurst = demodAnyBurst(*burst, mSPSRx, ebp.amp, ebp.toa, type);
/* EDGE demodulator returns 444 (gSlotLen * 3) bits */
if (rxBurst->size() == EDGE_BURST_NBITS)