From afb04f8b631b6727db0bc62802f2bf50cf39503a Mon Sep 17 00:00:00 2001 From: Thomas Tsou Date: Tue, 20 Mar 2012 16:29:43 -0400 Subject: multi-arfcn, trx: fix infinite energy threshold bug This fixes a bug where the energy threshold may reach infinity. The transceiver energy detection threshold increase is dependent on elapsed frames and the previous false detection time. If we assume a (0,0) start time with the actual start time - randomly determined - it's possible to get very large elapsed frame counts at start. Once the threshold hits 'inf' further calculations are impossible and transceiver is locked out from use. Use the actual start time for initializing variables so we avoid this scenario. Signed-off-by: Thomas Tsou --- Transceiver52M/DriveLoop.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Transceiver52M/DriveLoop.h') diff --git a/Transceiver52M/DriveLoop.h b/Transceiver52M/DriveLoop.h index df54ef7..593ef58 100644 --- a/Transceiver52M/DriveLoop.h +++ b/Transceiver52M/DriveLoop.h @@ -58,6 +58,7 @@ private: Thread *mRadioDriveLoopThread; ///< thread to push/pull bursts into transmit/receive FIFO GSM::Time mTransmitDeadlineClock; ///< deadline for pushing bursts into transmit FIFO + GSM::Time mStartTime; ///< random start time of the radio clock RadioInterface *mRadioInterface; ///< associated radioInterface object double txFullScale; ///< full scale input to radio @@ -149,6 +150,8 @@ public: mChanType[m][timeslot] = comb; } + GSM::Time getStartTime() { return mStartTime; } + private: ChannelCombination mChanType[CHAN_M][8]; ///< channel types for all timeslots -- cgit v1.2.3