From 8ec3b84812b22ca3cfc8d9245c0fb9b04d12a7ed Mon Sep 17 00:00:00 2001 From: Timo Kokkonen Date: Mon, 14 Oct 2013 21:51:43 +0300 Subject: [PATCH] Add charging current and total charge into the status field These are useful pieces of information for the curious user. Signed-off-by: Timo Kokkonen --- data.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/data.c b/data.c index 99e03ae..87b4b1d 100644 --- a/data.c +++ b/data.c @@ -175,8 +175,10 @@ static void print_status_line(struct charger_data *data) } cell_avg /= (double)active_cells; - pr_info("\r\033[K%8s Ubat: %.3fV Ucell avg: %.3fV ", - time_str, data->charging_voltage, cell_avg); + pr_info("\r\033[K%8s Ubat: %.3fV Ucell avg: %.3fV " + "Current: %.2fA Charge %.0fmAh ", + time_str, data->charging_voltage, cell_avg, + data->charging_current, data->total_charge); fflush(stdout); -- 2.44.0