Skip to content

Changes

Started by upstream project gerrit-osmo-trx #629
Started 11 hr ago
Queued 3 min 14 sec
Took 3 min 10 sec on build4-deb12build-ansible
Transceiver52M: use lround() for TRXD toa/ci rounding

trxd_fill_v0_specific() and trxd_fill_v1_specific() rounded bi->toa
and bi->ci to the nearest integer using the "+ 0.5, then truncate"
idiom.  That only rounds correctly for non-negative inputs: for
negative values (toa can be negative for an early burst, ci can be
negative under poor C/I conditions) it biases towards zero instead
of rounding to nearest, e.g. -1.3 + 0.5 = -0.8, truncated to 0
instead of the correct -1.

Use lround() instead, which rounds-half-away-from-zero correctly
for both signs.

Change-Id: I0c52f1b91070e4750a8a0ffbccb222454e694c3b
Related: OS#5283
Vadim Yanitskiy at