You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling bladeRF_SoapySDR::setFrequency() with a "timestamp" keyword argument currently requires the timestamp to be in units of "bladeRF ticks". The rest of SoapySDR uses units of nanoseconds. For consistency, I propose that the "timestamp" keyword argument should also be in nanoseconds. Timestamps returned by bladeRF_SoapySDR::readStream() are already in nanoseconds and having consistent units will allow timestamps from received buffers to be directly used when scheduling frequency changes.
Philosophically, an argument can also be made that Soapy should be hiding backend specific details from the user, so BladeRF specific units should be hidden.
The necessary change to the source is:
diff --git a/bladeRF_Settings.cpp b/bladeRF_Settings.cpp
index 3d06548..4f95ef1 100644
--- a/bladeRF_Settings.cpp
+++ b/bladeRF_Settings.cpp
@@ -490,6 +490,9 @@ void bladeRF_SoapySDR::setFrequency(const int direction, const size_t channel, c
auto value = args.find("timestamp");
long long timestamp = value == args.end() ? 0 : std::stoll(value->second);
+ if(timestamp != 0) {
+ timestamp = _timeNsToRxTicks(timestamp);
+ }
retune(direction, channel, timestamp, quickTuneIter->second);
return;
Checking against 0 is a convenience, in that allows "BLADERF_RETUNE_NOW" to still function. I'm not aware that SoapySDR has an equivalent function that BLADERF_RETUNE_NOW can be mapped to in order to hide this bladeRF specifity.
The text was updated successfully, but these errors were encountered:
Calling bladeRF_SoapySDR::setFrequency() with a "timestamp" keyword argument currently requires the timestamp to be in units of "bladeRF ticks". The rest of SoapySDR uses units of nanoseconds. For consistency, I propose that the "timestamp" keyword argument should also be in nanoseconds. Timestamps returned by bladeRF_SoapySDR::readStream() are already in nanoseconds and having consistent units will allow timestamps from received buffers to be directly used when scheduling frequency changes.
Philosophically, an argument can also be made that Soapy should be hiding backend specific details from the user, so BladeRF specific units should be hidden.
The necessary change to the source is:
Checking against 0 is a convenience, in that allows "BLADERF_RETUNE_NOW" to still function. I'm not aware that SoapySDR has an equivalent function that BLADERF_RETUNE_NOW can be mapped to in order to hide this bladeRF specifity.
The text was updated successfully, but these errors were encountered: