From 7fc5b4e6cde2488ff104fb15ec7b1bc627f97bca Mon Sep 17 00:00:00 2001 From: Thomas Tsou Date: Wed, 1 Jun 2011 14:50:45 -0700 Subject: [PATCH] usrp: fix receive gain setting bug on non-uhd When setting rx gain from the console, the returned set value would never change due to a braces error around logging macros. Signed-off-by: Thomas Tsou --- public-trunk/Transceiver/USRPDevice.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public-trunk/Transceiver/USRPDevice.cpp b/public-trunk/Transceiver/USRPDevice.cpp index afc751a..7ef4a97 100644 --- a/public-trunk/Transceiver/USRPDevice.cpp +++ b/public-trunk/Transceiver/USRPDevice.cpp @@ -263,10 +263,11 @@ double USRPDevice::setRxGain(double dB) LOG(NOTICE) << "Setting TX gain to " << dB << " dB."; - if (!m_dbRx->set_gain(dB)) + if (!m_dbRx->set_gain(dB)) { LOG(ERROR) << "Error setting RX gain"; - else + } else { rxGain = dB; + } return rxGain; }