Added battery charging / discharging to status.c.