mirror of
https://github.com/RGBCube/superfreq
synced 2025-07-27 17:07:44 +00:00
config: document default_initial_turbo_state
semantics
This commit is contained in:
parent
899d24d5c6
commit
4e7b2d405b
2 changed files with 4 additions and 1 deletions
|
@ -171,6 +171,9 @@ pub struct TurboAutoSettings {
|
||||||
pub load_threshold_low: f32,
|
pub load_threshold_low: f32,
|
||||||
#[serde(default = "default_temp_threshold_high")]
|
#[serde(default = "default_temp_threshold_high")]
|
||||||
pub temp_threshold_high: f32,
|
pub temp_threshold_high: f32,
|
||||||
|
/// Initial turbo boost state when no previous state exists.
|
||||||
|
/// Set to `true` to start with turbo enabled, `false` to start with turbo disabled.
|
||||||
|
/// This is only used at first launch or after a reset.
|
||||||
#[serde(default = "default_initial_turbo_state")]
|
#[serde(default = "default_initial_turbo_state")]
|
||||||
pub initial_turbo_state: bool,
|
pub initial_turbo_state: bool,
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,7 +94,7 @@ impl TurboHysteresis {
|
||||||
|
|
||||||
/// Update the turbo state for hysteresis
|
/// Update the turbo state for hysteresis
|
||||||
fn update_state(&self, new_state: bool) {
|
fn update_state(&self, new_state: bool) {
|
||||||
q // First store the new state, then mark as initialized
|
// First store the new state, then mark as initialized
|
||||||
// With this, any thread seeing initialized=true will also see the correct state
|
// With this, any thread seeing initialized=true will also see the correct state
|
||||||
self.previous_state.store(new_state, Ordering::Release);
|
self.previous_state.store(new_state, Ordering::Release);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue