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:
Ben Fennema <fennema@google.com>
Loading
Please sign in to comment