This commit is contained in:
slush0 2016-04-29 13:52:02 +02:00 committed by Pavol Rusnak
parent f9fa429f84
commit fa52ecfb79
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
3 changed files with 2 additions and 13 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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()