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

@@ -52,14 +52,11 @@ pub async fn start_daemon() -> Result<(), Box<dyn Error>> {
};
let mut led_control = if let Some(laptop) = laptop {
CtrlKbdBacklight::new(laptop.usb_product(), laptop.supported_modes().to_owned())
.map_or_else(
|err| {
error!("{}", err);
None
},
Some,
)
Some(CtrlKbdBacklight::new(
laptop.usb_product(),
laptop.condev_iface(),
laptop.supported_modes().to_owned(),
))
} else {
None
};