mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-01-22 09:23:19 +01:00
Various cleanup. Add GA402X LED modes
This commit is contained in:
@@ -300,7 +300,7 @@ impl FanCurveProfiles {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn set_profile_curve_enabled(&mut self, profile: Profile, enabled: bool) {
|
||||
pub fn set_profile_curves_enabled(&mut self, profile: Profile, enabled: bool) {
|
||||
match profile {
|
||||
Profile::Balanced => {
|
||||
for curve in self.balanced.iter_mut() {
|
||||
@@ -320,6 +320,40 @@ impl FanCurveProfiles {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn set_profile_fan_curve_enabled(
|
||||
&mut self,
|
||||
profile: Profile,
|
||||
fan: FanCurvePU,
|
||||
enabled: bool,
|
||||
) {
|
||||
match profile {
|
||||
Profile::Balanced => {
|
||||
for curve in self.balanced.iter_mut() {
|
||||
if curve.fan == fan {
|
||||
curve.enabled = enabled;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Profile::Performance => {
|
||||
for curve in self.performance.iter_mut() {
|
||||
if curve.fan == fan {
|
||||
curve.enabled = enabled;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Profile::Quiet => {
|
||||
for curve in self.quiet.iter_mut() {
|
||||
if curve.fan == fan {
|
||||
curve.enabled = enabled;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_fan_curves_for(&self, name: Profile) -> &[CurveData] {
|
||||
match name {
|
||||
Profile::Balanced => &self.balanced,
|
||||
|
||||
Reference in New Issue
Block a user