Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
desbma committed Jun 16, 2024
1 parent ac4168b commit 674fd7f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/cl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ pub enum Command {
pwm: Vec<PwmSettings>,

/// Temperatures in Celcius at which the fan(s) will be set to minimum/maximum speed.
#[arg(short, long, num_args = 2, default_values_t = vec![30, 50])]
#[arg(short = 't', long, num_args = 2, default_values_t = vec![30, 50])]
drive_temp_range: Vec<Temperature>,

/// Minimum percentage of full fan speed to set the fan to.
Expand Down
4 changes: 2 additions & 2 deletions src/device/cpu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ impl Cpu {
.collect::<String>()
.parse()?;
// Try to get crit and max temp
let crit_filepath = sysfs_dir.with_file_name(format!("temp{sensor_num}_crit"));
let crit_filepath = sysfs_dir.join(format!("temp{sensor_num}_crit"));
let crit_temp_milli = Self::read_sysfs_temp_milli(&crit_filepath)?;
let max_filepath = sysfs_dir.with_file_name(format!("temp{sensor_num}_max"));
let max_filepath = sysfs_dir.join(format!("temp{sensor_num}_max"));
let max_temp_milli = Self::read_sysfs_temp_milli(&max_filepath).unwrap_or_else(|_| {
// Default to crit - 20 if we have no max temp
crit_temp_milli - 1000 * 20
Expand Down

0 comments on commit 674fd7f

Please sign in to comment.