Closed brianmwaters closed 9 months ago
Looks good to me. We might at some point want to consider switching to runtime feature-detection, e.g.
int __attribute__((weak)) rtlsdr_set_bias_tee(rtlsdr_dev_t *dev, int on);
if (!rtlsdr_set_bias_tee) {
// ...
}
Would you all consider a patch (I think it would have to be in the main SoapySDR repo?) that makes writeSetting
return an error in the case that the user passes a key that hasn't been defined?
On second thought, breakage might not be that bad. Client code that doesn't check for errors won't be affected, and client code that does, probably really does want to know when its settings aren't being set.
Hi, sorry to pester, but is there anything holding this up? I'd be happy to change something, but last I heard was a LGTM. Thanks btw
Requires a fork of librtlsdr with dithering support (like this one), but there's a compile-time check so SoapyRTLSDR can still build when support isn't available.
I did notice that
writeSetting("dithering")
silently does nothing when the underlying librtlsdr doesn't have dithering support, but this also seems to be the case when you pass junk strings like "foo". I'm not sure if this is desired behavior, but an error message would be helpful (though adding one might break existing code).