Change in ...osmo-trx[master]: USRPDevice: Return previous txGain if setting value failed

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

pespin gerrit-no-reply at lists.osmocom.org
Wed Sep 18 11:21:06 UTC 2019


pespin has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-trx/+/15517 )

Change subject: USRPDevice: Return previous txGain if setting value failed
......................................................................

USRPDevice: Return previous txGain if setting value failed

Change-Id: I0d8fd51586ef01141d4e5896f0fc3029a22743f8
---
M Transceiver52M/device/usrp1/USRPDevice.cpp
M Transceiver52M/device/usrp1/USRPDevice.h
2 files changed, 5 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 ef3f92a..03a4f80 100644
--- a/Transceiver52M/device/usrp1/USRPDevice.cpp
+++ b/Transceiver52M/device/usrp1/USRPDevice.cpp
@@ -71,6 +71,7 @@
   decimRate = (unsigned int) round(masterClockRate/((GSMRATE) * (double) tx_sps));
   actualSampleRate = masterClockRate/decimRate;
   rxGain = 0;
+  txGain = 0;
 
   /*
    * Undetermined delay b/w ping response timestamp and true
@@ -279,10 +280,11 @@
 
   if (!m_dbTx->set_gain(dB))
     LOGC(DDEV, ERR) << "Error setting TX gain";
-
+  else
+    txGain = dB;
   writeLock.unlock();
 
-  return dB;
+  return txGain;
 }
 
 
diff --git a/Transceiver52M/device/usrp1/USRPDevice.h b/Transceiver52M/device/usrp1/USRPDevice.h
index 4123c7d..734b361 100644
--- a/Transceiver52M/device/usrp1/USRPDevice.h
+++ b/Transceiver52M/device/usrp1/USRPDevice.h
@@ -80,6 +80,7 @@
   unsigned long lastPktTimestamp;
 
   double rxGain;
+  double txGain;
 
 #ifdef SWLOOPBACK
   short loopbackBuffer[1000000];

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

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I0d8fd51586ef01141d4e5896f0fc3029a22743f8
Gerrit-Change-Number: 15517
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at gnumonks.org>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190918/59117a75/attachment.htm>


More information about the gerrit-log mailing list