From 8eff4fcddf53bbd19a083e5d5a5c17232685f571 Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Mon, 3 Oct 2016 15:27:29 +0200 Subject: [PATCH] bootloader mockups --- bootloader/ui-mockup/progress.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 bootloader/ui-mockup/progress.py diff --git a/bootloader/ui-mockup/progress.py b/bootloader/ui-mockup/progress.py new file mode 100755 index 0000000000..5a39195187 --- /dev/null +++ b/bootloader/ui-mockup/progress.py @@ -0,0 +1,20 @@ +#!../../vendor/micropython/unix/micropython +import sys +sys.path.append('../../src') + +from trezor import ui + +ui.display.backlight(255) + +ui.display.bar(0, 192, 240, 48, ui.ORANGE) +ui.display.text_center(120, 192 + 32, "Installing Update", 1, ui.WHITE, ui.ORANGE) + +p = 0 +while True: + + ui.display.loader(p, ui.BLUE, ui.BLACK) + ui.display.text_center(120, 192 // 2 + 14 // 2, "%d%%" % (p // 10), 2, ui.WHITE, ui.BLACK) + + ui.display.refresh() + + p = (p + 1) % 1000