fixeria has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-trx/+/43162?usp=email )

 (

4 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted 
one.
 )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(-)

Approvals:
  laforge: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved
  Jenkins Builder: Verified




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: merged
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Change-Id: Ibdfe9f1b84c797bd7a50b4ee3f395c2af0ee88fd
Gerrit-Change-Number: 43162
Gerrit-PatchSet: 9
Gerrit-Owner: fixeria <[email protected]>
Gerrit-Reviewer: Hoernchen <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: pespin <[email protected]>
Gerrit-Reviewer: tnt <[email protected]>

Reply via email to