Pau Espin Pedrol has uploaded this change for review. ( 
https://gerrit.osmocom.org/12099


Change subject: lms: Improve Set{Rx,Tx}{Gain,Freq} logging
......................................................................

lms: Improve Set{Rx,Tx}{Gain,Freq} logging

Change-Id: I6713a27c5f74beb7fcfdd712fcf695afccbc3d76
---
M Transceiver52M/device/lms/LMSDevice.cpp
1 file changed, 10 insertions(+), 6 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/99/12099/1

diff --git a/Transceiver52M/device/lms/LMSDevice.cpp 
b/Transceiver52M/device/lms/LMSDevice.cpp
index 8f3d8e1..9804bbd 100644
--- a/Transceiver52M/device/lms/LMSDevice.cpp
+++ b/Transceiver52M/device/lms/LMSDevice.cpp
@@ -327,10 +327,10 @@
        if (dB < minTxGain())
                dB = minTxGain();

-       LOGC(DDEV, NOTICE) << "Setting TX gain to " << dB << " dB.";
+       LOGC(DDEV, NOTICE) << "chan " << chan <<": Setting TX gain to " << dB 
<< " dB";

        if (LMS_SetGaindB(m_lms_dev, LMS_CH_TX, chan, dB) < 0)
-               LOGC(DDEV, ERR) << "Error setting TX gain";
+               LOGC(DDEV, ERR) << "chan " << chan <<": Error setting TX gain 
to " << dB << " dB";

        return dB;
 }
@@ -342,10 +342,10 @@
        if (dB < minRxGain())
                dB = minRxGain();

-       LOGC(DDEV, NOTICE) << "Setting RX gain to " << dB << " dB.";
+       LOGC(DDEV, NOTICE) << "chan "<< chan << ": Setting RX gain to " << dB 
<< " dB";

        if (LMS_SetGaindB(m_lms_dev, LMS_CH_RX, chan, dB) < 0)
-               LOGC(DDEV, ERR) << "Error setting RX gain";
+               LOGC(DDEV, ERR) << "chan "<< chan << ": Error setting RX gain 
to " << dB << " dB";

        return dB;
 }
@@ -601,8 +601,10 @@

 bool LMSDevice::setTxFreq(double wFreq, size_t chan)
 {
+       LOGC(DDEV, NOTICE) << "chan "<< chan << ": Setting Tx Freq to " << 
wFreq << " Hz";
+
        if (LMS_SetLOFrequency(m_lms_dev, LMS_CH_TX, chan, wFreq) < 0) {
-               LOGC(DDEV, ALERT) << "set Tx: " << wFreq << " failed!";
+               LOGC(DDEV, ERROR) << "chan "<< chan << ": Error setting Tx Freq 
to " << wFreq << " Hz";
                return false;
        }

@@ -611,8 +613,10 @@

 bool LMSDevice::setRxFreq(double wFreq, size_t chan)
 {
+       LOGC(DDEV, NOTICE) << "chan "<< chan << ": Setting Rx Freq to " << 
wFreq << " Hz";
+
        if (LMS_SetLOFrequency(m_lms_dev, LMS_CH_RX, chan, wFreq) < 0) {
-               LOGC(DDEV, ALERT) << "set Rx: " << wFreq << " failed!";
+               LOGC(DDEV, ERROR) << "chan "<< chan << ": Error setting Rx Freq 
to " << wFreq << " Hz";
                return false;
        }


-- 
To view, visit https://gerrit.osmocom.org/12099
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I6713a27c5f74beb7fcfdd712fcf695afccbc3d76
Gerrit-Change-Number: 12099
Gerrit-PatchSet: 1
Gerrit-Owner: Pau Espin Pedrol <[email protected]>

Reply via email to