Skip to content
Commit 893857b4 authored by Hayden Ball's avatar Hayden Ball Committed by Anas Nashif
Browse files

max17055: Fix current conversion from MAX17055 unit to milliamps



`SENSOR_CHAN_GAUGE_AVG_CURRENT` is currently treated as a capacity
by the MAX17055 driver, however the unit conversion is different
for current and must be calculated separately.

Add a separate method to convert a current reading to milliamps
from 1.5625 uV/R_SENSE units, instead of the 5uVH/R_SENSE conversion
that was previously used.

Tested by comparing value read and converted from MAX17055 with
value from an external power profiling kit.

Signed-off-by: default avatarHayden Ball <hayden@playerdata.co.uk>
parent ea2ab69c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment