From 58db410ba4f59484dd8ac9c1a7526bafa27a85ae Mon Sep 17 00:00:00 2001 From: Denis Benato Date: Sat, 24 Jan 2026 03:08:06 +0100 Subject: [PATCH] fix: restore TDP values --- asusd/src/asus_armoury.rs | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/asusd/src/asus_armoury.rs b/asusd/src/asus_armoury.rs index ca2b15b9..f5b75d74 100644 --- a/asusd/src/asus_armoury.rs +++ b/asusd/src/asus_armoury.rs @@ -211,17 +211,24 @@ impl crate::Reloadable for AsusArmouryAttribute { } }; - self.attr.set_current_value(&apply_value).map_err(|e| { - error!("Could not set {} value: {e:?}", self.attr.name()); - self.attr.base_path_exists(); - e - })?; + match apply_value { + AttrValue::None => { + info!( + "No saved value for attribute {}: skipping.", + self.attr.name() + ); + } + _ => { + info!("Applying value {apply_value:?} to attribute {name}"); + self.attr.set_current_value(&apply_value).map_err(|e| { + error!("Could not set {name} value: {e:?}"); + self.attr.base_path_exists(); + e + })?; - info!( - "Restored asus-armoury setting {} to {:?}", - self.attr.name(), - apply_value - ); + info!("Restored asus-armoury setting {name} to {apply_value:?}"); + } + } Ok(()) }