Lines Matching +full:battery +full:- +full:current
4 * SPDX-License-Identifier: Apache-2.0
19 * first is the sensor channel to read (-1 to terminate the list)
36 if (chan == -1) { in get_channels()
51 /* battery */
54 struct sensor_value temp, volt, current, i_desired, charge_remain; in cmd_battery() local
57 const struct device *const dev = DEVICE_DT_GET(DT_ALIAS(battery)); in cmd_battery()
63 return -ENODEV; in cmd_battery()
74 SENSOR_CHAN_GAUGE_AVG_CURRENT, ¤t, in cmd_battery()
86 -1); in cmd_battery()
95 shell_fprintf(sh, SHELL_NORMAL, "V-desired: %d.%02d V\n", in cmd_battery()
97 shell_fprintf(sh, SHELL_NORMAL, "I: %d mA", current.val1); in cmd_battery()
98 if (current.val1 > 0) { in cmd_battery()
100 } else if (current.val1 < 0) { in cmd_battery()
104 shell_fprintf(sh, SHELL_NORMAL, "I-desired: %5d mA\n", in cmd_battery()
110 shell_fprintf(sh, SHELL_NORMAL, "V-design: %d.%02d V\n", in cmd_battery()
114 shell_fprintf(sh, SHELL_NORMAL, "Cap-full: %d mA\n", cap.val1); in cmd_battery()
124 SHELL_CMD_REGISTER(battery, NULL, "Battery status", cmd_battery);