aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M/device/usrp1/USRPDevice.cpp
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-06-13 22:47:48 +0200
committerHarald Welte <laforge@gnumonks.org>2018-06-13 23:46:27 +0200
commitce70ba529cfd5c32e5c9f2652affb36d6a8d1b09 (patch)
tree1b1d947c998501923b8aaf1980c8595b82fd1d2b /Transceiver52M/device/usrp1/USRPDevice.cpp
parentcfb9dac70d6e49fd289717e9c497562ef8bdaac1 (diff)
radioDevice: Move tx_sps from derived into base class
All three derived classes use a tx_sps member, let's move this into the base class. Change-Id: I73b4aa2705c5049561e2d7b21301a0d2b3c96ced
Diffstat (limited to 'Transceiver52M/device/usrp1/USRPDevice.cpp')
-rw-r--r--Transceiver52M/device/usrp1/USRPDevice.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/Transceiver52M/device/usrp1/USRPDevice.cpp b/Transceiver52M/device/usrp1/USRPDevice.cpp
index 7f73f43..07ba1c9 100644
--- a/Transceiver52M/device/usrp1/USRPDevice.cpp
+++ b/Transceiver52M/device/usrp1/USRPDevice.cpp
@@ -58,12 +58,12 @@ const dboardConfigType dboardConfig = TXA_RXB;
const double USRPDevice::masterClockRate = 52.0e6;
-USRPDevice::USRPDevice(size_t sps)
+USRPDevice::USRPDevice(size_t tx_sps)
{
LOG(INFO) << "creating USRP device...";
- this->sps = sps;
- decimRate = (unsigned int) round(masterClockRate/((GSMRATE) * (double) sps));
+ this->tx_sps = tx_sps;
+ decimRate = (unsigned int) round(masterClockRate/((GSMRATE) * (double) tx_sps));
actualSampleRate = masterClockRate/decimRate;
rxGain = 0;
@@ -73,9 +73,9 @@ USRPDevice::USRPDevice(size_t sps)
* split sample rate Tx/Rx - 4/1 sps we need to need to
* compensate for advance rather than delay.
*/
- if (sps == 1)
+ if (tx_sps == 1)
pingOffset = 272;
- else if (sps == 4)
+ else if (tx_sps == 4)
pingOffset = 269 - 7500;
else
pingOffset = 0;
@@ -100,7 +100,7 @@ int USRPDevice::open(const std::string &, int, bool)
if (!skipRx) {
try {
m_uRx = usrp_standard_rx_sptr(usrp_standard_rx::make(
- 0, decimRate * sps, 1, -1,
+ 0, decimRate * tx_sps, 1, -1,
usrp_standard_rx::FPGA_MODE_NORMAL,
1024, 16 * 8, rbf));
m_uRx->set_fpga_master_clock_freq(masterClockRate);