From 9664c3a6e7f6bb1f83c2a55d6e6b1c7b59a99024 Mon Sep 17 00:00:00 2001 From: Alexander Chemeris Date: Wed, 20 Apr 2016 08:42:58 +0300 Subject: transceiver: Do not pass transceiver state struct to function where it's not used. --- Transceiver52M/Transceiver.cpp | 11 +++++------ Transceiver52M/Transceiver.h | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp index a19d770..7f13a09 100644 --- a/Transceiver52M/Transceiver.cpp +++ b/Transceiver52M/Transceiver.cpp @@ -531,8 +531,8 @@ Transceiver::CorrType Transceiver::expectedCorrType(GSM::Time currTime, } } -int Transceiver::detectBurst(TransceiverState *state, signalVector &burst, - complex &, float &toa, CorrType type) +int Transceiver::detectBurst(signalVector &burst, + complex &, float &toa, CorrType type) { float threshold = 5.0, rc = 0; @@ -567,8 +567,7 @@ int Transceiver::detectBurst(TransceiverState *state, signalVector &burst, /* * Demodulate GMSK by direct rotation and soft slicing. */ -SoftVector *Transceiver::demodulate(TransceiverState *state, - signalVector &burst, complex amp, +SoftVector *Transceiver::demodulate(signalVector &burst, complex amp, float toa, CorrType type) { if (type == EDGE) @@ -666,7 +665,7 @@ SoftVector *Transceiver::pullRadioVector(GSM::Time &wTime, double &RSSI, bool &i } /* Detect normal or RACH bursts */ - rc = detectBurst(state, *burst, amp, toa, type); + rc = detectBurst(*burst, amp, toa, type); if (rc > 0) { type = (CorrType) rc; @@ -683,7 +682,7 @@ SoftVector *Transceiver::pullRadioVector(GSM::Time &wTime, double &RSSI, bool &i timingOffset = toa / mSPSRx; - bits = demodulate(state, *burst, amp, toa, type); + bits = demodulate(*burst, amp, toa, type); delete radio_burst; return bits; diff --git a/Transceiver52M/Transceiver.h b/Transceiver52M/Transceiver.h index 013f13b..4373dc7 100644 --- a/Transceiver52M/Transceiver.h +++ b/Transceiver52M/Transceiver.h @@ -212,11 +212,11 @@ private: void writeClockInterface(void); /** Detectbursts */ - int detectBurst(TransceiverState *state, signalVector &burst, + int detectBurst(signalVector &burst, complex &, float &toa, CorrType type); /** Demodulate burst and output soft bits */ - SoftVector *demodulate(TransceiverState *state, signalVector &burst, + SoftVector *demodulate(signalVector &burst, complex amp, float toa, CorrType type); int mSPSTx; ///< number of samples per Tx symbol -- cgit v1.2.3