1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-12 02:31:05 +00:00
Commit Graph

4 Commits

Author SHA1 Message Date
gabrielkerekes
bf3e64ff20 fix(common): add isort:skip_file to files generated by pb2py 2021-04-23 11:09:29 +02:00
Martin Milata
0278998f72 style(common): mypy: disable implicit Optional for function arguments 2021-04-01 11:12:30 +02:00
matejcik
ef4022fbf5 auto: regenerate protobuf classes 2020-09-23 16:00:10 +02:00
matejcik
6f53ca0ac6 core: rework wait_layout()
The original wait_layout was unreliable, because there are no guarantees
re order of arrival of the respective events. Still, TT's event handling
is basically deterministic, so as long as the host sent its messages
close enough to each other, the order worked out.

This is no longer the case with the introduction of loop.spawn: TT's
behavior is still deterministic, but now ButtonAck is processed *before*
the corresponding wait_layout, so the waiting side waits forever.

In the new process, the host must first register to receive layout
events, and then receives all of them (so the number of calls to
wait_layout must match the number of layout changes).

DebugLinkWatchLayout message must be version-gated, because of an
unfortunate collection of bugs in previous versions wrt unknown message
handling; and this interests us because upgrade-tests are using
wait_layout feature.
2020-06-04 16:18:46 +02:00