1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-22 06:18:07 +00:00

fix(core): fixed blank display delay on startup when display orientation is set to other than north

This commit is contained in:
tychovrahe 2024-01-05 15:58:11 +01:00 committed by TychoVrahe
parent 988ba0b74c
commit ef5c743c35
2 changed files with 20 additions and 6 deletions

View File

@ -0,0 +1 @@
[T2T1] Fixed blank display delay on startup when display orientation is set to other than north

View File

@ -42,17 +42,30 @@ async def bootscreen() -> None:
Allowing all of them before returning.
"""
lockscreen = Lockscreen(label=storage.device.get_label(), bootscreen=True)
ui.display.orientation(storage.device.get_rotation())
while True:
try:
if can_lock_device():
enforce_welcome_screen_duration()
ui.backlight_fade(ui.style.BACKLIGHT_DIM)
ui.display.orientation(storage.device.get_rotation())
await lockscreen
await verify_user_pin()
storage.init_unlocked()
enforce_welcome_screen_duration()
allow_all_loader_messages()
return
await verify_user_pin()
storage.init_unlocked()
allow_all_loader_messages()
return
else:
await verify_user_pin()
storage.init_unlocked()
enforce_welcome_screen_duration()
rotation = storage.device.get_rotation()
if rotation != ui.display.orientation():
# there is a slight delay before next screen is shown,
# so we don't fade unless there is a change of orientation
ui.backlight_fade(ui.style.BACKLIGHT_DIM)
ui.display.orientation(rotation)
allow_all_loader_messages()
return
except wire.PinCancelled:
# verify_user_pin will convert a SdCardUnavailable (in case of sd salt)
# to PinCancelled exception.