Use Outputs type in Navigable trait
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
use crate::navigation::inputs::ButtonAction;
|
||||
use crate::navigation::navigation::CARD_DATA;
|
||||
use crate::navigation::navigation::NewState;
|
||||
use crate::navigation::outputs::Outputs;
|
||||
|
||||
use alloc::format;
|
||||
use embedded_graphics::Drawable;
|
||||
use embedded_graphics::geometry::AngleUnit as _;
|
||||
use embedded_graphics::geometry::Dimensions as _;
|
||||
use embedded_graphics::geometry::Size;
|
||||
use embedded_graphics::mono_font::MonoTextStyle;
|
||||
use embedded_graphics::mono_font::ascii::FONT_10X20;
|
||||
@@ -31,11 +33,9 @@ pub struct ScanMenu {
|
||||
}
|
||||
|
||||
impl Navigable for ScanMenu {
|
||||
fn display<D>(&self, display: &mut D) -> impl core::future::Future<Output = ()> + Send
|
||||
where
|
||||
D: DrawTarget<Color = Rgb565>,
|
||||
D::Error: core::fmt::Debug,
|
||||
fn display(&self, outputs: &mut Outputs) -> impl core::future::Future<Output = ()> + Send
|
||||
{
|
||||
let display = &mut outputs.primary_display;
|
||||
let style = MonoTextStyle::new(&FONT_10X20, Rgb565::WHITE);
|
||||
display.clear(Rgb565::BLACK).unwrap();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user