From 5288a777751226072a5828cc7ca4f33550a60427 Mon Sep 17 00:00:00 2001 From: Luca Date: Sat, 29 Jul 2023 16:02:12 +0200 Subject: [PATCH] Reduce number of digits to 3 --- src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index c3bfef8..678a6c8 100644 --- a/src/main.rs +++ b/src/main.rs @@ -203,12 +203,12 @@ fn main() -> ! { if counter == 0 { led.toggle().unwrap(); - let mut bytes: [u8; 8] = [32, 32, 32, 32, 32, 194, 176, 67]; + let mut bytes: [u8; 8] = [32, 32, 32, 32, 194, 176, 67]; let text = match thermocouple.read_temperature(&mut timer.count_down()) { Ok(mut temperature) => { temperature >>= 2; - for i in (0..4).rev() { + for i in (0..3).rev() { bytes[i] = 48u8 + (temperature % 10) as u8; temperature /= 10;