mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Adjust organization of rog control src
This commit is contained in:
43
rog-control-center/src/types/fan_types.rs
Normal file
43
rog-control-center/src/types/fan_types.rs
Normal 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,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
//! Mostly used for slint/rog type conversions
|
||||
|
||||
pub mod aura_types;
|
||||
pub mod fan_types;
|
||||
|
||||
Reference in New Issue
Block a user