mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Cleanup
This commit is contained in:
@@ -419,7 +419,6 @@ impl CtrlKbdLed {
|
|||||||
self.config.read();
|
self.config.read();
|
||||||
// if self.config.builtins.contains_key(&next) {
|
// if self.config.builtins.contains_key(&next) {
|
||||||
self.config.current_mode = next;
|
self.config.current_mode = next;
|
||||||
dbg!(self.config.current_mode);
|
|
||||||
self.write_current_config_mode()?;
|
self.write_current_config_mode()?;
|
||||||
// }
|
// }
|
||||||
self.config.write();
|
self.config.write();
|
||||||
|
|||||||
@@ -175,18 +175,10 @@ impl CtrlKbdLedZbus {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Return the current mode data
|
/// Return the current mode data
|
||||||
// #[dbus_interface(property)]
|
|
||||||
async fn led_mode(&self) -> AuraModeNum {
|
async fn led_mode(&self) -> AuraModeNum {
|
||||||
if let Ok(ctrl) = self.0.try_lock() {
|
if let Ok(ctrl) = self.0.try_lock() {
|
||||||
// if let Some(mode) = ctrl.config.builtins.get(&ctrl.config.current_mode) {
|
|
||||||
// if let Ok(json) = serde_json::to_string(&ctrl.config.current_mode) {
|
|
||||||
// return json;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
return ctrl.config.current_mode;
|
return ctrl.config.current_mode;
|
||||||
}
|
}
|
||||||
// warn!("SetKeyBacklight could not deserialise");
|
|
||||||
// "SetKeyBacklight could not deserialise".to_string()
|
|
||||||
AuraModeNum::Static
|
AuraModeNum::Static
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -63,7 +63,6 @@ trait Led {
|
|||||||
fn led_brightness(&self) -> zbus::Result<i16>;
|
fn led_brightness(&self) -> zbus::Result<i16>;
|
||||||
|
|
||||||
/// LedMode property
|
/// LedMode property
|
||||||
// #[dbus_proxy(property)]
|
|
||||||
fn led_mode(&self) -> zbus::Result<AuraModeNum>;
|
fn led_mode(&self) -> zbus::Result<AuraModeNum>;
|
||||||
|
|
||||||
/// LedModes property
|
/// LedModes property
|
||||||
|
|||||||
Reference in New Issue
Block a user