error view: clear display
This commit is contained in:
+11
-2
@@ -34,6 +34,15 @@ impl Navigable for ErrorView {
|
||||
_: &Peripherals,
|
||||
) -> impl core::future::Future<Output = Result<(), Box<dyn error::Error>>> + Send {
|
||||
async move {
|
||||
outputs
|
||||
.primary_display
|
||||
.clear(Rgb565::BLACK)
|
||||
.unwrap_or_else(|error| {
|
||||
panic!(
|
||||
"Error: {error:?}\nDraw error while rendering ErrorView: {}",
|
||||
self.error
|
||||
)
|
||||
});
|
||||
let style = MonoTextStyle::new(&FONT_10X20, Rgb565::RED);
|
||||
let display_area = outputs.primary_display.bounding_box();
|
||||
Text::new(
|
||||
@@ -44,7 +53,7 @@ impl Navigable for ErrorView {
|
||||
.draw(&mut outputs.primary_display)
|
||||
.unwrap_or_else(|error| {
|
||||
panic!(
|
||||
"Error: {error:?}\nDraw error while rendering error: {}",
|
||||
"Error: {error:?}\nDraw error while rendering ErrorView: {}",
|
||||
self.error
|
||||
)
|
||||
});
|
||||
@@ -61,7 +70,7 @@ impl Navigable for ErrorView {
|
||||
.draw(&mut outputs.primary_display)
|
||||
.unwrap_or_else(|error| {
|
||||
panic!(
|
||||
"Error: {error:?}\nDraw error while rendering error: {}",
|
||||
"Error: {error:?}\nDraw error while rendering ErrorView: {}",
|
||||
self.error
|
||||
)
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user