host: libbladeRF/bladerf2: fix TX atten cache scale (#32)

This value needs to be scaled before going into the cache.
This commit is contained in:
Rey Tucker 2018-04-12 19:21:43 -04:00 • committed by Rey Tucker
commit 98442e2187

View file

@ -1690,7 +1690,7 @@ static int bladerf2_set_gain(struct bladerf *dev, bladerf_channel ch, int gain)
val = (int)-_clamp_to_range(&range, gain);
if (board_data->tx_mute[ch >> 1]) {
status = _set_tx_gain_cache(dev, ch, val);
status = _set_tx_gain_cache(dev, ch, val * 1000);
if (status < 0) {
RETURN_ERROR_AD9361("_set_tx_gain_cache", status);
}