]> git.itanic.dy.fi Git - log-plotter/commitdiff
Add charging current and total charge into the status field
authorTimo Kokkonen <timo.t.kokkonen@iki.fi>
Mon, 14 Oct 2013 18:51:43 +0000 (21:51 +0300)
committerTimo Kokkonen <timo.t.kokkonen@iki.fi>
Mon, 14 Oct 2013 18:51:43 +0000 (21:51 +0300)
These are useful pieces of information for the curious user.

Signed-off-by: Timo Kokkonen <timo.t.kokkonen@iki.fi>
data.c

diff --git a/data.c b/data.c
index 99e03ae530f515bab0ba26fc90c49513dc56b4a2..87b4b1d3b9e78d97d69d60cb0c4ae6dd1b88cb80 100644 (file)
--- 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);