diff --git a/src/main.rs b/src/main.rs index d6e5c6f..733cbdc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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(); diff --git a/src/max6675.rs b/src/max6675.rs index 6094d66..e9a7fc0 100644 --- a/src/max6675.rs +++ b/src/max6675.rs @@ -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)) } } }