Skip to content

Commit

Permalink
[battery] fix battery percent
Browse files Browse the repository at this point in the history
  • Loading branch information
cjbassi committed Jan 28, 2020
1 parent b8e734b commit a594fa4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- [battery] fix battery percent
- [disk][unix] fix compilation on arm

## [0.4.0] - 2020-01-25
Expand Down
4 changes: 0 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ license = "MIT"
description = "A TUI system monitor written in Rust"
edition = "2018"

[[bin]]
name = "ytop"
path = "src/main.rs"

[dependencies]
anyhow = "1.0.26"
battery = "0.7.5"
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/battery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl UpdatableWidget for BatteryWidget<'_> {
.or_default()
.push((
self.update_count as f64,
battery.state_of_charge().value as f64,
battery.state_of_charge().value as f64 * 100.0,
));
current_batteries.push(model.to_string());
}
Expand Down

0 comments on commit a594fa4

Please sign in to comment.