Skip to content

examples: Update all from API v8 to v9. #395

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

Draft
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

andrewleech
Copy link
Contributor

This PR attempts to update all the examples to the current v9 api.

CLaude Code (AI) was used heavily for this, with the stubs generated in #388 providing the neccesary input to make these changes automatically.

This PR is draft still pending testing on real hardware.

pi-anl added 17 commits August 12, 2025 13:19
- Replace move_foreground() with move_to_index() for v9 compatibility
- Change lv.indev_get_act() to lv.indev_active()
- Update del_async() to delete_async()
- Update set_ready_cb() to set_completed_cb()

These changes align with the LVGL v9 API naming conventions.
Replace lv.scr_act() with lv.screen_active() to align with v9 API.
The example was using machine.SPI and machine.Pin without importing the
machine module.
Fix center() method call and add_event() -> add_event_cb() for LVGL v9.
Fix add_event() -> add_event_cb() and align() offset parameters for LVGL v9.
Remove offset parameters from align() method for LVGL v9.
Remove offset parameters from align() methods and use separate position setters for LVGL v9.
Remove offset parameters from align() methods and use set_y() for positioning in LVGL v9.
Remove offset parameters from align() methods and use set_y() for positioning in LVGL v9.
Remove offset parameters from align() method for LVGL v9.
Fix lv.indev_get_act() -> lv.indev_active() for LVGL v9.
Replace set_buffers() with set_draw_buffers() and set_render_mode() for LVGL v9.
Use lv.draw_buf_create() instead of framebuffer() for creating draw buffers.
…ndling.

Add comprehensive docstring explaining widget creation and theming.
Add error handling for display_driver import.
Improve code organization and readability.
…handling.

Add comprehensive docstring explaining PNG decoder usage and requirements.
Add error handling for display driver import and PNG file loading.
Add fallback behavior when PNG file is not found.
Improve code organization and user feedback.
…documentation and error handling.

Add detailed docstring with font conversion commands and usage instructions.
Add error handling for display driver, filesystem driver, and font loading.
Improve code organization and user feedback.
Add fallback behavior when fonts fail to load.
Add missing machine module import for RP2 platform initialization.
Add detailed README covering all examples, platform support, and best practices.
Include troubleshooting guide, requirements, and contribution guidelines.
Provide clear overview of features demonstrated and usage instructions.
@andrewleech andrewleech marked this pull request as draft August 12, 2025 03:27
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.

2 participants