From 58c89fb8d62f70adf5305becf04264c750acba63 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Tue, 19 Jun 2018 10:44:03 +0200 Subject: lms: Allow values diff than 34dB to be set by setRxGain() Until now, setRxGain in LMSDevice did not take into account the setter parameter and was always using hardcoded 34dB, which was experimentally found to be a good default value. Let's force that value during initialization, but still allow the upper layers (controlled by BTS) to set different values. osmo-bts only sends a SETRXGAIN command (which calls setRxGain in osmo-trx) if a value is explicitly set in its VTY config, so we are on the safe side if the user doesn't explicitly configure a desired dB. Change-Id: I5684e675281a3f581855dbb56d199a6fe238a712 --- Transceiver52M/device/lms/LMSDevice.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'Transceiver52M/device/lms/LMSDevice.cpp') diff --git a/Transceiver52M/device/lms/LMSDevice.cpp b/Transceiver52M/device/lms/LMSDevice.cpp index 16585e6..ffea505 100644 --- a/Transceiver52M/device/lms/LMSDevice.cpp +++ b/Transceiver52M/device/lms/LMSDevice.cpp @@ -223,7 +223,7 @@ bool LMSDevice::start() // Set gains to midpoint setTxGain((minTxGain() + maxTxGain()) / 2, i); - setRxGain((minRxGain() + maxRxGain()) / 2, i); + setRxGain(34.0, i); m_lms_stream_rx[i] = {}; m_lms_stream_rx[i].isTx = false; @@ -327,8 +327,6 @@ double LMSDevice::setRxGain(double dB, size_t chan) return 0.0; } - dB = 34.0; - if (dB > maxRxGain()) dB = maxRxGain(); if (dB < minRxGain()) -- cgit v1.2.3