diff options
Diffstat (limited to 'Transceiver52M/radioInterface.cpp')
-rw-r--r-- | Transceiver52M/radioInterface.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/Transceiver52M/radioInterface.cpp b/Transceiver52M/radioInterface.cpp index c1d43b6..316779f 100644 --- a/Transceiver52M/radioInterface.cpp +++ b/Transceiver52M/radioInterface.cpp @@ -75,6 +75,8 @@ RadioInterface::~RadioInterface(void) mRadio->stop(); close(); + delete mAlignRadioServiceLoopThread; + for (i = 0; i < CHAN_M; i++) { if (rcvBuffer[i] != NULL) delete rcvBuffer[i]; @@ -160,17 +162,15 @@ bool RadioInterface::start() if (mOn) return false; - LOG(INFO) << "starting radio interface..."; + mOn = true; #ifdef USRP1 - mAlignRadioServiceLoopThread.start((void * (*)(void*))AlignRadioServiceLoopAdapter, - (void*)this); + mAlignRadioServiceLoopThread = new Thread(32768); + mAlignRadioServiceLoopThread->start((void * (*)(void*))AlignRadioServiceLoopAdapter, + (void*)this); #endif writeTimestamp = mRadio->initialWriteTimestamp(); readTimestamp = mRadio->initialReadTimestamp(); mRadio->start(); - LOG(DEBUG) << "Radio started"; - mRadio->updateAlignment(writeTimestamp-10000); - mRadio->updateAlignment(writeTimestamp-10000); for (i = 0; i < CHAN_M; i++) { sendBuffer[i] = new float[8*2*INCHUNK]; @@ -180,7 +180,10 @@ bool RadioInterface::start() /* Init I/O specific variables if applicable */ init(); - mOn = true; + mRadio->start(); + LOG(DEBUG) << "Radio started"; + mRadio->updateAlignment(writeTimestamp-10000); + mRadio->updateAlignment(writeTimestamp-10000); return true; } |