Remove a dbg!()

This commit is contained in:
Luke D. Jones
2023-08-10 09:47:13 +12:00
parent 3ec37a4dac
commit 573568d6e2
2 changed files with 11 additions and 11 deletions

View File

@@ -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();

View File

@@ -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]