implement error view which displays all error on the display
This commit was merged in pull request #48.
This commit is contained in:
@@ -2,6 +2,8 @@ use crate::navigation::navigation::{Action, Navigable, NewState};
|
||||
use crate::navigation::outputs::Outputs;
|
||||
use crate::peripherals::Peripherals;
|
||||
use crate::views::{flash_info_view::FlashInfoView, menu_item, view::View};
|
||||
use alloc::boxed::Box;
|
||||
use core::error;
|
||||
|
||||
use crate::navigation::inputs::ButtonAction;
|
||||
|
||||
@@ -20,15 +22,16 @@ impl Navigable for SettingsMenu {
|
||||
fn display(
|
||||
&self,
|
||||
outputs: &mut Outputs,
|
||||
_: &Peripherals
|
||||
) -> impl core::future::Future<Output = ()> + Send {
|
||||
let display = &mut outputs.primary_display;
|
||||
display.clear(Rgb565::BLACK).unwrap();
|
||||
menu_item::show(display, "System Inforation", 0, self.selected);
|
||||
menu_item::show(display, "Wifi Information", 1, self.selected);
|
||||
menu_item::show(display, "Flash Information", 2, self.selected);
|
||||
|
||||
core::future::ready(())
|
||||
_: &Peripherals,
|
||||
) -> impl core::future::Future<Output = Result<(), Box<dyn error::Error>>> + Send {
|
||||
async move {
|
||||
let display = &mut outputs.primary_display;
|
||||
display.clear(Rgb565::BLACK).unwrap();
|
||||
menu_item::show(display, "System Inforation", 0, self.selected);
|
||||
menu_item::show(display, "Wifi Information", 1, self.selected);
|
||||
menu_item::show(display, "Flash Information", 2, self.selected);
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
fn handle_input(&self, input: Action) -> impl core::future::Future<Output = NewState> + Send {
|
||||
|
||||
Reference in New Issue
Block a user