engine: name the temperature unit from the model's unit system

The results legend, probe rows and replies said "°C or K" for a
temperature. The unit system says which scale goes with it, so name it:
°C for the metric systems, °F for in-lbf-s-psi. Values are still shown
as entered; nothing is converted. An unspecified system still names no
unit.

Part of #157.
This commit is contained in:
Christian Svensson committed 2026-10-18 12:40:36 +02:00
1 parent 6b87dc508d
commit 9e19ba9bcd
3 files changed
+11 -5

No files matched your search

+1 -1
View File
@@ -494,7 +494,7 @@ pub(crate) mod tests {
s.execute("results.slice", &json!({"field": "temperature"})).unwrap();
let p = plot_at(&s, &base, None).unwrap();
assert_eq!(p.contour.as_ref().unwrap().field, Field::Temperature);
assert!(Field::Temperature.title(&p.result, p.units).contains("°C or K"));
assert!(Field::Temperature.title(&p.result, p.units).ends_with("[°C]"));
assert!(Field::available(&p.result).any(|f| f == Field::Temperature));
assert!(p.contour.as_ref().unwrap().max.1 > 20.0);
let last = p.frame().unwrap().2 - 1;