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

feat(python/debuglink): auto-page on pageable screens

This commit is contained in:
matejcik 2021-06-17 16:29:54 +02:00 committed by matejcik
parent 4f0aca7bb5
commit d047c98cb2
2 changed files with 7 additions and 0 deletions

View File

@ -0,0 +1 @@
Debuglink can automatically scroll through paginated views.

View File

@ -234,6 +234,12 @@ class DebugUI:
if self.input_flow is None: if self.input_flow is None:
if br.code == messages.ButtonRequestType.PinEntry: if br.code == messages.ButtonRequestType.PinEntry:
self.debuglink.input(self.get_pin()) self.debuglink.input(self.get_pin())
elif (
br.pages is not None
and br.page_number is not None
and br.pages > br.page_number
):
self.debuglink.swipe_up()
else: else:
self.debuglink.press_yes() self.debuglink.press_yes()
elif self.input_flow is self.INPUT_FLOW_DONE: elif self.input_flow is self.INPUT_FLOW_DONE: