mirror of
https://github.com/RGBCube/superfreq
synced 2025-07-27 17:07:44 +00:00
config: make ProfileConfig
serialisable
This commit is contained in:
parent
b11bad74d5
commit
90fd077a67
1 changed files with 4 additions and 4 deletions
|
@ -37,7 +37,7 @@ impl TryFrom<(u8, u8)> for BatteryChargeThresholds {
|
|||
}
|
||||
|
||||
// Structs for configuration using serde::Deserialize
|
||||
#[derive(Deserialize, Debug, Clone)]
|
||||
#[derive(Deserialize, Serialize, Debug, Clone)]
|
||||
pub struct ProfileConfig {
|
||||
pub governor: Option<String>,
|
||||
pub turbo: Option<TurboSetting>,
|
||||
|
@ -67,7 +67,7 @@ impl Default for ProfileConfig {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug, Default, Clone)]
|
||||
#[derive(Deserialize, Serialize, Debug, Default, Clone)]
|
||||
pub struct AppConfig {
|
||||
#[serde(default)]
|
||||
pub charger: ProfileConfig,
|
||||
|
@ -212,7 +212,7 @@ impl From<ProfileConfigToml> for ProfileConfig {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug, Clone)]
|
||||
#[derive(Deserialize, Serialize, Debug, Clone)]
|
||||
pub struct DaemonConfig {
|
||||
#[serde(default = "default_poll_interval_sec")]
|
||||
pub poll_interval_sec: u64,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue