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

Migrate UI to LVGL #143

Merged
merged 12 commits into from
Dec 23, 2024
Merged

Migrate UI to LVGL #143

merged 12 commits into from
Dec 23, 2024

Conversation

gkoh
Copy link
Owner

@gkoh gkoh commented Dec 19, 2024

Completely rewrite UI to use LVGL.

M5ez was functional, but unmaintained and lacking support for multiple input methods.

Our hacked up internal copy is now removed.
M5StickC screens are now rotated to a more 'normal' portrait orientation.

LVGL supports a unified approach to:

  • multiple screen sizes
  • hardware button navigation
    • non-touch screen systems use 3 buttons:
      • previous
      • ok/select
      • next
  • touch screen navigation

LVGL is an event driven system, thus requiring some refactoring of the general control loops.
As a result the user interface logic is completely separated from the camera control.

All previous features have been ported across to LVGL. The only regression is the theme handling is clunky, which is still being developed upstream.
A restart of the device is necessary to have the new theme properly applied.

Whilst here, add feature support for the "FauxNY" camera, a fully virtual target that aids in test and debug.

Almost evey single line of code has been touched :/

gkoh added 5 commits December 13, 2024 11:00
Completely rewrite UI to use LVGL.
M5ez was functional, but unmaintained and lacking support for multiple
input methods.
Our hacked up internal copy is now removed.
M5StickC screens are now rotated to a more 'normal' portrait
orientation.

LVGL supports a unified approach to:
* multiple screen sizes
* hardware button navigation
   * non-touch screen systems use 3 buttons:
      * previous
      * ok/select
      * next
* touch screen navigation

LVGL is an event driven system, thus requiring some refactoring of the
general control loops.
As a result the user interface logic is completely separated from the
camera control.

All previous features have been ported across to LVGL. The only
regression is the theme handling is clunky, which is still being developed
upstream.
A restart of the device is necessary to have the new theme properly
applied.

Whilst here, add feature support for the "FauxNY" camera, a fully virtual target
that aids in test and debug.

Almost evey single line of code has been touched :/
Move device name to connect() phase for mobile devices.
NimBLE hangs if we try to issue characteristics I/O in a callback.

Tweak some UI items:
* connect message box strings
* change inactivity setting from slider to roller
@gkoh gkoh linked an issue Dec 19, 2024 that may be closed by this pull request
@gkoh
Copy link
Owner Author

gkoh commented Dec 19, 2024

Putting this here for early access (eg. @matthudsonau).

README and documentation need to be updated for the new UI before the next release.
There are a few minor UI artifacts remaining, but this is 99%.

Sadly, the original M5StickC has too few pixels to deliver an excellent experience, it is still supported, but the some compromises needed to be made. As a result, the separate firmware for the M5StickC will need to be reintroduced.

@gkoh
Copy link
Owner Author

gkoh commented Dec 19, 2024

This migration aims to replicate the existing menu-driven with LVGL, more changes to make touch screens more 'touchy' can be made.

For devices with hardware buttons, the following navigation scheme is used:

  • left button = previous
    • power button for M5StickC
    • left button for M5Core
  • middle button = select
    • big centre button for M5StickC
    • middle button for M5Core
  • right button = next
    • right button for M5StickC and M5Core

The 'buttons' for the M5Core2 are still active and can be used like the M5Core.

For hardware button devices, the widgets for changing things like brightness essentially require:

  • navigate and focus on the thing to change
  • click 'select' to 'edit' the item
  • change the item with prev/next buttons
  • click 'select' again to set the change

The shutter menu has been deliberately modified on the M5Core2 to experiment with touch screen features.
'Shutter' and 'Focus' become larger buttons.
'Shutter Lock' is a separate button and activated/deactivated on long-press (press and hold until it changes).

If you enable the 'FauxNY' feature, a 'FauxNY-x' device will always appear in the 'Scan' menu which can be connected and saved.
This proves to be exceedingly useful for testing UI changes without requiring actual camera hardware.

@gkoh gkoh merged commit fbe1545 into master Dec 23, 2024
6 checks passed
@gkoh gkoh deleted the migrate-lvgl branch December 23, 2024 03:24
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.

Design a better UI for the M5Stack Core2
1 participant