Commit 6613bf0a authored by Ben Fennema's avatar Ben Fennema
Browse files

sensorhal: allow accel bias updates while accel enabled



Set mAccelEnabledBias to mAccelBias when the first accel
sample is received after calibrated accel is enabled.

It is set based on the first accel sample received so that if
there is a bias update after enabling but prior to outputing
any accel samples, it is used instead of the old bias value.

Update calibrated accel samples by adding mAccelBias and
subtracting mAccelEnabledBias.

As long as there is an active accel client, use mAccelEnabledBias
for uncalibrated accel bias as well.

Bug: 77729211
Test: verify updating accel bias doesn't cause jumps in accel values
Change-Id: I7ead05a1dfef48659538543322e984174bc8dde0
Signed-off-by: default avatarBen Fennema <fennema@google.com>
parent c38f7821
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment