mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-11 18:35:28 +00:00
Show power number in 'ectool powerinfo' output
This is just a simple V*I value so that we don't need to do the math all the time. BUG=None TEST=None BRANCH=None Change-Id: I6317720d196d4bc2392adefb540be14bc34b5978 Signed-off-by: Vic Yang <victoryang@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/55641 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
This commit is contained in:
@@ -1517,6 +1517,8 @@ int cmd_power_info(int argc, char *argv[])
|
||||
printf("AC Voltage: %d mV\n", r.voltage_ac);
|
||||
printf("System Voltage: %d mV\n", r.voltage_system);
|
||||
printf("System Current: %d mA\n", r.current_system);
|
||||
printf("System Power: %d mW\n",
|
||||
r.voltage_system * r.current_system / 1000);
|
||||
printf("USB Device Type: 0x%x\n", r.usb_dev_type);
|
||||
printf("USB Current Limit: %d mA\n", r.usb_current_limit);
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user