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:
parent
988ba0b74c
commit
ef5c743c35
1
core/.changelog.d/3244.fixed
Normal file
1
core/.changelog.d/3244.fixed
Normal file
@ -0,0 +1 @@
|
||||
[T2T1] Fixed blank display delay on startup when display orientation is set to other than north
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user