Fix applying disabled and enabled fan curves

This commit is contained in:
Luke D. Jones
2024-03-14 21:10:23 +13:00
parent 6b0edc6da1
commit e8627fde4c
11 changed files with 191 additions and 141 deletions

View File

@@ -118,7 +118,7 @@ pub struct AuraConfig {
impl StdConfig for AuraConfig {
/// Detect the keyboard type and load from default DB if data available
fn new() -> Self {
warn!("AuraConfig: creating new config");
warn!("creating new config");
let mut prod_id = AuraDevice::Unknown;
for prod in ASUS_KEYBOARD_DEVICES {
if HidRaw::new(prod.into()).is_ok() {
@@ -171,7 +171,7 @@ impl AuraConfig {
};
for n in &support_data.basic_modes {
debug!("AuraConfig: creating default for {n}");
debug!("creating default for {n}");
config
.builtins
.insert(*n, AuraEffect::default_with_mode(*n));

View File

@@ -288,9 +288,9 @@ impl CtrlTask for CtrlAuraZbus {
impl crate::Reloadable for CtrlAuraZbus {
async fn reload(&mut self) -> Result<(), RogError> {
let mut ctrl = self.0.lock().await;
debug!("CtrlKbdLedZbus: reloading keyboard mode");
debug!("reloading keyboard mode");
ctrl.write_current_config_mode()?;
debug!("CtrlKbdLedZbus: reloading power states");
debug!("reloading power states");
ctrl.set_power_states().map_err(|err| warn!("{err}")).ok();
Ok(())
}