[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] r10207 - openbts/trunk/Transceiver
From: |
jcorgan |
Subject: |
[Commit-gnuradio] r10207 - openbts/trunk/Transceiver |
Date: |
Mon, 12 Jan 2009 11:07:12 -0700 (MST) |
Author: jcorgan
Date: 2009-01-12 11:07:10 -0700 (Mon, 12 Jan 2009)
New Revision: 10207
Modified:
openbts/trunk/Transceiver/Makefile.am
openbts/trunk/Transceiver/USRPDevice.cpp
openbts/trunk/Transceiver/USRPDevice.h
Log:
Fixes to work with the new daughterboard API
Modified: openbts/trunk/Transceiver/Makefile.am
===================================================================
--- openbts/trunk/Transceiver/Makefile.am 2009-01-12 07:11:52 UTC (rev
10206)
+++ openbts/trunk/Transceiver/Makefile.am 2009-01-12 18:07:10 UTC (rev
10207)
@@ -21,7 +21,7 @@
include $(top_srcdir)/Makefile.common
AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) -I$(USRP_INCLUDEDIR)
-CXX_FLAGS = -O3 -g
+CXX_FLAGS = -O3 -g -lpthread
rev2dir = $(datadir)/usrp/rev2
rev4dir = $(datadir)/usrp/rev4
Modified: openbts/trunk/Transceiver/USRPDevice.cpp
===================================================================
--- openbts/trunk/Transceiver/USRPDevice.cpp 2009-01-12 07:11:52 UTC (rev
10206)
+++ openbts/trunk/Transceiver/USRPDevice.cpp 2009-01-12 18:07:10 UTC (rev
10207)
@@ -137,8 +137,8 @@
double masterClockRate = (double) 64.0e6;
decimRate = (unsigned int) round(masterClockRate/_desiredSampleRate);
actualSampleRate = masterClockRate/decimRate;
- m_uRx = NULL;
- m_uTx = NULL;
+ m_uRx.reset();
+ m_uTx.reset();
#ifdef SWLOOPBACK
samplePeriod = 1.0e6/actualSampleRate;
@@ -156,7 +156,7 @@
#ifndef SWLOOPBACK
string rbf = "std_inband.rbf";
//string rbf = "inband_1rxhb_1tx.rbf";
- m_uRx = NULL;
+ m_uRx.reset();
if (!skipRx) {
try {
m_uRx = (usrp_standard_rx::make(0,decimRate,1,-1,
@@ -166,11 +166,15 @@
catch(...) {
COUT("make failed on Rx");
- delete m_uRx;
return false;
}
}
+ if (!m_uTx) {
+ COUT("make failed on Rx");
+ return false;
+ }
+
try {
m_uTx = (usrp_standard_tx::make(0,decimRate*2,1,-1,
1024,16*8,rbf));
@@ -178,10 +182,14 @@
catch(...) {
COUT("make failed on Tx");
- delete m_uTx;
return false;
}
+ if (!m_uTx) {
+ COUT("make failed on Tx");
+ return false;
+ }
+
if (!skipRx) m_uRx->stop();
m_uTx->stop();
Modified: openbts/trunk/Transceiver/USRPDevice.h
===================================================================
--- openbts/trunk/Transceiver/USRPDevice.h 2009-01-12 07:11:52 UTC (rev
10206)
+++ openbts/trunk/Transceiver/USRPDevice.h 2009-01-12 18:07:10 UTC (rev
10207)
@@ -39,8 +39,8 @@
private:
double desiredSampleRate; ///< the desired sampling rate
- usrp_standard_rx* m_uRx; ///< the USRP receiver
- usrp_standard_tx* m_uTx; ///< the USRP transmitter
+ usrp_standard_rx_sptr m_uRx; ///< the USRP receiver
+ usrp_standard_tx_sptr m_uTx; ///< the USRP transmitter
double actualSampleRate; ///< the actual USRP sampling rate
unsigned int decimRate; ///< the USRP decimation rate
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Commit-gnuradio] r10207 - openbts/trunk/Transceiver,
jcorgan <=