diff --git a/CHANGELOG.md b/CHANGELOG.md index 8011c4f0..881f6ddb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,10 +5,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] + +## [0.9.7] - 2020-23-05 ### Changed - Start differentiating between models using the 0x1866 USB device - Refactor how to send multizone over dbus, and how to write it (write 4 packets before writing SET/APPLY) - Begin implementing profiles per board_name +- Boost toggle for AMD (not freq adjustment yet) ## [0.9.6] - 2020-22-05 ### Changed diff --git a/README.md b/README.md index c6fcc27a..b59ee2d3 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ I'm now looking at the kernel source to see if I can add the inputs correctly so - [X] Setting/modifying built-in LED modes - [X] Per-key LED setting (PARTIALLY COMPLETE) -- [ ] Fancy LED modes (custom programs) +- [X] Fancy LED modes (See examples) - [X] Daemon mode - [X] Saving settings for reload - [ ] System control @@ -149,6 +149,14 @@ with the Aura keys will use the settings that were used via CLI. ### DBUS Input +Paths: + +```rust +pub static DBUS_NAME: &str = "org.rogcore.Daemon"; +pub static DBUS_PATH: &str = "/org/rogcore/Daemon"; +pub static DBUS_IFACE: &str = "org.rogcore.Daemon"; +``` + Commands: `FanMode`, `LedWriteBytes`, `LedWriteMultizone`, `LedWriteEffect` TODO: fill in this info diff --git a/debian/changelog b/debian/changelog index e08759bc..88978d32 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +rog-core (0.9.7) focal; urgency=medium + + * Start differentiating between models using the 0x1866 USB device + * Refactor how to send multizone over dbus, and how to write it (write 4 packets before writing SET/APPLY) + * Begin implementing profiles per board_name + * Boost toggle for AMD (not freq adjustment yet) + + -- Luke Jones Sat, 23 May 2020 14:38:57 +1200 + rog-core (0.9.6) focal; urgency=medium * Fix needing to double-tap fan-mode to change mode diff --git a/rog-core/src/laptops.rs b/rog-core/src/laptops.rs index 3ccc98d7..5c95e6c9 100644 --- a/rog-core/src/laptops.rs +++ b/rog-core/src/laptops.rs @@ -9,7 +9,7 @@ pub(crate) fn match_laptop() -> LaptopBase { let device_desc = device.device_descriptor().unwrap(); if device_desc.vendor_id() == 0x0b05 { match device_desc.product_id() { - 0x1869 | 0x1866 => return choose_1866_device(), + 0x1869 | 0x1866 => return choose_1866_device(device_desc.product_id()), 0x1854 => { info!("Found GL753 or similar"); return LaptopBase { @@ -37,12 +37,12 @@ pub(crate) fn match_laptop() -> LaptopBase { panic!("could not match laptop"); } -fn choose_1866_device() -> LaptopBase { +fn choose_1866_device(prod: u16) -> LaptopBase { let dmi = sysfs_class::DmiId::default(); let board_name = dmi.board_name().expect("Could not get board_name"); let mut laptop = LaptopBase { usb_vendor: 0x0B05, - usb_product: 0x1866, + usb_product: prod, report_filter_bytes: vec![0x5a, 0x02], min_led_bright: 0x00, max_led_bright: 0x03, diff --git a/rog-core/src/main.rs b/rog-core/src/main.rs index 04c19c77..a8bf279e 100644 --- a/rog-core/src/main.rs +++ b/rog-core/src/main.rs @@ -8,7 +8,7 @@ use rog_aura::{ AuraDbusWriter, LED_MSG_LEN, }; -static VERSION: &'static str = "0.9.6"; +static VERSION: &'static str = "0.9.7"; #[derive(Debug, Options)] struct CLIStart { diff --git a/rog-core/src/rogcore.rs b/rog-core/src/rogcore.rs index 981c08a4..c6266edb 100644 --- a/rog-core/src/rogcore.rs +++ b/rog-core/src/rogcore.rs @@ -124,13 +124,13 @@ impl RogCore { let path = RogCore::get_fan_path()?; let mut fan_ctrl = OpenOptions::new().read(true).write(true).open(path)?; - info!("Fan mode set to: {:?}", FanLevel::from(n)); config.fan_mode = n; - fan_ctrl - .write_all(format!("{:?}", config.fan_mode).as_bytes()) - .unwrap_or_else(|err| error!("Could not write to {}, {:?}", path, err)); - self.set_pstate_for_fan_mode(FanLevel::from(n), config)?; config.write(); + fan_ctrl + .write_all(format!("{:?}\n", config.fan_mode).as_bytes()) + .unwrap_or_else(|err| error!("Could not write to {}, {:?}", path, err)); + info!("Fan mode set to: {:?}", FanLevel::from(config.fan_mode)); + self.set_pstate_for_fan_mode(FanLevel::from(n), config)?; Ok(()) }