mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
wip: reload current settings in rogcc for LEDs
This commit is contained in:
@@ -33,7 +33,6 @@ pub struct AuraConfig {
|
||||
}
|
||||
|
||||
impl StdConfig for AuraConfig {
|
||||
/// Detect the keyboard type and load from default DB if data available
|
||||
fn new() -> Self {
|
||||
panic!("This should not be used");
|
||||
}
|
||||
|
||||
@@ -182,7 +182,6 @@ impl AuraZbus {
|
||||
self.0.set_brightness(config.brightness.into()).await?;
|
||||
config.set_builtin(effect);
|
||||
config.write();
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -208,9 +207,10 @@ impl AuraZbus {
|
||||
let mut config = self.0.config.lock().await;
|
||||
for opt in options.states {
|
||||
let zone = opt.zone;
|
||||
for config in config.enabled.states.iter_mut() {
|
||||
if config.zone == zone {
|
||||
*config = opt;
|
||||
for state in config.enabled.states.iter_mut() {
|
||||
if state.zone == zone {
|
||||
*state = opt;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -196,6 +196,7 @@ impl DeviceHandle {
|
||||
Some(Arc::new(Mutex::new(k)))
|
||||
});
|
||||
|
||||
// Load saved mode, colours, brightness, power from disk; apply on reload
|
||||
let mut config = AuraConfig::load_and_update_config(prod_id);
|
||||
config.led_type = aura_type;
|
||||
let aura = Aura {
|
||||
|
||||
Reference in New Issue
Block a user