mirror of
https://gitlab.com/asus-linux/asusctl.git
synced 2026-02-06 00:15:04 +01:00
Remove a dbg!()
This commit is contained in:
@@ -522,7 +522,6 @@ mod tests {
|
||||
let mut data_path = PathBuf::from(DATA_DIR);
|
||||
data_path.push("data");
|
||||
data_path.push("aura_support.ron");
|
||||
dbg!(&data_path);
|
||||
|
||||
let mut buf = std::fs::read_to_string(&data_path).unwrap();
|
||||
let data: LedSupportFile = ron::from_str(&buf).unwrap();
|
||||
|
||||
@@ -8,26 +8,27 @@ use zbus::zvariant::Type;
|
||||
use crate::error::ProfileError;
|
||||
use crate::FanCurvePU;
|
||||
|
||||
fn set_sysfs_name(string: &mut [u8], fan: char, index: usize) {
|
||||
string[3] = fan as u8;
|
||||
string[15] = char::from_digit(index as u32 + 1, 10).unwrap() as u8;
|
||||
}
|
||||
|
||||
pub(crate) fn pwm_str(fan: char, index: usize) -> String {
|
||||
// The char 'X' is replaced via indexing
|
||||
let mut buf = "pwmX_auto_pointX_pwm".to_owned();
|
||||
let mut string = "pwmX_auto_pointX_pwm".to_owned();
|
||||
unsafe {
|
||||
let tmp = buf.as_bytes_mut();
|
||||
tmp[3] = fan as u8;
|
||||
tmp[15] = char::from_digit(index as u32 + 1, 10).unwrap() as u8;
|
||||
set_sysfs_name(string.as_bytes_mut(), fan, index);
|
||||
}
|
||||
buf
|
||||
string
|
||||
}
|
||||
|
||||
pub(crate) fn temp_str(fan: char, index: usize) -> String {
|
||||
// The char 'X' is replaced via indexing
|
||||
let mut buf = "pwmX_auto_pointX_temp".to_owned();
|
||||
let mut string = "pwmX_auto_pointX_temp".to_owned();
|
||||
unsafe {
|
||||
let tmp = buf.as_bytes_mut();
|
||||
tmp[3] = fan as u8;
|
||||
tmp[15] = char::from_digit(index as u32 + 1, 10).unwrap() as u8;
|
||||
set_sysfs_name(string.as_bytes_mut(), fan, index);
|
||||
}
|
||||
buf
|
||||
string
|
||||
}
|
||||
|
||||
#[typeshare]
|
||||
|
||||
Reference in New Issue
Block a user