mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-05-09 18:38:47 +00:00
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
This commit is contained in:
parent
839a940990
commit
14f0fba949
@ -351,7 +351,7 @@ int bootloader_main(void) {
|
|||||||
// anyway
|
// anyway
|
||||||
uint32_t touched = 0;
|
uint32_t touched = 0;
|
||||||
#ifdef USE_TOUCH
|
#ifdef USE_TOUCH
|
||||||
if (stay_in_bootloader != sectrue) {
|
if (firmware_present == sectrue && stay_in_bootloader != sectrue) {
|
||||||
for (int i = 0; i < 100; i++) {
|
for (int i = 0; i < 100; i++) {
|
||||||
touched = touch_is_detected() | touch_read();
|
touched = touch_is_detected() | touch_read();
|
||||||
if (touched) {
|
if (touched) {
|
||||||
@ -373,6 +373,11 @@ int bootloader_main(void) {
|
|||||||
|
|
||||||
// start the bootloader if no or broken firmware found ...
|
// start the bootloader if no or broken firmware found ...
|
||||||
if (firmware_present != sectrue) {
|
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
|
// ignore stay in bootloader
|
||||||
stay_in_bootloader = secfalse;
|
stay_in_bootloader = secfalse;
|
||||||
touched = false;
|
touched = false;
|
||||||
|
@ -113,6 +113,7 @@ where
|
|||||||
};
|
};
|
||||||
display::sync();
|
display::sync();
|
||||||
frame.paint();
|
frame.paint();
|
||||||
|
display::refresh();
|
||||||
if fading {
|
if fading {
|
||||||
fadein()
|
fadein()
|
||||||
};
|
};
|
||||||
@ -430,7 +431,7 @@ extern "C" fn screen_install_success(
|
|||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
extern "C" fn screen_welcome_model() {
|
extern "C" fn screen_welcome_model() {
|
||||||
let mut frame = WelcomeScreen::new();
|
let mut frame = WelcomeScreen::new();
|
||||||
show(&mut frame, true);
|
show(&mut frame, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[no_mangle]
|
#[no_mangle]
|
||||||
|
Loading…
Reference in New Issue
Block a user