fixeria has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-trx/+/43162?usp=email )
Change subject: Transceiver52M: use lround() for TRXD rssi rounding
......................................................................
Transceiver52M: use lround() for TRXD rssi rounding
trxd_fill_v0_specific() assigned bi->rssi to v0->rssi via a bare
narrowing double->uint8_t cast, silently truncating towards zero
instead of rounding to nearest. Use lround(), consistent with
the toa/ci rounding fixed in the preceding commit.
Change-Id: Ibdfe9f1b84c797bd7a50b4ee3f395c2af0ee88fd
Related: OS#5283
---
M Transceiver52M/proto_trxd.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/62/43162/1
diff --git a/Transceiver52M/proto_trxd.c b/Transceiver52M/proto_trxd.c
index 638f7f3..418daa6 100644
--- a/Transceiver52M/proto_trxd.c
+++ b/Transceiver52M/proto_trxd.c
@@ -39,7 +39,7 @@
/* in 1/256 symbols, round to closest integer */
toa_int = (int) lround(bi->toa * 256.0);
- v0->rssi = bi->rssi;
+ v0->rssi = (uint8_t) lround(bi->rssi);
osmo_store16be(toa_int, &v0->toa);
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-trx/+/43162?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: Ibdfe9f1b84c797bd7a50b4ee3f395c2af0ee88fd
Gerrit-Change-Number: 43162
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <[email protected]>