diff options
-rw-r--r-- | driver/battery/max17055.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/driver/battery/max17055.c b/driver/battery/max17055.c index 1b5679fe37..3e08f52514 100644 --- a/driver/battery/max17055.c +++ b/driver/battery/max17055.c @@ -214,7 +214,7 @@ int battery_status(int *status) if (reg & FSTAT_FQ) *status |= BATTERY_FULLY_CHARGED; - rv = max17055_read(REG_CURRENT, ®); + rv = max17055_read(REG_AVERAGE_CURRENT, ®); if (rv) return rv; if (reg >> 15) @@ -294,7 +294,7 @@ void battery_get_params(struct batt_params *batt) batt_new.voltage = VOLTAGE_CONV(reg); - if (max17055_read(REG_CURRENT, ®)) + if (max17055_read(REG_AVERAGE_CURRENT, ®)) batt_new.flags |= BATT_FLAG_BAD_CURRENT; batt_new.current = CURRENT_CONV((int16_t)reg); |