error view: clear display
This commit is contained in:
@@ -12,7 +12,7 @@ use embedded_graphics::pixelcolor::Rgb565;
|
||||
use embedded_graphics::prelude::RgbColor;
|
||||
use embedded_graphics_core::draw_target::DrawTarget;
|
||||
|
||||
pub const MAX_SELECTED: i32 = 2;
|
||||
pub const MAX_SELECTED: i32 = 3;
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct SettingsMenu {
|
||||
@@ -27,7 +27,9 @@ impl Navigable for SettingsMenu {
|
||||
) -> impl core::future::Future<Output = Result<(), Box<dyn error::Error>>> + Send {
|
||||
async move {
|
||||
let display = &mut outputs.primary_display;
|
||||
display.clear(Rgb565::BLACK).unwrap();
|
||||
display
|
||||
.clear(Rgb565::BLACK)
|
||||
.map_err(PrimaryDisplayError::from)?;
|
||||
menu_item::show(display, "System Inforation", 0, self.selected)
|
||||
.map_err(PrimaryDisplayError::from)?;
|
||||
menu_item::show(display, "Wifi Information", 1, self.selected)
|
||||
|
||||
Reference in New Issue
Block a user