RustFmt and some notes
This commit is contained in:
parent
bb693ac026
commit
83b3946d2f
1 changed files with 52 additions and 51 deletions
|
@ -1,18 +1,15 @@
|
|||
use embedded_graphics::{
|
||||
draw_target::DrawTarget,
|
||||
image::Image,
|
||||
mono_font::MonoTextStyle,
|
||||
prelude::*,
|
||||
text::Text
|
||||
draw_target::DrawTarget, image::Image, mono_font::MonoTextStyle, prelude::*, text::Text,
|
||||
};
|
||||
use profont::{
|
||||
PROFONT_12_POINT, PROFONT_14_POINT, PROFONT_24_POINT, PROFONT_7_POINT, PROFONT_9_POINT,
|
||||
};
|
||||
use profont::{PROFONT_12_POINT, PROFONT_14_POINT, PROFONT_24_POINT, PROFONT_9_POINT, PROFONT_7_POINT};
|
||||
use ssd1675::Color;
|
||||
use std::fmt::Debug;
|
||||
use tinybmp::Bmp;
|
||||
|
||||
mod data;
|
||||
|
||||
|
||||
pub fn get_weather<D>(display: &mut D)
|
||||
where
|
||||
D: DrawTarget<Color = Color>,
|
||||
|
@ -73,6 +70,8 @@ where
|
|||
.draw(display)
|
||||
.expect("error drawing text");
|
||||
|
||||
// TODO(feliix42): Color based on the value.
|
||||
// https://de.wikipedia.org/wiki/UV-Index
|
||||
Text::new(
|
||||
&format!("{:2.0}", 3),
|
||||
Point::new(20, 100),
|
||||
|
@ -89,4 +88,6 @@ where
|
|||
.draw(display)
|
||||
.expect("error drawing text");
|
||||
|
||||
// TODO(feliix42): use test data to draw a forecast using
|
||||
// https://crates.io/crates/embedded-plots
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue