diff options
-rw-r--r-- | common/virtual_battery.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/common/virtual_battery.c b/common/virtual_battery.c index 4deff8c402..4bc87c04db 100644 --- a/common/virtual_battery.c +++ b/common/virtual_battery.c @@ -231,7 +231,7 @@ int virtual_battery_operation(const uint8_t *batt_cmd_head, case SB_FULL_CHARGE_CAPACITY: val = curr_batt->full_capacity; if (batt_mode_cache & MODE_CAPACITY) - val = val * curr_batt->voltage / 10; + val = val * curr_batt->voltage / 10000; memcpy(dest, &val, read_len); break; case SB_BATTERY_STATUS: @@ -244,7 +244,7 @@ int virtual_battery_operation(const uint8_t *batt_cmd_head, case SB_DESIGN_CAPACITY: val = *(int *)host_get_memmap(EC_MEMMAP_BATT_DCAP); if (batt_mode_cache & MODE_CAPACITY) - val = val * curr_batt->voltage / 10; + val = val * curr_batt->voltage / 10000; memcpy(dest, &val, read_len); break; case SB_DESIGN_VOLTAGE: @@ -254,7 +254,7 @@ int virtual_battery_operation(const uint8_t *batt_cmd_head, case SB_REMAINING_CAPACITY: val = curr_batt->remaining_capacity; if (batt_mode_cache & MODE_CAPACITY) - val = val * curr_batt->voltage / 10; + val = val * curr_batt->voltage / 10000; memcpy(dest, &val, read_len); break; default: |