Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 11fa8355 authored by Etan Cohen's avatar Etan Cohen
Browse files

[RTT] RangeResult RSSI now in units of dB

Changed from units of -0.5dB to units of +1dB (original is what comes
from the firmware).

Per API council feedback.

Bug: 73088768
Test: unit tests & integration tests
Change-Id: I77ccbf76f947f29b24a701626e0a1517dd85729e
parent 870301c9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -991,7 +991,7 @@ public class RttManager {
                            legacyResults[i].distance = result.getDistanceMm() / 10;
                            legacyResults[i].distanceStandardDeviation =
                                    result.getDistanceStdDevMm() / 10;
                            legacyResults[i].rssi = result.getRssi();
                            legacyResults[i].rssi = result.getRssi() * -2;
                            legacyResults[i].ts = result.getRangingTimestampUs();
                        } else {
                            // just in case legacy API needed some relatively real timestamp
+1 −1
Original line number Diff line number Diff line
@@ -177,7 +177,7 @@ public final class RangingResult implements Parcelable {
    }

    /**
     * @return The average RSSI (in units of -0.5dB) observed during the RTT measurement.
     * @return The average RSSI, in units of dBm, observed during the RTT measurement.
     * <p>
     * Only valid if {@link #getStatus()} returns {@link #STATUS_SUCCESS}, otherwise will throw an
     * exception.