Skip to content

Commit

Permalink
Merge pull request #113 from Foundation-Devices/dev-v2.0.6
Browse files Browse the repository at this point in the history
Dev v2.0.6
  • Loading branch information
mjg-foundation committed Feb 13, 2023
2 parents aa3ae7b + 38c7f97 commit 1ac0ef3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Expand Up @@ -6,6 +6,9 @@ SPDX-License-Identifier: GPL-3.0-or-later

## Head

## 2.0.6
- Fixed alphanumeric pin entry timing (PASS1-655)

## 2.0.5
- Ensured "New Account" UI returns to the "More" menu (PASS1-582)
- Added changelog (PASS1-581)
Expand Down
10 changes: 7 additions & 3 deletions ports/stm32/boards/Passport/modules/views/pin_input.py
Expand Up @@ -84,7 +84,8 @@ def add_char(self, char):
self.show_last_char = True
if self.timer is not None:
self.timer._del()
self.timer = lv.timer_create(self.on_timer, 500, None)
self.timer = None
self.timer = lv.timer_create(self.on_timer, 1000, None)
self.update_pin()

def del_char(self):
Expand All @@ -100,11 +101,14 @@ def on_timer(self, t):
self.update_pin()

def set_pin(self, pin):
if len(pin) > len(self.pin):
# This makes the character visible when a new character is added,
# or when the latest character is still being modified
if len(pin) > len(self.pin) or (len(pin) > 0 and len(pin) == len(self.pin) and pin[-1] != self.pin[-1]):
self.show_last_char = True
if self.timer is not None:
self.timer._del()
self.timer = lv.timer_create(self.on_timer, 500, None)
self.timer = None
self.timer = lv.timer_create(self.on_timer, 1000, None)

self.pin = pin
self.update_pin()
Expand Down

0 comments on commit 1ac0ef3

Please sign in to comment.