View | Details | Raw Unified | Return to bug 26948
Collapse All | Expand All

(-)a/lxpanel/src/plugins/batt/batt_sys.c (-1 / +1 lines)
Lines 216-222 void battery_update(battery *b) Link Here
216
    if (b->charge_full < MIN_CAPACITY)
216
    if (b->charge_full < MIN_CAPACITY)
217
	b->percentage = 0;
217
	b->percentage = 0;
218
    else {
218
    else {
219
	int promille = (b->energy_now * 1000) / b->energy_full;
219
	int promille = (b->charge_now * 1000) / b->charge_full;
220
	b->percentage = (promille + 5) / 10; /* round properly */
220
	b->percentage = (promille + 5) / 10; /* round properly */
221
    }
221
    }
222
    if (b->percentage > 100)
222
    if (b->percentage > 100)

Return to bug 26948