-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Public methods and internal calculations are now using uom types only. - Rename `Battery::percentage` method into `Battery::state_of_charge` - Rename `Battery::capacity` method into `Battery::state_of_health` - Mark `battery::State` and `battery::Technology` enums as a non-exhaustive - Ignore devices with `scope` attributes different from `System` for Linux [#18](#18)
- Loading branch information
Showing
46 changed files
with
984 additions
and
586 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ insert_final_newline = true | |
charset = utf-8 | ||
indent_style = space | ||
indent_size = 4 | ||
trim_trailing_whitespace = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,6 @@ members = [ | |
"battery-ffi", | ||
"battery-cli", | ||
] | ||
|
||
[patch.crates-io] | ||
battery = { path = "./battery" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "battery-cli" | ||
version = "0.1.3" | ||
version = "0.1.4" | ||
authors = ["svartalf <[email protected]>"] | ||
edition = "2018" | ||
description = "CLI tool for batteries reports" | ||
|
@@ -25,7 +25,7 @@ test = false | |
cfg-if = "0.1" | ||
|
||
[target.'cfg(not(windows))'.dependencies] | ||
battery = "0.6.2" | ||
battery = "0.7.0" | ||
humantime = "1.2.0" | ||
tui = "0.4.0" | ||
termion = "1.5.1" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
#[macro_use] extern crate cfg_if; | ||
#[macro_use] | ||
extern crate cfg_if; | ||
|
||
cfg_if! { | ||
if #[cfg(windows)] { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "battery-ffi" | ||
version = "0.1.5" | ||
version = "0.2.0" | ||
authors = ["svartalf <[email protected]>"] | ||
edition = "2018" | ||
description = "FFI bindings for battery crate" | ||
|
@@ -22,7 +22,7 @@ crate-type = ["cdylib"] | |
default = ["cbindgen"] | ||
|
||
[dependencies] | ||
battery = "0.6.2" | ||
battery = "0.7.0" | ||
libc = "0.2.48" | ||
|
||
[build-dependencies] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.