Skip to content

Commit

Permalink
small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
wiiznokes committed Dec 3, 2023
1 parent 3447a15 commit 41534bf
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .config/settings.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
unit = "Celsius"
update_delay = 1000
disable_pwm_value = 0
current_config = "lin.toml"
current_config = "win.toml"
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@
}
},
"args": [
"-p",
"./.config"
//"-p",
//"./.config"
],
"cwd": "${workspaceFolder}"
},
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
- [x] impl windows code
- [x] impl linux code
- [x] test on real hardware
- [ ] Windows optimization
- [ ] package multiple format with [cargo-bundle](https://github.com/burtonageo/cargo-bundle)
- [ ] Msi
- [x] Deb
Expand Down Expand Up @@ -44,7 +45,7 @@ Also, make sure to execute the program in sudo mode.
- the app: integrate all this crates in one executable

## Config files
- Windows: `C:\Users\wiiz\AppData\Roaming\wiiznokes\fan-control`
- Windows: `C:\Users\wiiz\AppData\Roaming\wiiznokes\fan-control\config`
- Linux: `/home/wiiz/.config/fan-control`

## Build
Expand Down
12 changes: 2 additions & 10 deletions data/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ pub struct Settings {
#[serde(default = "default_update_delay")]
pub update_delay: u64,

#[serde(default = "default_disable_pwm_value")]
pub disable_pwm_value: u8,

#[serde(default)]
pub current_config: Option<String>,
}
Expand All @@ -27,16 +24,11 @@ impl Default for Settings {
Self {
unit: Default::default(),
update_delay: default_update_delay(),
disable_pwm_value: default_disable_pwm_value(),
current_config: Default::default(),
}
}
}

fn default_update_delay() -> u64 {

Check failure on line 32 in data/src/settings.rs

View workflow job for this annotation

GitHub Actions / Format + Clippy (stable)

Diff in /home/runner/work/fan-control/fan-control/data/src/settings.rs
1000
}

fn default_disable_pwm_value() -> u8 {
2
}
2500
}

0 comments on commit 41534bf

Please sign in to comment.