Skip to content

Commit

Permalink
Potential fix for issue #101.
Browse files Browse the repository at this point in the history
Though the intention was to average these temps, at this point better to just list them.
  • Loading branch information
Benjamin Vaisvil committed Apr 29, 2021
1 parent c532aba commit a4f723f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/render.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,13 @@ fn cpu_title(app: &CPUTimeApp, histogram: &[u64]) -> String {
_ => histogram.iter().sum::<u64>() as f64 / histogram.len() as f64,
};
let temp = if !app.sensors.is_empty() {
let t: f32 = app.sensors.iter().map(|s| s.current_temp).sum();
format!(" TEMP [{: >3.0}°C]", t)
let mut t = app
.sensors
.iter()
.map(|s| format!("{: >3.0}", s.current_temp))
.collect::<Vec<String>>()
.join(",");
format!(" TEMP [{:}°C]", t)
} else {
String::from("")
};
Expand Down

0 comments on commit a4f723f

Please sign in to comment.