diff options
author | Alexander Chemeris <Alexander.Chemeris@gmail.com> | 2013-09-06 00:35:57 +0400 |
---|---|---|
committer | Alexander Chemeris <Alexander.Chemeris@gmail.com> | 2013-09-06 00:35:57 +0400 |
commit | 0b8aa00bc7b8233fad019fb92d63066b1be9b8e4 (patch) | |
tree | c570da132ac2214f816317424a07904cebe8dd33 /Transceiver52M/sigProcLib.cpp | |
parent | 1ed2e27d1931ee940ac67d818f40465edfef1c4e (diff) |
conditional load testing (selected at compile time), turned on by default.achemeris/load_testing
Diffstat (limited to 'Transceiver52M/sigProcLib.cpp')
-rw-r--r-- | Transceiver52M/sigProcLib.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Transceiver52M/sigProcLib.cpp b/Transceiver52M/sigProcLib.cpp index eaad898..be8b180 100644 --- a/Transceiver52M/sigProcLib.cpp +++ b/Transceiver52M/sigProcLib.cpp @@ -1143,18 +1143,25 @@ static int detectBurst(signalVector &burst, /* Correlate */ if (!convolve(&burst, sync->sequence, &corr, CUSTOM, start, len, sps, 0)) { +#ifndef TRX_LOAD_TESTING return -1; +#endif } /* Peak detection - place restrictions at correlation edges */ *amp = fastPeakDetect(corr, toa); +#ifndef TRX_LOAD_TESTING if ((*toa < 3 * sps) || (*toa > len - 3 * sps)) return 0; +#endif /* Peak -to-average ratio */ - if (computePeakRatio(&corr, sps, *toa, *amp) < thresh) + if (computePeakRatio(&corr, sps, *toa, *amp) < thresh) { +#ifndef TRX_LOAD_TESTING return 0; +#endif + } /* Run the full peak detection when we have a burst */ *amp = peakDetect(corr, toa, NULL); |