mirror of
https://github.com/RGBCube/superfreq
synced 2025-07-27 17:07:44 +00:00
engine: maintain previous state when CPU data is missing
This commit is contained in:
parent
c570a327ab
commit
72c2842227
1 changed files with 19 additions and 9 deletions
|
@ -369,15 +369,25 @@ fn manage_auto_turbo(report: &SystemReport, config: &ProfileConfig) -> Result<()
|
|||
}
|
||||
// In indeterminate states or unknown previous state, use the configured initial state
|
||||
_ => {
|
||||
info!(
|
||||
"Auto Turbo: Using configured initial state ({})",
|
||||
if turbo_settings.initial_turbo_state {
|
||||
"enabled"
|
||||
} else {
|
||||
"disabled"
|
||||
}
|
||||
);
|
||||
turbo_settings.initial_turbo_state
|
||||
// If we have a previous state, maintain it for hysteresis even if load data is missing
|
||||
if let Some(prev_state) = previous_turbo_enabled {
|
||||
info!(
|
||||
"Auto Turbo: Maintaining previous state ({}) due to missing CPU data",
|
||||
if prev_state { "enabled" } else { "disabled" }
|
||||
);
|
||||
prev_state
|
||||
} else {
|
||||
// No previous state exists, fall back to configured initial state
|
||||
info!(
|
||||
"Auto Turbo: Using configured initial state ({})",
|
||||
if turbo_settings.initial_turbo_state {
|
||||
"enabled"
|
||||
} else {
|
||||
"disabled"
|
||||
}
|
||||
);
|
||||
turbo_settings.initial_turbo_state
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue