Fix: correction to switching next fan profile

Closes #425
This commit is contained in:
Luke D. Jones
2023-12-15 11:42:13 +13:00
parent 6f39307080
commit dda6d343d9
3 changed files with 5 additions and 1 deletions

View File

@@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Changed
- Fix setting next fan profile
## [v5.0.0]
### Added
- Gnome 45 plugin

View File

@@ -322,6 +322,7 @@ impl CtrlPlatform {
let policy: PlatformPolicy =
platform_get_value!(self, throttle_thermal_policy, "throttle_thermal_policy")
.map(|n| n.into())?;
let policy = PlatformPolicy::next(&policy);
if self.platform.has_throttle_thermal_policy() {
if let Some(cpu) = self.cpu_control.as_ref() {

View File

@@ -278,7 +278,7 @@ pub enum PlatformPolicy {
impl PlatformPolicy {
pub const fn next(&self) -> Self {
match self {
Self::Balanced => Self::Balanced,
Self::Balanced => Self::Performance,
Self::Performance => Self::Quiet,
Self::Quiet => Self::Balanced,
}