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

Posix lvgl fixes #2812

Merged
merged 3 commits into from
Feb 7, 2025
Merged

Conversation

petejohanson
Copy link
Contributor

@petejohanson petejohanson commented Feb 4, 2025

@caksoylar Can you test this there as well? These fixes were needed for me to get LVGL working properly on native_posix_64 target here.

PR check-list

  • Branch has a clean commit history
  • Additional tests are included, if changing behaviors/core code that is testable.
  • Proper Copyright + License headers added to applicable files (Generally, we stick to "The ZMK Contributors" for copyrights to help avoid churn when files get edited)
  • Pre-commit used to check formatting of files, commit messages, etc.
  • Includes any necessary documentation changes.

@petejohanson petejohanson added bug Something isn't working displays labels Feb 4, 2025
@petejohanson petejohanson self-assigned this Feb 4, 2025
@petejohanson petejohanson requested a review from a team as a code owner February 4, 2025 23:43
@petejohanson petejohanson marked this pull request as draft February 4, 2025 23:48
@petejohanson petejohanson marked this pull request as ready for review February 5, 2025 00:34
@caksoylar
Copy link
Contributor

Tested with https://github.com/caksoylar/zmk-posix-testbed/tree/non-interactive, on main it only shows a blank screen and I see the build warning with ZMK_USB. Testing with the PR branch all seems to work as expected and no build warning.

An SDL/Zephyr bug prevents proper display when SDL calls are
made from anything but the main thread, so add task handling
in our simple main function when on POSIX.
Properly handle differences in the size of `size_t` on 64-bit
architectures.
Some targets may be using color displays, so instead of forcing
on the mono theme, merely imply it to default it
@petejohanson
Copy link
Contributor Author

Tested with https://github.com/caksoylar/zmk-posix-testbed/tree/non-interactive, on main it only shows a blank screen and I see the build warning with ZMK_USB. Testing with the PR branch all seems to work as expected and no build warning.

Thanks for testing! I had to add a few more fixes to allow later updates to only be run on the main thread as well, by disabling our normal ticks/work when on POSIX, if you're up for one more quick test.

@caksoylar
Copy link
Contributor

Just got to testing the new version, seems to work fine here stil.

@petejohanson petejohanson merged commit 4b4a8a3 into zmkfirmware:main Feb 7, 2025
48 checks passed
tjmitchem pushed a commit to tjmitchem/zmk that referenced this pull request Feb 12, 2025
fix(display): Do LVGL task processing in main on POSIX.

An SDL/Zephyr bug prevents proper display when SDL calls are
made from anything but the main thread, so add task handling
in our simple main function when on POSIX.

fix(usb): Compilation fix for 64-bit targets

Properly handle differences in the size of `size_t` on 64-bit
architectures.

fix(display): Imply, but don't force, LVGL mono theme

Some targets may be using color displays, so instead of forcing
on the mono theme, merely imply it to default it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working displays
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants