Skip to content

Commit

Permalink
Fixed rounding on status bar value, new release
Browse files Browse the repository at this point in the history
  • Loading branch information
Nortank12 committed Sep 28, 2024
1 parent 4073ba4 commit 06d754a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "deepcool-digital-linux"
version = "0.5.0"
version = "0.5.1"
edition = "2021"

[dependencies]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,5 +209,5 @@ sudo rc-update add deepcool-digital default
# More information
[Device List and USB Mapping Tables](device-list)

# Development
# Contribution
LD Series: [asdfzdfj](https://github.com/asdfzdfj) / [deepcool-ld-digital-hidapi](https://github.com/asdfzdfj/deepcool-ld-digital-hidapi)
2 changes: 1 addition & 1 deletion src/devices/ak_series.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ impl Display {
_ => (),
}
// Status bar
data[2] = if usage < 20 { 1 } else { (usage as f32 / 10.0).round() as u8 };
data[2] = if usage < 15 { 1 } else { (usage as f32 / 10.0).round() as u8 };
// Alarm
data[6] = (self.alarm && temp > if self.fahrenheit { 185 } else { 85 }) as u8;

Expand Down
4 changes: 2 additions & 2 deletions src/devices/ch_series.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ impl Display {
_ => (),
}
// Status bar
data[2] = if cpu_usage < 20 { 1 } else { (cpu_usage as f32 / 10.0).round() as u8 };
data[7] = if gpu_usage < 20 { 1 } else { (gpu_usage as f32 / 10.0).round() as u8 };
data[2] = if cpu_usage < 15 { 1 } else { (cpu_usage as f32 / 10.0).round() as u8 };
data[7] = if gpu_usage < 15 { 1 } else { (gpu_usage as f32 / 10.0).round() as u8 };

data
}
Expand Down

0 comments on commit 06d754a

Please sign in to comment.