mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 15:38:11 +00:00
WIP
This commit is contained in:
parent
f9fa429f84
commit
fa52ecfb79
@ -1,13 +1,9 @@
|
||||
from trezor import loop
|
||||
from trezor import layout
|
||||
from trezor import ui
|
||||
from trezor.utils import unimport_func
|
||||
|
||||
def layout_tap_to_confirm(address, amount, currency):
|
||||
|
||||
from trezor.main import _main_layout
|
||||
loop.call_later(5 * 1000000, layout.change(_main_layout()))
|
||||
|
||||
ui.display.bar(0, 0, 240, 40, ui.GREEN)
|
||||
ui.display.bar(0, 40, 240, 200, ui.WHITE)
|
||||
|
||||
|
@ -7,6 +7,7 @@ class ConstDelay:
|
||||
self.last_run = utime.ticks_us()
|
||||
|
||||
def wait(self):
|
||||
# FIXME - use loop.call_at instead of call_later to avoid multiple time handling
|
||||
delay = 2 * self.delay - (utime.ticks_us() - self.last_run)
|
||||
self.last_run = utime.ticks_us()
|
||||
return Sleep(delay)
|
||||
|
@ -20,19 +20,11 @@ def perf_info():
|
||||
|
||||
yield loop.Sleep(1000000)
|
||||
|
||||
_main_layout = None
|
||||
|
||||
def run(main_layout):
|
||||
# ui.touch.start(lambda x, y: print('touch start %d %d\n' % (x, y)))
|
||||
# ui.touch.move(lambda x, y: print('touch move %d %d\n' % (x, y)))
|
||||
# ui.touch.end(lambda x, y: print('touch end %d %d\n' % (x, y)))
|
||||
|
||||
if __debug__:
|
||||
loop.call_soon(perf_info())
|
||||
|
||||
global _main_layout
|
||||
_main_layout = main_layout
|
||||
loop.call_soon(layout.set_main(_main_layout))
|
||||
loop.call_soon(layout.set_main(main_layout))
|
||||
|
||||
loop.run_forever()
|
||||
loop.close()
|
||||
|
Loading…
Reference in New Issue
Block a user