mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-14 12:10:34 +00:00
update the AD9361 in_voltage1_hardwaregain only if the gain mode is set to manual
This commit is contained in:
parent
e6f3222e4a
commit
c2141f99fb
@ -508,10 +508,13 @@ bool config_ad9361_rx_local(uint64_t bandwidth_,
|
||||
}
|
||||
else
|
||||
{
|
||||
ret = iio_device_attr_write_double(ad9361_phy_B, "in_voltage0_hardwaregain", rf_gain_rx1_);
|
||||
if (gain_mode_rx2_ == "manual")
|
||||
{
|
||||
ret = iio_device_attr_write_double(ad9361_phy_B, "in_voltage1_hardwaregain", rf_gain_rx2_);
|
||||
if (ret < 0)
|
||||
{
|
||||
std::cout << "Failed to set in_voltage0_hardwaregain: " << ret << '\n';
|
||||
std::cout << "Failed to set in_voltage1_hardwaregain: " << ret << '\n';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user