svartalf / rust-battery

Rust crate providing cross-platform information about the notebook batteries.
https://crates.io/crates/battery
Apache License 2.0
358 stars 40 forks source link

cycle_count might be zero all the time for some Linux drivers #23

Closed svartalf closed 5 years ago

svartalf commented 5 years ago

Based on https://github.com/svartalf/rust-battop/issues/6 issue: cycle_count file in Linux' sysfs always contains zero value even for old enough battery.

Probably zero value should be considered as None, it's rare enough situation to have new battery with correctly counted cycles amount; invalid value will be shown more often.