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

Commit a56279c7 authored by Shunkai Yao's avatar Shunkai Yao
Browse files

Spatializer: Increase freshness timeout to 120 ms.

Update the freshness timeout to 120 ms (2*connection interval + 20) to avoid frequently HT mode downgrade.

Bug: 239146742
Test: Manual verification with Pixel.
Merged-In: I8502e22b501f798e50bddd347356d2dbd400d792
Change-Id: I8502e22b501f798e50bddd347356d2dbd400d792
parent b22c6b25
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -52,7 +52,9 @@ constexpr float kMaxRotationalVelocity = 8;
constexpr auto kPredictionDuration = 50ms;

// After not getting a pose sample for this long, we would treat the measurement as stale.
constexpr auto kFreshnessTimeout = 50ms;
// The max connection interval is 50ms, and HT sensor event interval can differ depending on the
// sampling rate, scheduling, sensor eventQ FIFO etc. 120 (2 * 50 + 20) ms seems reasonable for now.
constexpr auto kFreshnessTimeout = 120ms;

// Auto-recenter kicks in after the head has been still for this long.
constexpr auto kAutoRecenterWindowDuration = 6s;