petterreinholdtsen / battery-stats

Log battery charge (battery-stats-collector), show gnuplot graphs (battery-graph)
GNU General Public License v2.0
27 stars 13 forks source link

`battery-graph` does not show any graph if AC status was not determined #30

Closed MarSoft closed 8 months ago

MarSoft commented 5 years ago

I have recently installed the package in Arch Linux to my HP Envy laptop. Data collection daemon works fine, and the data is available in /var/log/battery-stats. But when I try to view graph using battery-graph, it shows an empty graph.

After some investigating, it turned out that on my system AC power adapter was not recognized by battery-stats-collector (due to incorrect packaging, but it is not related to this issue).

After reading plot command in /usr/bin/battery-graph, it turns out that it shows blue line when charging, red line when discharging, and shows nothing when charging status is unknown. I think we should instead show black or gray line for such data.