From 7f81f44427768d13beb93fc09cf829ec46e319d1 Mon Sep 17 00:00:00 2001 From: Andre Puschmann Date: Fri, 20 Nov 2020 17:50:46 +0100 Subject: [PATCH] rf_uhd: treat N3xx like the X3xx and do not set timespec on every burst iteration the N310 too doesn't seem to like setting the timespec for each call to send in a single burst --- lib/src/phy/rf/rf_uhd_imp.cc | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/src/phy/rf/rf_uhd_imp.cc b/lib/src/phy/rf/rf_uhd_imp.cc index 83ca4fbc8..6e219e47c 100644 --- a/lib/src/phy/rf/rf_uhd_imp.cc +++ b/lib/src/phy/rf/rf_uhd_imp.cc @@ -82,6 +82,11 @@ const std::set RF_UHD_IMP_PROHIBITED_STREAM_REMAKE = {DEVNAME_X300, */ const std::set RF_UHD_IMP_PROHIBITED_STOP_START = {DEVNAME_B200}; +/** + * List of devices that work better if timespec is sent at the start of the burst only + */ +const std::set RF_UHD_IMP_TIMESPEC_AT_BURST_START_ONLY = {DEVNAME_X300, DEVNAME_N300}; + /** * Defines a delay used between the current USRP time and the start of the transmission. This value needs to be high * enough for being distributed to all the devices before the time expires and short enough to be as seamless as @@ -1342,11 +1347,13 @@ int rf_uhd_send_timed_multi(void* h, // Set start of burst. Time spec only for the first packet in the burst md.start_of_burst = is_start_of_burst; - // X300 devices work better if Timespec is sent at the start of the burst only - if (!handler->devname.compare(DEVNAME_X300)) { - md.has_time_spec = is_start_of_burst and has_time_spec; - } else { + + // some devices don't like timestamps in each call + if (RF_UHD_IMP_TIMESPEC_AT_BURST_START_ONLY.count(handler->devname) == 0) { md.has_time_spec = is_start_of_burst or has_time_spec; + } else { + // only set time for start + md.has_time_spec = is_start_of_burst and has_time_spec; } // middle packets are never end of burst, last one as defined