From 46f7eb4f8a02ab4fc8513e0a436926369e71cdb7 Mon Sep 17 00:00:00 2001 From: Ada Date: Sun, 24 Sep 2023 22:29:24 +0200 Subject: [PATCH 1/2] Fix misaligned text elements in second line --- client/bin/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/bin/src/main.rs b/client/bin/src/main.rs index dbc84dd..651e98c 100644 --- a/client/bin/src/main.rs +++ b/client/bin/src/main.rs @@ -226,7 +226,7 @@ fn render_weather_icon(condition: &Weather, display: &mut UdpDisplay ){ return; } }; - Image::new(&icon_image.unwrap(), Point::new((IMAGE_WIDTH-40) as i32, 0)).draw(display).unwrap(); + Image::new(&icon_image.unwrap(), Point::new((IMAGE_WIDTH-40) as i32, 6)).draw(display).unwrap(); } fn render_clock(display: &mut UdpDisplay){ @@ -281,7 +281,7 @@ fn send_package(ipaddress: String, Text::new(&straba_res.inbound_station, Point::new(1, 25), text_style_station) .draw(&mut display) .unwrap(); - Text::new(&inbound, Point::new(80, 24), text_style) + Text::new(&inbound, Point::new(80, 25), text_style) .draw(&mut display) .unwrap(); } From 04aab61ab7fd87ec4c8a2d83d6d33ebb9b2a0d11 Mon Sep 17 00:00:00 2001 From: Ada Date: Sun, 24 Sep 2023 23:03:02 +0200 Subject: [PATCH 2/2] Shift weather back to original location --- client/bin/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/bin/src/main.rs b/client/bin/src/main.rs index 651e98c..35ca3fa 100644 --- a/client/bin/src/main.rs +++ b/client/bin/src/main.rs @@ -10,7 +10,7 @@ use tinybmp::Bmp; use core::time; use embedded_graphics::{ image::Image, - mono_font::{iso_8859_1::FONT_6X10, iso_8859_1::FONT_5X8, MonoTextStyle}, + mono_font::{iso_8859_1::FONT_6X10, iso_8859_1::FONT_5X8, iso_8859_1::FONT_4X6, MonoTextStyle}, pixelcolor::BinaryColor, prelude::*, text::Text, @@ -226,7 +226,7 @@ fn render_weather_icon(condition: &Weather, display: &mut UdpDisplay ){ return; } }; - Image::new(&icon_image.unwrap(), Point::new((IMAGE_WIDTH-40) as i32, 6)).draw(display).unwrap(); + Image::new(&icon_image.unwrap(), Point::new((IMAGE_WIDTH-40) as i32, 0)).draw(display).unwrap(); } fn render_clock(display: &mut UdpDisplay){