Update main.rs

This commit is contained in:
Adrian Woźniak 2021-07-29 10:21:26 +02:00 committed by GitHub
parent fe2ed25ff7
commit c54bdc0af0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -308,7 +308,7 @@ fn service(config: Config) -> std::io::Result<()> {
continue; continue;
} }
if let Err(e) = controller.hw_mon.set_speed(target_pwm as u64) { if let Err(e) = controller.hw_mon.set_speed(target_pwm) {
log::error!("Failed to change speed to {}. {:?}", target_pwm, e); log::error!("Failed to change speed to {}. {:?}", target_pwm, e);
} }
controller.last_temp = gpu_temp; controller.last_temp = gpu_temp;
@ -363,7 +363,7 @@ fn monitor_cards(config: Config) -> std::io::Result<()> {
println!( println!(
" | {:>5.2} | {:>4} | {:>4} | {:>4} | {:>4} | {:>3}", " | {:>5.2} | {:>4} | {:>4} | {:>4} | {:>4} | {:>3}",
card.hw_mon.gpu_temp().unwrap_or_default(), card.hw_mon.gpu_temp().unwrap_or_default(),
card.hw_mon.fan_speed().unwrap_or_default(), card.hw_mon.pwm_speed().unwrap_or_default(),
card.hw_mon.pwm_min(), card.hw_mon.pwm_min(),
card.hw_mon.pwm_max(), card.hw_mon.pwm_max(),
card.hw_mon.pwm_speed().unwrap_or_default(), card.hw_mon.pwm_speed().unwrap_or_default(),