aboutsummaryrefslogtreecommitdiffstats
path: root/Transceiver52M
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-12-04 14:09:53 +0100
committerHarald Welte <laforge@gnumonks.org>2018-12-05 19:43:46 +0000
commit138caaf09d6cfe73a74e3c55334473a72642c348 (patch)
tree2bb2cef4266425c6c00a217c810611300ed00c0f /Transceiver52M
parent3fadcad33ed9fd16bd8946bc60a149dae339fd32 (diff)
lms: Improve Set{Rx,Tx}{Gain,Freq} logging
Diffstat (limited to 'Transceiver52M')
-rw-r--r--Transceiver52M/device/lms/LMSDevice.cpp16
1 files changed, 10 insertions, 6 deletions
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 @@ double LMSDevice::setTxGain(double dB, size_t chan)
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 @@ double LMSDevice::setRxGain(double dB, size_t chan)
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::updateAlignment(TIMESTAMP timestamp)
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::setTxFreq(double wFreq, size_t chan)
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;
}