1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-28 08:11:02 +00:00

firmware/protect: show progressbar in verifying pin dialog

+ update trezor-storage
This commit is contained in:
Pavol Rusnak 2019-02-18 19:58:00 +01:00
parent c58c265d9c
commit d95112ba05
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
2 changed files with 10 additions and 4 deletions

View File

@ -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);

@ -1 +1 @@
Subproject commit 5688a9e47e6d0d21b63ac22924199de2da696db7
Subproject commit d7e7d8ef27cd57480d5c4eed17541f9a5bc72f72