From 138caaf09d6cfe73a74e3c55334473a72642c348 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Tue, 4 Dec 2018 14:09:53 +0100 Subject: lms: Improve Set{Rx,Tx}{Gain,Freq} logging Change-Id: I6713a27c5f74beb7fcfdd712fcf695afccbc3d76 --- Transceiver52M/device/lms/LMSDevice.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'Transceiver52M/device/lms') 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; } -- cgit v1.2.3