From: Martin Mares Date: Fri, 13 Jul 2007 10:26:54 +0000 (+0200) Subject: Fixed displaying of charging status. X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;ds=sidebyside;h=8c6d407394399d79c0312bd979ba1e7f8601fc4a;p=misc.git Fixed displaying of charging status. --- diff --git a/batt.c b/batt.c index f8e1ddc..eadab59 100644 --- a/batt.c +++ b/batt.c @@ -75,7 +75,7 @@ static void scan_batt(void) total_capa += last_full; if (charging) { - int ch = last_full*3600 / rate; + int ch = (last_full - remains)*3600 / rate; if (ch > total_charge) total_charge = ch; }