Use Outputs type in Navigable trait
This commit is contained in:
@@ -7,9 +7,7 @@ use embedded_graphics::prelude::RgbColor;
|
||||
use embedded_graphics_core::draw_target::DrawTarget;
|
||||
|
||||
use crate::{
|
||||
card::model::Card,
|
||||
navigation::navigation::{Action, Navigable, NewState},
|
||||
views::view::View,
|
||||
card::model::Card, navigation::{navigation::{Action, Navigable, NewState}, outputs::Outputs}, views::view::View,
|
||||
};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
@@ -19,14 +17,10 @@ pub struct JournalView {
|
||||
}
|
||||
|
||||
impl Navigable for JournalView {
|
||||
fn display<D>(&self, display: &mut D) -> impl core::future::Future<Output = ()> + Send
|
||||
where
|
||||
D: DrawTarget<Color = Rgb565>,
|
||||
D::Error: core::fmt::Debug,
|
||||
{
|
||||
display.clear(Rgb565::BLACK).unwrap();
|
||||
|
||||
core::future::ready(())
|
||||
fn display(&self, outputs: &mut Outputs) -> impl core::future::Future<Output = ()> + Send {
|
||||
async move {
|
||||
outputs.primary_display.clear(Rgb565::BLACK).unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
fn handle_input(&self, input: Action) -> impl core::future::Future<Output = NewState> + Send {
|
||||
|
||||
Reference in New Issue
Block a user