Skip to content

Commit

Permalink
fix(keypad): keypad becoming unresponsive if a key was pressed while …
Browse files Browse the repository at this point in the history
…the app was loading - closes #118
  • Loading branch information
sassanh committed Jul 20, 2024
1 parent 2eb00ab commit 62f1f20
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- refactor(system): generate the hostname of the device based on a hash of its serial number
- feat(core): show hostname of device on the home page - closes #128
- feat(core): long-pressing the reset button for 3 seconds or more reboots the device - closes #116
- fix(keypad): keypad becoming unresponsive if a key was pressed while the app was loading - closes #118

## Version 0.15.4

Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ profile = "black"
[tool.pyright]
exclude = ["typings"]

[[tool.pyright.executionEnvironments]]
root = "ubo_app/services/000-keypad"
extraPaths = ["."]

[[tool.pyright.executionEnvironments]]
root = "ubo_app/services/000-sound"
extraPaths = ["."]
Expand All @@ -148,10 +152,6 @@ extraPaths = ["."]
root = "ubo_app/services/020-keyboard"
extraPaths = ["."]

[[tool.pyright.executionEnvironments]]
root = "ubo_app/services/020-keypad"
extraPaths = ["."]

[[tool.pyright.executionEnvironments]]
root = "ubo_app/services/030-ethernet"
extraPaths = ["."]
Expand Down
2 changes: 0 additions & 2 deletions ubo_app/load_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,6 @@ def stop(self: UboServiceThread) -> None:

def load_services(service_ids: Sequence[str] | None = None) -> None:
WHITE_LIST.extend(service_ids or [])
import time

services = []
for services_directory_path in [
Expand All @@ -339,4 +338,3 @@ def load_services(service_ids: Sequence[str] | None = None) -> None:

for service in services:
service.initiate()
time.sleep(0.02)
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ def init_i2c(self: Keypad) -> None:
status='released' if is_mic_active else 'pressed',
)

self.clear_interrupt_flags(new_i2c)

def key_press_cb(self: Keypad, _: object) -> None:
"""Handle key press dispatched by GPIO interrupt.
Expand Down
File renamed without changes.

0 comments on commit 62f1f20

Please sign in to comment.