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/+/18922 ) Change subject: {UHD,LMS}Dervice: Log expected resulting TxPower when setting device specific TxGain ...................................................................... {UHD,LMS}Dervice: Log expected resulting TxPower when setting device specific TxGain Change-Id: I3c54c61cd6dd7e40bb2831fd4962ff72130b390d --- M Transceiver52M/device/lms/LMSDevice.cpp M Transceiver52M/device/uhd/UHDDevice.cpp 2 files changed, 11 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/22/18922/1 diff --git a/Transceiver52M/device/lms/LMSDevice.cpp b/Transceiver52M/device/lms/LMSDevice.cpp index 8bb5316..20b9856 100644 --- a/Transceiver52M/device/lms/LMSDevice.cpp +++ b/Transceiver52M/device/lms/LMSDevice.cpp @@ -563,7 +563,7 @@ double LMSDevice::setPowerAttenuation(int atten, size_t chan) { - double dB; + double tx_power, dB; dev_band_desc desc; if (chan >= tx_gains.size()) { @@ -572,12 +572,13 @@ } get_dev_band_desc(desc); - dB = TxPower2TxGain(desc, desc.nom_out_tx_power - atten); + tx_power = desc.nom_out_tx_power - atten; + dB = TxPower2TxGain(desc, tx_power); - LOGCHAN(chan, DDEV, NOTICE) << "Setting TX gain to " << dB << " dB"; + LOGCHAN(chan, DDEV, NOTICE) << "Setting TX gain to " << dB << " dB (~" << tx_power << " dBm)"; if (LMS_SetGaindB(m_lms_dev, LMS_CH_TX, chan, dB) < 0) - LOGCHAN(chan, DDEV, ERR) << "Error setting TX gain to " << dB << " dB"; + LOGCHAN(chan, DDEV, ERR) << "Error setting TX gain to " << dB << " dB (~" << tx_power << " dBm)"; else tx_gains[chan] = dB; return desc.nom_out_tx_power - TxGain2TxPower(desc, tx_gains[chan]); diff --git a/Transceiver52M/device/uhd/UHDDevice.cpp b/Transceiver52M/device/uhd/UHDDevice.cpp index d1f61d3..0eb79fc 100644 --- a/Transceiver52M/device/uhd/UHDDevice.cpp +++ b/Transceiver52M/device/uhd/UHDDevice.cpp @@ -358,7 +358,7 @@ } double uhd_device::setPowerAttenuation(int atten, size_t chan) { - double db; + double tx_power, db; dev_band_desc desc; if (chan >= tx_gains.size()) { @@ -367,7 +367,8 @@ } get_dev_band_desc(desc); - db = TxPower2TxGain(desc, desc.nom_out_tx_power - atten); + tx_power = desc.nom_out_tx_power - atten; + db = TxPower2TxGain(desc, tx_power); if (dev_type == UMTRX) { std::vector<std::string> gain_stages = usrp_dev->get_tx_gain_names(0); @@ -388,7 +389,9 @@ tx_gains[chan] = usrp_dev->get_tx_gain(chan); - LOGC(DDEV, INFO) << "Set TX gain to " << tx_gains[chan] << "dB (asked for " << db << "dB)"; + LOGC(DDEV, INFO) << "Set TX gain to " << tx_gains[chan] << "dB, ~" + << TxGain2TxPower(desc, tx_gains[chan]) << " dBm " + << "(asked for " << db << " dB, ~" << tx_power << " dBm)"; return desc.nom_out_tx_power - TxGain2TxPower(desc, tx_gains[chan]); } -- To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/18922 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-trx Gerrit-Branch: master Gerrit-Change-Id: I3c54c61cd6dd7e40bb2831fd4962ff72130b390d Gerrit-Change-Number: 18922 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/20200619/15ac6e6c/attachment.htm>