diff options
author | 2024-12-13 14:10:04 +1100 | |
---|---|---|
committer | 2025-02-05 17:54:13 -0600 | |
commit | c0f3267590ed000ff00d279ab823383a2ee20a0e (patch) | |
tree | a8f06e2b3fd3ae361b38ffcdd3b010de5da7dcca /packages/SettingsLib/src | |
parent | 0496b1f539026c15a4f8c448e916cf328402af94 (diff) |
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
Diffstat (limited to 'packages/SettingsLib/src')
0 files changed, 0 insertions, 0 deletions