mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-22 15:38:11 +00:00
Playground reflects new trezor.ui.display API
This commit is contained in:
parent
971e9f7ff1
commit
dc20152afe
@ -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
|
||||
import gc
|
||||
|
||||
from uasyncio import core
|
||||
|
||||
from TrezorUi import Display
|
||||
|
||||
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…
Reference in New Issue
Block a user