diff options
Diffstat (limited to 'host/lib/usrp/usrp_e')
-rw-r--r-- | host/lib/usrp/usrp_e/codec_ctrl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/host/lib/usrp/usrp_e/codec_ctrl.cpp b/host/lib/usrp/usrp_e/codec_ctrl.cpp index 837219759..17262d358 100644 --- a/host/lib/usrp/usrp_e/codec_ctrl.cpp +++ b/host/lib/usrp/usrp_e/codec_ctrl.cpp @@ -134,8 +134,8 @@ usrp_e_codec_ctrl_impl::~usrp_e_codec_ctrl_impl(void){ * Codec Control Gain Control Methods **********************************************************************/ void usrp_e_codec_ctrl_impl::set_tx_pga_gain(float gain){ - int gain_word = int(63*(gain - tx_pga_gain_range.min)/(tx_pga_gain_range.max - tx_pga_gain_range.min)); - _ad9862_regs.tx_pga_gain = std::clip(gain_word, 0, 63); + int gain_word = int(255*(gain - tx_pga_gain_range.min)/(tx_pga_gain_range.max - tx_pga_gain_range.min)); + _ad9862_regs.tx_pga_gain = std::clip(gain_word, 0, 255); this->send_reg(16); } |