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/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-trx/+/22350 )
Change subject: Transceiver: fix integer division in addRadioVector()
......................................................................
Transceiver: fix integer division in addRadioVector()
By default, C/C++ compiler does assume integer division. The
lack of explicit cast to 'double' causes the transceiver to
ignore non-decimal attenuation values (x % 10 > 0):
txFullScale * 10 ^ ( -3 / 10)
== txFullScale * 10 ^ 0
== txFullScale * 1.0
txFullScale * 10 ^ ( -8 / 10)
== txFullScale * 10 ^ 0
== txFullScale * 1.0
txFullScale * 10 ^ (-10 / 10)
== txFullScale * 10 ^ -1
== txFullScale * 0.1
txFullScale * 10 ^ (-18 / 10)
== txFullScale * 10 ^ -1
== txFullScale * 0.1
Change-Id: I85b1063f57f630d90c6da32827bec4a05afc6514
Related: SYS#4918
---
M Transceiver52M/Transceiver.cpp
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
Hoernchen: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp
index 9c93e98..3188c70 100644
--- a/Transceiver52M/Transceiver.cpp
+++ b/Transceiver52M/Transceiver.cpp
@@ -396,7 +396,7 @@
else
burst = modulateBurst(bits, 8 + (wTime.TN() % 4 == 0), cfg->tx_sps);
- scaleVector(*burst, txFullScale * pow(10, -RSSI / 10));
+ scaleVector(*burst, txFullScale * pow(10, (double) -RSSI / 10));
radio_burst = new radioVector(wTime, burst);
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/22350
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: I85b1063f57f630d90c6da32827bec4a05afc6514
Gerrit-Change-Number: 22350
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Hoernchen <ewild at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.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/20210121/64598b80/attachment.htm>