From d95112ba052a371336cfa3dc7f5a7598a96d8a5d Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Mon, 18 Feb 2019 19:58:00 +0100 Subject: [PATCH] firmware/protect: show progressbar in verifying pin dialog + update trezor-storage --- firmware/protect.c | 12 +++++++++--- vendor/trezor-storage | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/firmware/protect.c b/firmware/protect.c index 51f0754a05..1802ed2019 100644 --- a/firmware/protect.c +++ b/firmware/protect.c @@ -149,8 +149,6 @@ const char *requestPin(PinMatrixRequestType type, const char *text) secbool protectPinUiCallback(uint32_t wait, uint32_t progress) { - (void) progress; - // Convert wait to secstr string. char secstrbuf[] = _("________0 seconds"); char *secstr = secstrbuf + 9; @@ -165,7 +163,15 @@ secbool protectPinUiCallback(uint32_t wait, uint32_t progress) secstrbuf[16] = 0; } layoutDialog(&bmp_icon_info, NULL, NULL, NULL, _("Verifying PIN"), NULL, _("Please wait"), secstr, _("to continue ..."), NULL); - + // progressbar + oledFrame(0, OLED_HEIGHT - 8, OLED_WIDTH - 1, OLED_HEIGHT - 1); + oledBox(1, OLED_HEIGHT - 7, OLED_WIDTH - 2, OLED_HEIGHT - 2, 0); + progress = progress * (OLED_WIDTH - 4) / 1000; + if (progress > OLED_WIDTH - 4) { + progress = OLED_WIDTH - 4; + } + oledBox(2, OLED_HEIGHT - 6, 1 + progress, OLED_HEIGHT - 3, 1); + oledRefresh(); // Check for Cancel / Initialize. protectAbortedByCancel = (msg_tiny_id == MessageType_MessageType_Cancel); protectAbortedByInitialize = (msg_tiny_id == MessageType_MessageType_Initialize); diff --git a/vendor/trezor-storage b/vendor/trezor-storage index 5688a9e47e..d7e7d8ef27 160000 --- a/vendor/trezor-storage +++ b/vendor/trezor-storage @@ -1 +1 @@ -Subproject commit 5688a9e47e6d0d21b63ac22924199de2da696db7 +Subproject commit d7e7d8ef27cd57480d5c4eed17541f9a5bc72f72