Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run upgrade from system menu and signal handling #307

Merged
merged 14 commits into from
May 20, 2024
Merged

Conversation

woodcoder
Copy link
Contributor

This PR adds the ability to check for, and initiate, an upgrade from the system menu.

In addition, this PR changes the UI to respond to the following OS signals:

  • SIGUSR1 - shows the system menu - happens when the power button is pressed, so that the user may shutdown from the menu
  • SIGHUP - restarts the system - happens when usbmount detects an SD card or USB drive change, so that the library is re-read

The general menu button definitions, and view rendering, has been refactored into a more modular, configurable form by standardising the buttons.py and view.py API so these modules can be dynamically imported from subpackages.

Finally, the long press is made a little more predictable by waiting slightly longer before it repeats the event. This means it's easier to create a single long press event, allowing more predictable navigation through books.

@woodcoder woodcoder requested a review from pachpict May 20, 2024 10:48
@woodcoder woodcoder self-assigned this May 20, 2024
@woodcoder woodcoder merged commit 3433310 into main May 20, 2024
2 checks passed
@woodcoder woodcoder deleted the system-menu branch May 20, 2024 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant