mirror of https://github.com/PentHertz/srsLTE.git
rf_uhd_rfnoc: fix compilation for UHD before 3.15
the enable_rx_timestamps() for the radio_ctrl object has only been
introduced in Nov 2019 for UHD 3.15 and therefore needs
to be excluded when compiling for 3.14 and below.
Note: According to the original UHD commit in
67dbaa41f2 (diff-60a9387c0fc8406fd5b39fa995dd8c14)
it looks like the Rx timestamps are disabled by default
for UHD versions before 3.15
This commit fixes #1602
This commit is contained in:
parent
51dc82a735
commit
5867668c0c
|
@ -39,6 +39,7 @@
|
||||||
#include <uhd/rfnoc/radio_ctrl.hpp>
|
#include <uhd/rfnoc/radio_ctrl.hpp>
|
||||||
#include <uhd/usrp/multi_usrp.hpp>
|
#include <uhd/usrp/multi_usrp.hpp>
|
||||||
#include <uhd/utils/safe_main.hpp>
|
#include <uhd/utils/safe_main.hpp>
|
||||||
|
#include <uhd/version.hpp>
|
||||||
|
|
||||||
// Load custom RFNOC blocks if available
|
// Load custom RFNOC blocks if available
|
||||||
#ifdef UHD_ENABLE_CUSTOM_RFNOC
|
#ifdef UHD_ENABLE_CUSTOM_RFNOC
|
||||||
|
@ -197,7 +198,10 @@ private:
|
||||||
UHD_LOG_DEBUG(radio_id[i], "Setting TX antenna: " << TX_ANTENNA_PORT);
|
UHD_LOG_DEBUG(radio_id[i], "Setting TX antenna: " << TX_ANTENNA_PORT);
|
||||||
radio_ctrl[i]->set_tx_antenna(TX_ANTENNA_PORT, 0);
|
radio_ctrl[i]->set_tx_antenna(TX_ANTENNA_PORT, 0);
|
||||||
|
|
||||||
|
#if UHD_VERSION >= 3150000
|
||||||
|
// API call introduced in UHD 3.15 (commit 67dbaa41)
|
||||||
radio_ctrl[i]->enable_rx_timestamps(true, 0);
|
radio_ctrl[i]->enable_rx_timestamps(true, 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (spp) {
|
if (spp) {
|
||||||
radio_ctrl[i]->set_arg("spp", spp);
|
radio_ctrl[i]->set_arg("spp", spp);
|
||||||
|
|
Loading…
Reference in New Issue