Add missing arguments to control RX & TX bias
Hi,
This is a temptative PR that implements settings and device arguments to control Bias T during TX and RX. They are called bias_tx and bias_rx respectively. The rationale behind this is that a setting named bias_tx already existed, and it made sense to keep separate settings (and device arguments) to configure this option.
Looking forward for your feedback,
Looks good in general. I know hackrf can be a little sensitive to settings being changed and switching between tx and rx modes.
Take a look at these sections in HackRF_Streaming.cpp and how they conditionally apply settings, you may need to so something similar to keep the switching happy.
// determine what (if any) settings need to be changed for RX; only applicable if there is both a source and sink block
// determine what (if any) settings need to be changed for TX; only applicable if there is both a source and sink block
Good catch, I had no idea. I was setting the antenna voltage unconditionally prior to starting streaming. I've just added some changes to keep certain _current_bias flag that is checked before starting streaming. Note this still needs to be done even if we do not switch between TX / RX: these setting may be defined as a device argument (which is the case for SigDigger) and activateStream could be the first opportunity we have to apply the bias config.