All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Add
nix
dependency back for FreeBSD build (#76)
- Update dependencies versions to fix
nightly
toolchain compilation
- MSRV changed to Rust
1.36.0
- Zero energy rate is not considered as an error for Windows #63
- Handling missing
energy_full_design
source files for Linux #40
Manager::refresh
method in Linux implementation checks if battery folder is exists #29Battery::energy_full_design
is not falling into a infinite recursion anymore #30
ENODEV
errors for Linux are now handled the same asENOENT
#28
- Relaxing
uom
dependency version to^0.23
forbattery
crate - Relaxing
libc
dependency version to^0.2
forbattery-ffi
crate
Battery::state_of_health
andBattery::state_of_charge
are always returning values in0.0 ≤ x ≤ 1.0
interval
uom
,core-foundation
andlibc
dependencies were updated to latest versions- Zero cycles count is considered as non-existing value for Linux #23
battery-cli
crate was yanked and replaced withbattop
crate (https://crates.io/crates/battop)
- Propagate all errors happened from
battery
andbattery-ffi
crates to the caller - Return SI measurement units from
uom
crate for almost all publicBattery
methods - Re-export used
uom
quantities and measurement units in publicbattery::units
module - Rename
Battery::percentage
method intoBattery::state_of_charge
- Rename
Battery::capacity
method intoBattery::state_of_health
- Mark
battery::State
andbattery::Technology
enums as a non-exhaustive - Support multiple devices for FreeBSD and DragonFlyBSD #17
- Ignore devices with
scope
attributes different fromSystem
for Linux #18 - Update outdated
mach
dependency for Mac OS
- Replace looks-to-be-abandoned
CoreFoundation-sys
andIOKit-sys
dependencies #2
- Free hanging mach port used for communication with Mac OS IOKit
- Fix energy and remaining time calculations for MacOS #8, #11
- Fix multiplication overflow while calculating battery percentage in Mac OS by @mindriot101 #10
- Fix wrong units for consumption graph in
battery-cli
, should beW
instead ofWh
#9 - Fix non-uniform path import that was breaking compilation for Rust<1.32 #6
- Fix
time_to_empty
andtime_to_full
calculations for Linux when charger is unplugged but driver still reports zeroenergy_rate
by @kerhong #5