Fix temperature display
This commit is contained in:
parent
e7aa77494b
commit
32a40497bf
|
@ -307,12 +307,12 @@ fn main() -> ! {
|
|||
state = State::Off;
|
||||
}
|
||||
|
||||
let mut text: String<9> = String::new();
|
||||
let mut text: String<12> = String::new();
|
||||
let text_str;
|
||||
|
||||
match thermocouple_result {
|
||||
Ok(temperature) => {
|
||||
if let Err(_) = write!(&mut text, "{}", temperature) {
|
||||
if let Err(_) = write!(&mut text, "{} °C", temperature) {
|
||||
text_str = "format error";
|
||||
} else {
|
||||
text_str = text.as_str();
|
||||
|
|
|
@ -65,7 +65,7 @@ where
|
|||
if d & 0x4 == 0x4 {
|
||||
Err(Error::OpenThermocouple)
|
||||
} else {
|
||||
Ok(FixedU16::from_num(d >> 3))
|
||||
Ok(FixedU16::from_bits(d >> 3))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue