mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
chore: cranky cleanups
This commit is contained in:
@@ -20,7 +20,7 @@ fn main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for c in (0..35).into_iter().step_by(step) {
|
for c in (0..35).into_iter().step_by(step) {
|
||||||
for i in matrix.get_mut()[c].iter_mut() {
|
for i in &mut matrix.get_mut()[c] {
|
||||||
*i = 50;
|
*i = 50;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ fn main() {
|
|||||||
for (y, row) in tmp.iter_mut().enumerate() {
|
for (y, row) in tmp.iter_mut().enumerate() {
|
||||||
if y % 2 == 0 && i + 1 != row.len() - 1 {
|
if y % 2 == 0 && i + 1 != row.len() - 1 {
|
||||||
i += 1;
|
i += 1;
|
||||||
dbg!(i);
|
|
||||||
}
|
}
|
||||||
row[row.len() - i] = 0x22;
|
row[row.len() - i] = 0x22;
|
||||||
if i > 5 {
|
if i > 5 {
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ fn main() -> Result<(), Box<dyn Error>> {
|
|||||||
loop {
|
loop {
|
||||||
matrix.angle += 0.05;
|
matrix.angle += 0.05;
|
||||||
if matrix.angle > PI * 2.0 {
|
if matrix.angle > PI * 2.0 {
|
||||||
matrix.angle = 0.0
|
matrix.angle = 0.0;
|
||||||
}
|
}
|
||||||
matrix.update();
|
matrix.update();
|
||||||
|
|
||||||
|
|||||||
@@ -6,17 +6,17 @@ use rog_aura::{
|
|||||||
KeyColourArray,
|
KeyColourArray,
|
||||||
};
|
};
|
||||||
use rog_dbus::RogDbusClientBlocking;
|
use rog_dbus::RogDbusClientBlocking;
|
||||||
use std::collections::LinkedList;
|
use std::collections::VecDeque;
|
||||||
|
|
||||||
#[derive(Debug, Clone)]
|
#[derive(Debug, Clone)]
|
||||||
struct Ball {
|
struct Ball {
|
||||||
position: (f32, f32),
|
position: (f32, f32),
|
||||||
direction: (f32, f32),
|
direction: (f32, f32),
|
||||||
trail: LinkedList<(f32, f32)>,
|
trail: VecDeque<(f32, f32)>,
|
||||||
}
|
}
|
||||||
impl Ball {
|
impl Ball {
|
||||||
fn new(x: f32, y: f32, trail_len: u32) -> Self {
|
fn new(x: f32, y: f32, trail_len: u32) -> Self {
|
||||||
let mut trail = LinkedList::new();
|
let mut trail = VecDeque::new();
|
||||||
for _ in 1..=trail_len {
|
for _ in 1..=trail_len {
|
||||||
trail.push_back((x, y));
|
trail.push_back((x, y));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ mod aura_cli;
|
|||||||
mod cli_opts;
|
mod cli_opts;
|
||||||
mod profiles_cli;
|
mod profiles_cli;
|
||||||
|
|
||||||
fn main() -> Result<(), Box<dyn std::error::Error>> {
|
fn main() {
|
||||||
let args: Vec<String> = args().skip(1).collect();
|
let args: Vec<String> = args().skip(1).collect();
|
||||||
|
|
||||||
let missing_argument_k = gumdrop::Error::missing_argument(Opt::Short('k'));
|
let missing_argument_k = gumdrop::Error::missing_argument(Opt::Short('k'));
|
||||||
@@ -44,7 +44,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
|
|
||||||
let (dbus, _) = RogDbusClientBlocking::new()
|
let (dbus, _) = RogDbusClientBlocking::new()
|
||||||
.map_err(|e| {
|
.map_err(|e| {
|
||||||
print_error_help(Box::new(e), None);
|
print_error_help(&e, None);
|
||||||
std::process::exit(3);
|
std::process::exit(3);
|
||||||
})
|
})
|
||||||
.unwrap();
|
.unwrap();
|
||||||
@@ -54,7 +54,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
.supported()
|
.supported()
|
||||||
.supported_functions()
|
.supported_functions()
|
||||||
.map_err(|e| {
|
.map_err(|e| {
|
||||||
print_error_help(Box::new(e), None);
|
print_error_help(&e, None);
|
||||||
std::process::exit(4);
|
std::process::exit(4);
|
||||||
})
|
})
|
||||||
.unwrap();
|
.unwrap();
|
||||||
@@ -63,17 +63,14 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
print_versions();
|
print_versions();
|
||||||
println!();
|
println!();
|
||||||
print_laptop_info();
|
print_laptop_info();
|
||||||
return Ok(());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Err(err) = do_parsed(&parsed, &supported, &dbus) {
|
if let Err(err) = do_parsed(&parsed, &supported, &dbus) {
|
||||||
print_error_help(err, Some(&supported));
|
print_error_help(&*err, Some(&supported));
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn print_error_help(err: Box<dyn std::error::Error>, supported: Option<&SupportedFunctions>) {
|
fn print_error_help(err: &dyn std::error::Error, supported: Option<&SupportedFunctions>) {
|
||||||
check_service("asusd");
|
check_service("asusd");
|
||||||
println!("\nError: {}\n", err);
|
println!("\nError: {}\n", err);
|
||||||
print_versions();
|
print_versions();
|
||||||
@@ -126,7 +123,7 @@ fn check_service(name: &str) -> bool {
|
|||||||
fn do_parsed(
|
fn do_parsed(
|
||||||
parsed: &CliStart,
|
parsed: &CliStart,
|
||||||
supported: &SupportedFunctions,
|
supported: &SupportedFunctions,
|
||||||
dbus: &RogDbusClientBlocking,
|
dbus: &RogDbusClientBlocking<'_>,
|
||||||
) -> Result<(), Box<dyn std::error::Error>> {
|
) -> Result<(), Box<dyn std::error::Error>> {
|
||||||
match &parsed.command {
|
match &parsed.command {
|
||||||
Some(CliCommand::LedMode(mode)) => handle_led_mode(dbus, &supported.keyboard_led, mode)?,
|
Some(CliCommand::LedMode(mode)) => handle_led_mode(dbus, &supported.keyboard_led, mode)?,
|
||||||
@@ -150,7 +147,7 @@ fn do_parsed(
|
|||||||
println!("{}", CliStart::usage());
|
println!("{}", CliStart::usage());
|
||||||
println!();
|
println!();
|
||||||
if let Some(cmdlist) = CliStart::command_list() {
|
if let Some(cmdlist) = CliStart::command_list() {
|
||||||
let commands: Vec<String> = cmdlist.lines().map(|s| s.to_string()).collect();
|
let commands: Vec<String> = cmdlist.lines().map(|s| s.to_owned()).collect();
|
||||||
for command in commands.iter().filter(|command| {
|
for command in commands.iter().filter(|command| {
|
||||||
if !matches!(
|
if !matches!(
|
||||||
supported.keyboard_led.prod_id,
|
supported.keyboard_led.prod_id,
|
||||||
@@ -674,7 +671,9 @@ fn handle_profile(
|
|||||||
|
|
||||||
if cmd.list {
|
if cmd.list {
|
||||||
let res = dbus.proxies().profile().profiles()?;
|
let res = dbus.proxies().profile().profiles()?;
|
||||||
res.iter().for_each(|p| println!("{:?}", p));
|
for p in &res {
|
||||||
|
println!("{:?}", p);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if cmd.profile_get {
|
if cmd.profile_get {
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ impl Config {
|
|||||||
"Could not deserialise {}.\nWill rename to {}-old and recreate config",
|
"Could not deserialise {}.\nWill rename to {}-old and recreate config",
|
||||||
CONFIG_PATH, CONFIG_PATH
|
CONFIG_PATH, CONFIG_PATH
|
||||||
);
|
);
|
||||||
let cfg_old = CONFIG_PATH.to_string() + "-old";
|
let cfg_old = CONFIG_PATH.to_owned() + "-old";
|
||||||
std::fs::rename(CONFIG_PATH, cfg_old).unwrap_or_else(|err| {
|
std::fs::rename(CONFIG_PATH, cfg_old).unwrap_or_else(|err| {
|
||||||
panic!(
|
panic!(
|
||||||
"Could not rename. Please remove {} then restart service: Error {}",
|
"Could not rename. Please remove {} then restart service: Error {}",
|
||||||
@@ -52,7 +52,7 @@ impl Config {
|
|||||||
config = Self::new();
|
config = Self::new();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
config = Self::new()
|
config = Self::new();
|
||||||
}
|
}
|
||||||
config.write();
|
config.write();
|
||||||
config
|
config
|
||||||
|
|||||||
@@ -86,25 +86,25 @@ impl AnimeConfigCached {
|
|||||||
anime_type: AnimeType,
|
anime_type: AnimeType,
|
||||||
) -> Result<(), AnimeError> {
|
) -> Result<(), AnimeError> {
|
||||||
let mut sys = Vec::with_capacity(config.system.len());
|
let mut sys = Vec::with_capacity(config.system.len());
|
||||||
for ani in config.system.iter() {
|
for ani in &config.system {
|
||||||
sys.push(ActionData::from_anime_action(anime_type, ani)?);
|
sys.push(ActionData::from_anime_action(anime_type, ani)?);
|
||||||
}
|
}
|
||||||
self.system = sys;
|
self.system = sys;
|
||||||
|
|
||||||
let mut boot = Vec::with_capacity(config.boot.len());
|
let mut boot = Vec::with_capacity(config.boot.len());
|
||||||
for ani in config.boot.iter() {
|
for ani in &config.boot {
|
||||||
boot.push(ActionData::from_anime_action(anime_type, ani)?);
|
boot.push(ActionData::from_anime_action(anime_type, ani)?);
|
||||||
}
|
}
|
||||||
self.boot = boot;
|
self.boot = boot;
|
||||||
|
|
||||||
let mut wake = Vec::with_capacity(config.wake.len());
|
let mut wake = Vec::with_capacity(config.wake.len());
|
||||||
for ani in config.wake.iter() {
|
for ani in &config.wake {
|
||||||
wake.push(ActionData::from_anime_action(anime_type, ani)?);
|
wake.push(ActionData::from_anime_action(anime_type, ani)?);
|
||||||
}
|
}
|
||||||
self.wake = wake;
|
self.wake = wake;
|
||||||
|
|
||||||
let mut shutdown = Vec::with_capacity(config.shutdown.len());
|
let mut shutdown = Vec::with_capacity(config.shutdown.len());
|
||||||
for ani in config.shutdown.iter() {
|
for ani in &config.shutdown {
|
||||||
shutdown.push(ActionData::from_anime_action(anime_type, ani)?);
|
shutdown.push(ActionData::from_anime_action(anime_type, ani)?);
|
||||||
}
|
}
|
||||||
self.shutdown = shutdown;
|
self.shutdown = shutdown;
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ pub struct AuraConfig {
|
|||||||
impl Default for AuraConfig {
|
impl Default for AuraConfig {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
let mut prod_id = AuraDevice::Unknown;
|
let mut prod_id = AuraDevice::Unknown;
|
||||||
for prod in ASUS_KEYBOARD_DEVICES.iter() {
|
for prod in &ASUS_KEYBOARD_DEVICES {
|
||||||
if HidRaw::new(prod).is_ok() {
|
if HidRaw::new(prod).is_ok() {
|
||||||
prod_id = AuraDevice::from(*prod);
|
prod_id = AuraDevice::from(*prod);
|
||||||
break;
|
break;
|
||||||
@@ -242,7 +242,7 @@ impl AuraConfig {
|
|||||||
colour2: *GRADIENT.get(GRADIENT.len() - i).unwrap_or(&GRADIENT[6]),
|
colour2: *GRADIENT.get(GRADIENT.len() - i).unwrap_or(&GRADIENT[6]),
|
||||||
speed: Speed::Med,
|
speed: Speed::Med,
|
||||||
direction: Direction::Left,
|
direction: Direction::Left,
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
if let Some(m) = config.multizone.as_mut() {
|
if let Some(m) = config.multizone.as_mut() {
|
||||||
m.insert(*n, default);
|
m.insert(*n, default);
|
||||||
@@ -287,34 +287,31 @@ impl AuraConfig {
|
|||||||
|
|
||||||
/// Set the mode data, current mode, and if multizone enabled.
|
/// Set the mode data, current mode, and if multizone enabled.
|
||||||
///
|
///
|
||||||
/// Multipurpose, will accept AuraEffect with zones and put in the correct store.
|
/// Multipurpose, will accept `AuraEffect` with zones and put in the correct store.
|
||||||
pub fn set_builtin(&mut self, effect: AuraEffect) {
|
pub fn set_builtin(&mut self, effect: AuraEffect) {
|
||||||
self.current_mode = effect.mode;
|
self.current_mode = effect.mode;
|
||||||
match effect.zone() {
|
if effect.zone() == AuraZone::None {
|
||||||
AuraZone::None => {
|
self.builtins.insert(*effect.mode(), effect);
|
||||||
self.builtins.insert(*effect.mode(), effect);
|
self.multizone_on = false;
|
||||||
self.multizone_on = false;
|
} else {
|
||||||
}
|
if let Some(multi) = self.multizone.as_mut() {
|
||||||
_ => {
|
if let Some(fx) = multi.get_mut(effect.mode()) {
|
||||||
if let Some(multi) = self.multizone.as_mut() {
|
for fx in fx.iter_mut() {
|
||||||
if let Some(fx) = multi.get_mut(effect.mode()) {
|
if fx.zone == effect.zone {
|
||||||
for fx in fx.iter_mut() {
|
*fx = effect;
|
||||||
if fx.zone == effect.zone {
|
return;
|
||||||
*fx = effect;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
fx.push(effect);
|
|
||||||
} else {
|
|
||||||
multi.insert(*effect.mode(), vec![effect]);
|
|
||||||
}
|
}
|
||||||
|
fx.push(effect);
|
||||||
} else {
|
} else {
|
||||||
let mut tmp = BTreeMap::new();
|
multi.insert(*effect.mode(), vec![effect]);
|
||||||
tmp.insert(*effect.mode(), vec![effect]);
|
|
||||||
self.multizone = Some(tmp);
|
|
||||||
}
|
}
|
||||||
self.multizone_on = true;
|
} else {
|
||||||
|
let mut tmp = BTreeMap::new();
|
||||||
|
tmp.insert(*effect.mode(), vec![effect]);
|
||||||
|
self.multizone = Some(tmp);
|
||||||
}
|
}
|
||||||
|
self.multizone_on = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ impl GetSupported for CtrlKbdLed {
|
|||||||
let per_key_led_mode = laptop.per_key;
|
let per_key_led_mode = laptop.per_key;
|
||||||
|
|
||||||
let mut prod_id = AuraDevice::Unknown;
|
let mut prod_id = AuraDevice::Unknown;
|
||||||
for prod in ASUS_KEYBOARD_DEVICES.iter() {
|
for prod in &ASUS_KEYBOARD_DEVICES {
|
||||||
if HidRaw::new(prod).is_ok() {
|
if HidRaw::new(prod).is_ok() {
|
||||||
prod_id = AuraDevice::from(*prod);
|
prod_id = AuraDevice::from(*prod);
|
||||||
break;
|
break;
|
||||||
@@ -72,10 +72,10 @@ impl CtrlKbdLed {
|
|||||||
pub fn new(supported_modes: LaptopLedData, config: AuraConfig) -> Result<Self, RogError> {
|
pub fn new(supported_modes: LaptopLedData, config: AuraConfig) -> Result<Self, RogError> {
|
||||||
let mut led_prod = None;
|
let mut led_prod = None;
|
||||||
let mut led_node = None;
|
let mut led_node = None;
|
||||||
for prod in ASUS_KEYBOARD_DEVICES.iter() {
|
for prod in &ASUS_KEYBOARD_DEVICES {
|
||||||
match HidRaw::new(prod) {
|
match HidRaw::new(prod) {
|
||||||
Ok(node) => {
|
Ok(node) => {
|
||||||
led_prod = Some(prod.to_string());
|
led_prod = Some((*prod).to_owned());
|
||||||
led_node = Some(node);
|
led_node = Some(node);
|
||||||
info!("Looked for keyboard controller 0x{prod}: Found");
|
info!("Looked for keyboard controller 0x{prod}: Found");
|
||||||
break;
|
break;
|
||||||
@@ -335,7 +335,7 @@ impl CtrlKbdLed {
|
|||||||
colour2: *GRADIENT.get(GRADIENT.len() - i).unwrap_or(&GRADIENT[6]),
|
colour2: *GRADIENT.get(GRADIENT.len() - i).unwrap_or(&GRADIENT[6]),
|
||||||
speed: Speed::Med,
|
speed: Speed::Med,
|
||||||
direction: Direction::Left,
|
direction: Direction::Left,
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
if default.is_empty() {
|
if default.is_empty() {
|
||||||
return Err(RogError::AuraEffectNotSupported);
|
return Err(RogError::AuraEffectNotSupported);
|
||||||
@@ -370,7 +370,7 @@ mod tests {
|
|||||||
// Checking to ensure set_mode errors when unsupported modes are tried
|
// Checking to ensure set_mode errors when unsupported modes are tried
|
||||||
let config = AuraConfig::default();
|
let config = AuraConfig::default();
|
||||||
let supported_modes = LaptopLedData {
|
let supported_modes = LaptopLedData {
|
||||||
prod_family: "".into(),
|
prod_family: String::new(),
|
||||||
board_names: vec![],
|
board_names: vec![],
|
||||||
standard: vec![AuraModeNum::Static],
|
standard: vec![AuraModeNum::Static],
|
||||||
multizone: vec![],
|
multizone: vec![],
|
||||||
@@ -432,7 +432,7 @@ mod tests {
|
|||||||
// Checking to ensure set_mode errors when unsupported modes are tried
|
// Checking to ensure set_mode errors when unsupported modes are tried
|
||||||
let config = AuraConfig::default();
|
let config = AuraConfig::default();
|
||||||
let supported_modes = LaptopLedData {
|
let supported_modes = LaptopLedData {
|
||||||
prod_family: "".into(),
|
prod_family: String::new(),
|
||||||
board_names: vec![],
|
board_names: vec![],
|
||||||
standard: vec![AuraModeNum::Static],
|
standard: vec![AuraModeNum::Static],
|
||||||
multizone: vec![],
|
multizone: vec![],
|
||||||
@@ -470,7 +470,7 @@ mod tests {
|
|||||||
// Checking to ensure set_mode errors when unsupported modes are tried
|
// Checking to ensure set_mode errors when unsupported modes are tried
|
||||||
let config = AuraConfig::default();
|
let config = AuraConfig::default();
|
||||||
let supported_modes = LaptopLedData {
|
let supported_modes = LaptopLedData {
|
||||||
prod_family: "".into(),
|
prod_family: String::new(),
|
||||||
board_names: vec![],
|
board_names: vec![],
|
||||||
standard: vec![AuraModeNum::Static],
|
standard: vec![AuraModeNum::Static],
|
||||||
multizone: vec![AuraZone::Key1, AuraZone::Key2],
|
multizone: vec![AuraZone::Key1, AuraZone::Key2],
|
||||||
|
|||||||
@@ -237,7 +237,7 @@ impl CtrlTask for CtrlKbdLedZbus {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async fn create_tasks(&self, _: SignalContext<'static>) -> Result<(), RogError> {
|
async fn create_tasks(&self, _: SignalContext<'static>) -> Result<(), RogError> {
|
||||||
let load_save = |start: bool, mut lock: MutexGuard<CtrlKbdLed>| {
|
let load_save = |start: bool, mut lock: MutexGuard<'_, CtrlKbdLed>| {
|
||||||
// If waking up
|
// If waking up
|
||||||
if !start {
|
if !start {
|
||||||
info!("CtrlKbdLedTask reloading brightness and modes");
|
info!("CtrlKbdLedTask reloading brightness and modes");
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ impl LaptopLedData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl LedSupportFile {
|
impl LedSupportFile {
|
||||||
/// Consumes the LEDModes
|
/// Consumes the `LEDModes`
|
||||||
fn matcher(self, prod_family: &str, board_name: &str) -> Option<LaptopLedData> {
|
fn matcher(self, prod_family: &str, board_name: &str) -> Option<LaptopLedData> {
|
||||||
for config in self.led_data {
|
for config in self.led_data {
|
||||||
if prod_family.contains(&config.prod_family) {
|
if prod_family.contains(&config.prod_family) {
|
||||||
|
|||||||
@@ -417,7 +417,7 @@ pub fn init_tray(
|
|||||||
GfxPower::Off => tray.set_icon("asus_notif_green"),
|
GfxPower::Off => tray.set_icon("asus_notif_green"),
|
||||||
GfxPower::AsusDisabled => tray.set_icon("asus_notif_white"),
|
GfxPower::AsusDisabled => tray.set_icon("asus_notif_white"),
|
||||||
GfxPower::AsusMuxDiscreet | GfxPower::Active => {
|
GfxPower::AsusMuxDiscreet | GfxPower::Active => {
|
||||||
tray.set_icon("asus_notif_red")
|
tray.set_icon("asus_notif_red");
|
||||||
}
|
}
|
||||||
GfxPower::Unknown => tray.set_icon("gpu-integrated"),
|
GfxPower::Unknown => tray.set_icon("gpu-integrated"),
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -93,7 +93,6 @@ impl From<Profile> for &str {
|
|||||||
impl From<&str> for Profile {
|
impl From<&str> for Profile {
|
||||||
fn from(profile: &str) -> Profile {
|
fn from(profile: &str) -> Profile {
|
||||||
match profile.to_ascii_lowercase().trim() {
|
match profile.to_ascii_lowercase().trim() {
|
||||||
"balanced" => Profile::Balanced,
|
|
||||||
"performance" => Profile::Performance,
|
"performance" => Profile::Performance,
|
||||||
"quiet" => Profile::Quiet,
|
"quiet" => Profile::Quiet,
|
||||||
_ => Profile::Balanced,
|
_ => Profile::Balanced,
|
||||||
@@ -202,7 +201,7 @@ impl FanCurveProfiles {
|
|||||||
|
|
||||||
/// Reset the stored (self) and device curve to the defaults of the platform.
|
/// Reset the stored (self) and device curve to the defaults of the platform.
|
||||||
///
|
///
|
||||||
/// Each platform_profile has a different default and the defualt can be read
|
/// Each `platform_profile` has a different default and the defualt can be read
|
||||||
/// only for the currently active profile.
|
/// only for the currently active profile.
|
||||||
pub fn set_active_curve_to_defaults(
|
pub fn set_active_curve_to_defaults(
|
||||||
&mut self,
|
&mut self,
|
||||||
@@ -296,12 +295,12 @@ impl FanCurveProfiles {
|
|||||||
FanCurvePU::GPU => &self.balanced.gpu,
|
FanCurvePU::GPU => &self.balanced.gpu,
|
||||||
},
|
},
|
||||||
Profile::Performance => match pu {
|
Profile::Performance => match pu {
|
||||||
FanCurvePU::CPU => &self.balanced.cpu,
|
FanCurvePU::CPU => &self.performance.cpu,
|
||||||
FanCurvePU::GPU => &self.balanced.gpu,
|
FanCurvePU::GPU => &self.performance.gpu,
|
||||||
},
|
},
|
||||||
Profile::Quiet => match pu {
|
Profile::Quiet => match pu {
|
||||||
FanCurvePU::CPU => &self.balanced.cpu,
|
FanCurvePU::CPU => &self.quiet.cpu,
|
||||||
FanCurvePU::GPU => &self.balanced.gpu,
|
FanCurvePU::GPU => &self.quiet.gpu,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user