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.orgpespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-trx/+/15521 Change subject: radioInterfaceMulti: Override setTxGain() to avoid chan!=0 calls ...................................................................... radioInterfaceMulti: Override setTxGain() to avoid chan!=0 calls Change-Id: I7e67f660c3b0b009db59b405de603f6058021802 --- M Transceiver52M/radioInterface.cpp M Transceiver52M/radioInterface.h M Transceiver52M/radioInterfaceMulti.cpp 3 files changed, 19 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/21/15521/1 diff --git a/Transceiver52M/radioInterface.cpp b/Transceiver52M/radioInterface.cpp index 9c7c044..6e49a75 100644 --- a/Transceiver52M/radioInterface.cpp +++ b/Transceiver52M/radioInterface.cpp @@ -112,7 +112,7 @@ if (atten < 0.0) atten = 0.0; - rfGain = mDevice->setTxGain(mDevice->maxTxGain() - (double) atten, chan); + rfGain = setTxGain(mDevice->maxTxGain() - (double) atten, chan); digAtten = (double) atten - mDevice->maxTxGain() + rfGain; if (digAtten < 1.0) @@ -307,6 +307,11 @@ return mDevice->setRxGain(dB, chan); } +double RadioInterface::setTxGain(double dB, size_t chan) +{ + return mDevice->setTxGain(dB, chan); +} + /* Receive a timestamped chunk from the device */ int RadioInterface::pullBuffer() { diff --git a/Transceiver52M/radioInterface.h b/Transceiver52M/radioInterface.h index 945624a..83e00b9 100644 --- a/Transceiver52M/radioInterface.h +++ b/Transceiver52M/radioInterface.h @@ -134,6 +134,9 @@ /** drive synchronization of Tx/Rx of USRP */ void alignRadio(); + /** set transmit gain */ + virtual double setTxGain(double dB, size_t chan = 0); + friend void *AlignRadioServiceLoopAdapter(RadioInterface*); }; @@ -157,6 +160,7 @@ private: bool pushBuffer(); int pullBuffer(); + virtual double setTxGain(double dB, size_t chan); signalVector *outerSendBuffer; signalVector *outerRecvBuffer; diff --git a/Transceiver52M/radioInterfaceMulti.cpp b/Transceiver52M/radioInterfaceMulti.cpp index c41ec22..4022d3a 100644 --- a/Transceiver52M/radioInterfaceMulti.cpp +++ b/Transceiver52M/radioInterfaceMulti.cpp @@ -405,3 +405,12 @@ else return mDevice->getRxGain(); } + +double RadioInterfaceMulti::setTxGain(double dB, size_t chan) +{ + if (chan == 0) + return mDevice->setTxGain(dB); + else + return mDevice->getTxGain(); + +} -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/15521 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: I7e67f660c3b0b009db59b405de603f6058021802 Gerrit-Change-Number: 15521 Gerrit-PatchSet: 1 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190913/495d1e57/attachment.htm>