Fixes: Handle keyboard nodes better.

- Uses string instead of debug print for some errors
- Add interface num arg for LED controller (should help support
  older laptops better)
- Some slightly better error messages
- Fix an idiotic mistake in `for i in 0..2.. if i > 0` -_-
- Remove "unsupported" warning on laptop ctrl
- Silence warning about AniMe not existing
- Adjust the turbo-toggle CLI arg
- Version bump for new release with fancurves

Closes #7 #10 #8 #4
This commit is contained in:
Luke D Jones
2020-09-10 10:43:08 +12:00
parent 1b427c6c07
commit cddff32757
13 changed files with 143 additions and 126 deletions

View File

@@ -37,7 +37,10 @@ impl Config {
self = Config::create_default(&mut file, &supported_led_modes);
} else {
self = serde_json::from_str(&buf).unwrap_or_else(|_| {
warn!("Could not deserialise {}", CONFIG_PATH);
warn!(
"Could not deserialise {}. Overwriting with default",
CONFIG_PATH
);
Config::create_default(&mut file, &supported_led_modes)
});
}
@@ -126,7 +129,7 @@ impl Config {
pub struct Profile {
pub min_percentage: u8,
pub max_percentage: u8,
pub no_turbo: bool,
pub turbo: bool,
pub fan_preset: u8,
pub fan_curve: Option<Curve>,
}
@@ -139,7 +142,7 @@ impl Default for Profile {
Profile {
min_percentage: 0,
max_percentage: 100,
no_turbo: false,
turbo: false,
fan_preset: 0,
fan_curve: None,
}