Adjust organization of rog control src

This commit is contained in:
Luke D. Jones
2024-03-15 17:19:54 +13:00
parent 5d6ed5c365
commit 7d076368e9
10 changed files with 890 additions and 847 deletions

View File

@@ -0,0 +1,43 @@
use crate::{FanType, Profile};
use rog_platform::platform::ThrottlePolicy;
use rog_profiles::FanCurvePU;
impl From<Profile> for ThrottlePolicy {
fn from(value: Profile) -> Self {
match value {
Profile::Balanced => ThrottlePolicy::Balanced,
Profile::Performance => ThrottlePolicy::Performance,
Profile::Quiet => ThrottlePolicy::Quiet,
}
}
}
impl From<ThrottlePolicy> for Profile {
fn from(value: ThrottlePolicy) -> Self {
match value {
ThrottlePolicy::Balanced => Profile::Balanced,
ThrottlePolicy::Performance => Profile::Performance,
ThrottlePolicy::Quiet => Profile::Quiet,
}
}
}
impl From<FanType> for FanCurvePU {
fn from(value: FanType) -> Self {
match value {
FanType::CPU => FanCurvePU::CPU,
FanType::Middle => FanCurvePU::MID,
FanType::GPU => FanCurvePU::GPU,
}
}
}
impl From<FanCurvePU> for FanType {
fn from(value: FanCurvePU) -> Self {
match value {
FanCurvePU::CPU => FanType::CPU,
FanCurvePU::GPU => FanType::GPU,
FanCurvePU::MID => FanType::Middle,
}
}
}

View File

@@ -1,3 +1,4 @@
//! Mostly used for slint/rog type conversions
pub mod aura_types;
pub mod fan_types;