From 14f0fba949a343f7a5803bbf17508889b67389d9 Mon Sep 17 00:00:00 2001 From: matejcik Date: Wed, 29 Mar 2023 16:42:18 +0200 Subject: [PATCH] feat(core/bootloader): tweak initial screens * do not wait for user touch when we know we are going to the welcome screen * do not fade before the Trezor Model T screen --- core/embed/bootloader/main.c | 7 ++++++- core/embed/rust/src/ui/model_tt/bootloader/mod.rs | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/core/embed/bootloader/main.c b/core/embed/bootloader/main.c index ecdbca6a42..38316db30c 100644 --- a/core/embed/bootloader/main.c +++ b/core/embed/bootloader/main.c @@ -351,7 +351,7 @@ int bootloader_main(void) { // anyway uint32_t touched = 0; #ifdef USE_TOUCH - if (stay_in_bootloader != sectrue) { + if (firmware_present == sectrue && stay_in_bootloader != sectrue) { for (int i = 0; i < 100; i++) { touched = touch_is_detected() | touch_read(); if (touched) { @@ -373,6 +373,11 @@ int bootloader_main(void) { // start the bootloader if no or broken firmware found ... if (firmware_present != sectrue) { +#ifdef TREZOR_EMULATOR + // wait a bit so that the empty lock icon is visible + // (on a real device, we are waiting for touch init which takes longer) + hal_delay(400); +#endif // ignore stay in bootloader stay_in_bootloader = secfalse; touched = false; diff --git a/core/embed/rust/src/ui/model_tt/bootloader/mod.rs b/core/embed/rust/src/ui/model_tt/bootloader/mod.rs index d1c8fc191e..b1377f8ad4 100644 --- a/core/embed/rust/src/ui/model_tt/bootloader/mod.rs +++ b/core/embed/rust/src/ui/model_tt/bootloader/mod.rs @@ -113,6 +113,7 @@ where }; display::sync(); frame.paint(); + display::refresh(); if fading { fadein() }; @@ -430,7 +431,7 @@ extern "C" fn screen_install_success( #[no_mangle] extern "C" fn screen_welcome_model() { let mut frame = WelcomeScreen::new(); - show(&mut frame, true); + show(&mut frame, false); } #[no_mangle]