Playground reflects new trezor.ui.display API

pull/25/head
slush0 8 years ago committed by Pavol Rusnak
parent 971e9f7ff1
commit dc20152afe
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D

@ -4,9 +4,9 @@ import utime
layout.show_send('1BitkeyP2nDd5oa64x7AjvBbbwST54W5Zmx2', 110.126967)
ui.touch.callback_start(lambda x, y: print('touch start %d %d\n', x, y))
ui.touch.callback_move(lambda x, y: print('touch move %d %d\n', x, y))
ui.touch.callback_end(lambda x, y: print('touch end %d %d\n', x, y))
# ui.touch.callback_start(lambda x, y: print('touch start %d %d\n', x, y))
# ui.touch.callback_move(lambda x, y: print('touch move %d %d\n', x, y))
# ui.touch.callback_end(lambda x, y: print('touch end %d %d\n', x, y))
import playground
playground.run()

@ -2,20 +2,15 @@
import sys
sys.path.append('lib')
import gc
import utime
import logging
# import uasyncio
import math
from uasyncio import core
from TrezorUi import Display
import gc
from uasyncio import core
from trezor import ui
from . import utils
from .import utils
d = Display()
logging.basicConfig(level=logging.INFO)
loop = core.get_event_loop()
@ -33,7 +28,7 @@ def animate():
col %= 0xff
col += 0x0f
d.icon(190, 170, f.read(), utils.rgb2color(col, 0, 0), 0xffff)
ui.display.icon(190, 170, f.read(), utils.rgb2color(col, 0, 0), 0xffff)
f.seek(0)
yield from core.sleep(0.5)

Loading…
Cancel
Save