mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Fix: ROGCC: apply changes to correct fan curve profile
The fan curve profile changes were applying to the currently *active* profile and not the GUI selected profile being changed. Fixed. Also clarify the buttons for fan curve apply.
This commit is contained in:
@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
### Changed
|
### Changed
|
||||||
- Adjust how fan graph in ROGCC works, deny incorrect graphs
|
- Adjust how fan graph in ROGCC works, deny incorrect graphs
|
||||||
|
- Fix to apply the fan curve change in ROGCC to the correct profile
|
||||||
- Support for G713RS LED modes (Author: Peter Ivanov)
|
- Support for G713RS LED modes (Author: Peter Ivanov)
|
||||||
- Support for G713RM LED modes (Author: maxbachmann)
|
- Support for G713RM LED modes (Author: maxbachmann)
|
||||||
- Fix VivoBook detection
|
- Fix VivoBook detection
|
||||||
|
|||||||
@@ -137,26 +137,43 @@ pub fn fan_graphs(
|
|||||||
});
|
});
|
||||||
|
|
||||||
let mut set = false;
|
let mut set = false;
|
||||||
|
let mut clear = false;
|
||||||
let mut reset = false;
|
let mut reset = false;
|
||||||
ui.with_layout(egui::Layout::right_to_left(egui::Align::TOP), |ui| {
|
ui.with_layout(egui::Layout::right_to_left(egui::Align::TOP), |ui| {
|
||||||
set = ui.add(egui::Button::new("Apply Fan-curve")).clicked();
|
set = ui.add(egui::Button::new("Apply Profile")).clicked();
|
||||||
reset = ui.add(egui::Button::new("Reset Profile")).clicked();
|
clear = ui.add(egui::Button::new("Clear Profile Changes")).clicked();
|
||||||
|
reset = ui.add(egui::Button::new("Factory Reset Profile")).clicked();
|
||||||
});
|
});
|
||||||
|
|
||||||
if set {
|
if set {
|
||||||
dbus.proxies()
|
dbus.proxies()
|
||||||
.profile()
|
.profile()
|
||||||
.set_fan_curve(profiles.current, data.clone())
|
.set_fan_curve(curves.show_curve, data.clone())
|
||||||
.map_err(|err| {
|
.map_err(|err| {
|
||||||
*do_error = Some(err.to_string());
|
*do_error = Some(err.to_string());
|
||||||
})
|
})
|
||||||
.ok();
|
.ok();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if clear {
|
||||||
|
if let Ok(curve) = dbus
|
||||||
|
.proxies()
|
||||||
|
.profile()
|
||||||
|
.fan_curve_data(curves.show_curve)
|
||||||
|
.map_err(|err| {
|
||||||
|
*do_error = Some(err.to_string());
|
||||||
|
})
|
||||||
|
{
|
||||||
|
if let Some(value) = curves.curves.get_mut(&curves.show_curve) {
|
||||||
|
*value = curve;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if reset {
|
if reset {
|
||||||
dbus.proxies()
|
dbus.proxies()
|
||||||
.profile()
|
.profile()
|
||||||
.reset_profile_curves(profiles.current)
|
.reset_profile_curves(curves.show_curve)
|
||||||
.map_err(|err| {
|
.map_err(|err| {
|
||||||
*do_error = Some(err.to_string());
|
*do_error = Some(err.to_string());
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user