Change in ...osmo-trx[master]: USRPDevice: Fix setRxGain return on error and getRxGain() returning a...

2019-09-18 Thread pespin
pespin has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/15516 )

Change subject: USRPDevice: Fix setRxGain return on error and getRxGain() 
returning always 0
..

USRPDevice: Fix setRxGain return on error and getRxGain() returning always 0

field rxGain is set to 0 during constructor and never set after that
point.

Change-Id: I7fae7a315e5ab98a15c27628a88a92226ef89469
---
M Transceiver52M/device/usrp1/USRPDevice.cpp
1 file changed, 3 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/Transceiver52M/device/usrp1/USRPDevice.cpp 
b/Transceiver52M/device/usrp1/USRPDevice.cpp
index 63debee..ef3f92a 100644
--- a/Transceiver52M/device/usrp1/USRPDevice.cpp
+++ b/Transceiver52M/device/usrp1/USRPDevice.cpp
@@ -305,10 +305,11 @@

   if (!m_dbRx->set_gain(dB))
 LOGC(DDEV, ERR) << "Error setting RX gain";
-
+  else
+rxGain = dB;
   writeLock.unlock();

-  return dB;
+  return rxGain;
 }

 bool USRPDevice::setRxAntenna(const std::string , size_t chan)

--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/15516
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I7fae7a315e5ab98a15c27628a88a92226ef89469
Gerrit-Change-Number: 15516
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in ...osmo-trx[master]: USRPDevice: Fix setRxGain return on error and getRxGain() returning a...

2019-09-14 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/15516 )

Change subject: USRPDevice: Fix setRxGain return on error and getRxGain() 
returning always 0
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/15516
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I7fae7a315e5ab98a15c27628a88a92226ef89469
Gerrit-Change-Number: 15516
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Sat, 14 Sep 2019 15:00:19 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-trx[master]: USRPDevice: Fix setRxGain return on error and getRxGain() returning a...

2019-09-13 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/15516


Change subject: USRPDevice: Fix setRxGain return on error and getRxGain() 
returning always 0
..

USRPDevice: Fix setRxGain return on error and getRxGain() returning always 0

field rxGain is set to 0 during constructor and never set after that
point.

Change-Id: I7fae7a315e5ab98a15c27628a88a92226ef89469
---
M Transceiver52M/device/usrp1/USRPDevice.cpp
1 file changed, 3 insertions(+), 2 deletions(-)



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

diff --git a/Transceiver52M/device/usrp1/USRPDevice.cpp 
b/Transceiver52M/device/usrp1/USRPDevice.cpp
index 63debee..ef3f92a 100644
--- a/Transceiver52M/device/usrp1/USRPDevice.cpp
+++ b/Transceiver52M/device/usrp1/USRPDevice.cpp
@@ -305,10 +305,11 @@

   if (!m_dbRx->set_gain(dB))
 LOGC(DDEV, ERR) << "Error setting RX gain";
-
+  else
+rxGain = dB;
   writeLock.unlock();

-  return dB;
+  return rxGain;
 }

 bool USRPDevice::setRxAntenna(const std::string , size_t chan)

--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/15516
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I7fae7a315e5ab98a15c27628a88a92226ef89469
Gerrit-Change-Number: 15516
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange