2016-10-03 17:39:21 +00:00
|
|
|
#!../../vendor/micropython/unix/micropython
|
|
|
|
import sys
|
|
|
|
sys.path.append('../../src')
|
|
|
|
|
2016-10-05 19:36:11 +00:00
|
|
|
import utime
|
2016-10-05 17:52:28 +00:00
|
|
|
from trezor import ui, res
|
2016-10-03 17:39:21 +00:00
|
|
|
from trezor.ui import button
|
2016-10-05 19:09:45 +00:00
|
|
|
from bl_common import bl_header
|
2016-10-03 17:39:21 +00:00
|
|
|
|
2016-10-05 18:17:32 +00:00
|
|
|
ui.display.clear()
|
2016-10-03 17:39:21 +00:00
|
|
|
ui.display.backlight(255)
|
2016-10-04 16:49:02 +00:00
|
|
|
|
|
|
|
# header
|
2016-10-05 19:09:45 +00:00
|
|
|
bl_header('Install new firmware')
|
2016-10-04 16:49:02 +00:00
|
|
|
|
|
|
|
# content
|
2016-10-05 19:36:11 +00:00
|
|
|
ui.display.text(10, 53, 'SatoshiLabs v0.1.1', ui.NORMAL, ui.WHITE, ui.BLACK)
|
2016-10-04 16:49:02 +00:00
|
|
|
|
2016-10-05 19:36:11 +00:00
|
|
|
def fingerprint():
|
|
|
|
ui.display.bar(0, 60, 240, 128, ui.BLACK)
|
|
|
|
ui.display.text(10, 76, 'Fingerprint:', ui.BOLD, ui.GREY, ui.BLACK)
|
|
|
|
ui.display.bar(10, 82, 220, 102, ui.DARK_GREY)
|
|
|
|
s = 105
|
|
|
|
ui.display.text(15, s, '5764715dbcf8ed88', ui.MONO, ui.GREY, ui.DARK_GREY)
|
|
|
|
ui.display.text(15, s + 1 * 23, 'bc0ae1c2f715277f', ui.MONO, ui.GREY, ui.DARK_GREY)
|
|
|
|
ui.display.text(15, s + 2 * 23, '22b67f26c15e1f75', ui.MONO, ui.GREY, ui.DARK_GREY)
|
|
|
|
ui.display.text(15, s + 3 * 23, '43b2b44913b5c255', ui.MONO, ui.GREY, ui.DARK_GREY)
|
|
|
|
|
|
|
|
def logo():
|
|
|
|
ui.display.bar(0, 60, 240, 128, ui.BLACK)
|
|
|
|
image = res.load('./res/sl_logo.toif')
|
|
|
|
ui.display.image(60, 64, image)
|
2016-10-03 17:39:21 +00:00
|
|
|
|
2017-04-09 00:38:24 +00:00
|
|
|
confirm = button.Button((121, 240 - 48, 119, 48), 'Confirm', normal_style=button.CONFIRM_BUTTON, active_style=button.CONFIRM_BUTTON_ACTIVE)
|
2016-10-03 17:39:21 +00:00
|
|
|
confirm.render()
|
2017-04-09 00:38:24 +00:00
|
|
|
cancel = button.Button((0, 240 - 48, 119, 48), 'Cancel', normal_style=button.CANCEL_BUTTON, active_style=button.CANCEL_BUTTON_ACTIVE)
|
2016-10-03 17:39:21 +00:00
|
|
|
cancel.render()
|
|
|
|
|
|
|
|
while True:
|
2016-10-05 19:36:11 +00:00
|
|
|
logo()
|
2016-10-06 15:41:53 +00:00
|
|
|
ui.display.refresh()
|
2016-10-05 19:36:11 +00:00
|
|
|
utime.sleep(2)
|
|
|
|
|
|
|
|
fingerprint()
|
2016-10-06 15:41:53 +00:00
|
|
|
ui.display.refresh()
|
2016-10-05 19:36:11 +00:00
|
|
|
utime.sleep(2)
|