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

Commit c0f32675 authored by Nikolai Artemiev's avatar Nikolai Artemiev Committed by Matthew DeVore
Browse files

Extend recordable battery voltage and temperature range

Represent the battery voltage and temperature at each history timestep
as the delta against the previous timestep's value, rather than the
absolute value. Additionally, if the deltas too large to fit in their
usual bit-fields, use an extra word to store the full values.

Previously, the battery voltage was stored with 14 bits in millivolts,
limiting it to approx 16V. The temperature was stored with 10 bits in
0.1 deg C increments, limiting it to approx 0C-102C.

The new limits are approx 32V and 3200 deg C. Deltas between most
timesteps should be small enough to not overflow into an additional word
and therefore require no additional disk space.

Test: atest PowerStatsTests
Test: Tested on banshee DUT, "value does not fit" errors are gone
Bug: 373932108
Flag: EXEMPT_bugfix

Change-Id: I84fe0405796d64a40d20f7bbe2da92f4f034521a
parent 0496b1f5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment