Added offset to calibration display

+ added display of offset value
* renamed section to save space
This commit is contained in:
Steins7 2022-01-29 15:54:45 +01:00
parent 7941ceeb51
commit 5d4035f98f
2 changed files with 5 additions and 5 deletions

View File

@ -88,9 +88,9 @@ impl Menu {
Entry::new("fan out", EntryValue::FanOut (FanOutput::P1), config),
Entry::new("max diff", EntryValue::MaxTempDiff (0.0), config),
Entry::new("min diff", EntryValue::MinTempDiff (0.0), config),
Entry::new("ext cal", EntryValue::ExtOffset (CalData::new(0.0)), config),
Entry::new("p1 cal", EntryValue::P1Offset (CalData::new(0.0)), config),
Entry::new("p2 cal", EntryValue::P2Offset (CalData::new(0.0)), config),
Entry::new("ex", EntryValue::ExtOffset (CalData::new(0.0)), config),
Entry::new("s1", EntryValue::P1Offset (CalData::new(0.0)), config),
Entry::new("s2", EntryValue::P2Offset (CalData::new(0.0)), config),
],
state: MenuState::Scroll,
should_refresh: true,
@ -263,7 +263,7 @@ impl fmt::Display for EntryValue {
formatter.write_fmt(format_args!("{:.1}", val)),
Self::ExtOffset (data) | Self::P1Offset (data) | Self::P2Offset (data) => {
let temp: Temp = data.raw_value.map(|val| val + data.offset).into();
formatter.write_fmt(format_args!("{}", temp))
formatter.write_fmt(format_args!("{:.1}({:.1})", data.offset, temp))
},
Self::FanOut (output) => {
match output {

View File

@ -306,7 +306,7 @@ fn main() -> ! {
let _ = TEMP_FLAG.swap(true, Ordering::Release);
// fix some weird bug caused by the debouncing capacitor of the button
for i in 0..10 {
for _ in 0..10 {
cortex_m::asm::wfi();
}
BUTTON_FLAG.store(false, Ordering::Release);