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

Generalize power supply recognizing #32

Closed MarSoft closed 8 months ago

MarSoft commented 5 years ago

For now, we list all known power supply device names in the battery-stats-collector. While it most often works fine, there are some rare situations when it still does not work, like AC2 etc.

I propose this change which uses wildcards, so that any AC* and AD* devices will be recognized.

MarSoft commented 5 years ago

Or maybe better use ADP*?..

petterreinholdtsen commented 8 months ago

Perhaps the loop should break out on the first match? I'm adapting the code to do this.