From 5867668c0cf2b59525e659b3d7640f4fe6ce675c Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Tue, 4 Aug 2020 11:01:55 +0200 Subject: [PATCH] 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 https://github.com/EttusResearch/uhd/commit/67dbaa41f21fb8610444fd8a61b14af78a4ce48c#diff-60a9387c0fc8406fd5b39fa995dd8c14 it looks like the Rx timestamps are disabled by default for UHD versions before 3.15 This commit fixes #1602 --- lib/src/phy/rf/rf_uhd_rfnoc.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/src/phy/rf/rf_uhd_rfnoc.h b/lib/src/phy/rf/rf_uhd_rfnoc.h index 64b3845c4..5fc890003 100644 --- a/lib/src/phy/rf/rf_uhd_rfnoc.h +++ b/lib/src/phy/rf/rf_uhd_rfnoc.h @@ -39,6 +39,7 @@ #include #include #include +#include // Load custom RFNOC blocks if available #ifdef UHD_ENABLE_CUSTOM_RFNOC @@ -197,7 +198,10 @@ private: UHD_LOG_DEBUG(radio_id[i], "Setting TX antenna: " << TX_ANTENNA_PORT); 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); +#endif if (spp) { radio_ctrl[i]->set_arg("spp", spp);