1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-22 07:28:10 +00:00

ui: save screen after refresh, if env var is set

This commit is contained in:
Jan Pochyla 2019-04-02 15:34:47 +02:00 committed by Pavol Rusnak
parent 22759ca95f
commit 84c14042b6
2 changed files with 12 additions and 0 deletions

View File

@ -13,6 +13,8 @@ if __debug__:
def debug_display_refresh():
display.bar(Display.WIDTH - 8, 0, 8, 8, 0xF800)
display.refresh()
if utils.SAVE_SCREEN:
display.save("refresh")
loop.after_step_hook = debug_display_refresh

View File

@ -13,6 +13,16 @@ from trezorutils import ( # noqa: F401
set_mode_unprivileged,
)
if __debug__:
if EMULATOR:
import uos
TEST = int(uos.getenv("TREZOR_TEST") or "0")
SAVE_SCREEN = int(uos.getenv("TREZOR_SAVE_SCREEN") or "0")
else:
TEST = 0
SAVE_SCREEN = 0
def unimport_begin():
return set(sys.modules)