Adjust profile task to help TUF laptops notify

This commit is contained in:
Luke D. Jones
2022-12-09 10:03:45 +13:00
parent 245c035dc9
commit b1ee449b97
7 changed files with 76 additions and 19 deletions

View File

@@ -72,6 +72,14 @@ impl Profile {
file.write_all(<&str>::from(profile).as_bytes())?;
Ok(())
}
pub fn from_throttle_thermal_policy(num: u8) -> Self {
match num {
1 => Self::Performance,
2 => Self::Quiet,
_ => Self::Balanced,
}
}
}
impl Default for Profile {