2016-10-03 13:27:29 +00:00
|
|
|
#!../../vendor/micropython/unix/micropython
|
|
|
|
import sys
|
|
|
|
sys.path.append('../../src')
|
|
|
|
|
2016-10-05 17:52:28 +00:00
|
|
|
from trezor import ui, res
|
2016-10-03 13:27:29 +00:00
|
|
|
|
|
|
|
ui.display.backlight(255)
|
|
|
|
|
2016-10-04 16:49:02 +00:00
|
|
|
|
|
|
|
# header
|
2016-10-05 17:36:30 +00:00
|
|
|
ui.display.bar(0, 0, 240, 32, ui.ORANGE, ui.BLACK, 4)
|
|
|
|
ui.display.bar(0, 10, 240, 22, ui.ORANGE)
|
2016-10-05 17:52:28 +00:00
|
|
|
|
|
|
|
image = res.load('./res/bootloader.toig')
|
|
|
|
ui.display.icon(8, 4, image, ui.ORANGE, ui.WHITE)
|
|
|
|
|
|
|
|
ui.display.text(35, 23, 'Installing firmware', ui.BOLD, ui.WHITE, ui.ORANGE)
|
2016-10-04 16:49:02 +00:00
|
|
|
|
|
|
|
ui.display.text_center(120, 192 + 32, "In progress ...", 1, ui.WHITE, ui.BLACK)
|
2016-10-03 13:27:29 +00:00
|
|
|
|
|
|
|
p = 0
|
|
|
|
while True:
|
|
|
|
|
|
|
|
ui.display.loader(p, ui.BLUE, ui.BLACK)
|
2016-10-04 14:33:57 +00:00
|
|
|
ui.display.text_center(120, 240 // 2 + 14 // 2, "%d%%" % (p // 10), 2, ui.WHITE, ui.BLACK)
|
2016-10-03 13:27:29 +00:00
|
|
|
|
|
|
|
ui.display.refresh()
|
|
|
|
|
|
|
|
p = (p + 1) % 1000
|