Transceiver: Get rid of SoftVector in struct trx_ul_burst_ind
Make the interface using trx_ul_burst_ind more implementation agnostic
as well as easier to use. For instance, we don't care about SoftVector
size one returned from pullRadioVector(); we want to use nbits instead.
As a result, we no longer spend time normalizing guard periods. While at
it, change vectorSLicer to return void since it always returns true.
Change-Id: I726e5a98a43367a22c9a4ca5cbd9eb87e6765c7a
diff --git a/Transceiver52M/sigProcLib.cpp b/Transceiver52M/sigProcLib.cpp
index fcda5fa..cff7825 100644
--- a/Transceiver52M/sigProcLib.cpp
+++ b/Transceiver52M/sigProcLib.cpp
@@ -530,19 +530,17 @@
return pulse;
}
-bool vectorSlicer(SoftVector *x)
+/* Convert -1..+1 soft bits to 0..1 soft bits */
+void vectorSlicer(float *dest, const float *src, size_t len)
{
- SoftVector::iterator xP = x->begin();
- SoftVector::iterator xPEnd = x->end();
- while (xP < xPEnd) {
- *xP = 0.5 * (*xP + 1.0f);
- if (*xP > 1.0)
- *xP = 1.0;
- if (*xP < 0.0)
- *xP = 0.0;
- xP++;
- }
- return true;
+ size_t i;
+ for (i = 0; i < len; i++) {
+ dest[i] = 0.5 * (src[i] + 1.0f);
+ if (dest[i] > 1.0)
+ dest[i] = 1.0;
+ else if (dest[i] < 0.0)
+ dest[i] = 0.0;
+ }
}
static signalVector *rotateBurst(const BitVector &wBurst,