mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
fix: refresh ppt sliders when power profile gets changed
This commit is contained in:
@@ -1,5 +1,10 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [Unreleased]
|
||||||
|
|
||||||
|
### Changes
|
||||||
|
- Fix PPT sliders not updating
|
||||||
|
|
||||||
## [6.3.2]
|
## [6.3.2]
|
||||||
|
|
||||||
### Changes
|
### Changes
|
||||||
|
|||||||
@@ -654,6 +654,15 @@ impl CtrlPlatform {
|
|||||||
.enabled = enable;
|
.enabled = enable;
|
||||||
self.config.lock().await.write();
|
self.config.lock().await.write();
|
||||||
|
|
||||||
|
// Re-emit armoury attribute limits so GUI sees updated min/max for PPT
|
||||||
|
// attributes which can change when enabling/disabling PPT tuning groups.
|
||||||
|
// Fire-and-forget: we don't want to fail the property call if emit fails.
|
||||||
|
let _ = self
|
||||||
|
.armoury_registry
|
||||||
|
.emit_limits(&self.connection)
|
||||||
|
.await
|
||||||
|
.map_err(|e| log::error!("Failed to emit armoury limits: {e:?}"));
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -712,6 +721,13 @@ impl ReloadAndNotify for CtrlPlatform {
|
|||||||
*config = data;
|
*config = data;
|
||||||
config.base_charge_control_end_threshold =
|
config.base_charge_control_end_threshold =
|
||||||
base_charge_control_end_threshold.unwrap_or_default();
|
base_charge_control_end_threshold.unwrap_or_default();
|
||||||
|
|
||||||
|
// Ensure any armoury limits changes from the new config are emitted
|
||||||
|
let _ = self
|
||||||
|
.armoury_registry
|
||||||
|
.emit_limits(&self.connection)
|
||||||
|
.await
|
||||||
|
.map_err(|e| log::error!("Failed to emit armoury limits after reload: {e:?}"));
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user