Skip to content

refactor(mcp23009e): Migrate menu_navigation example to steami_screen.#395

Open
MatteoCnda1 wants to merge 1 commit intomainfrom
refactor/mcp23009e-menu-navigation
Open

refactor(mcp23009e): Migrate menu_navigation example to steami_screen.#395
MatteoCnda1 wants to merge 1 commit intomainfrom
refactor/mcp23009e-menu-navigation

Conversation

@MatteoCnda1
Copy link
Copy Markdown

Summary

Migrate lib/mcp23009e/examples/menu_navigation.py from direct SSD1327 calls to the steami_screen widget API. Closes #374

Changes

  • Replaced manual display.text() and hand-coded positioning with screen.menu(), screen.title(), screen.value() and screen.subtitle()
  • Replaced ssd1327 direct instantiation with SSD1327Display + Screen wrapper
  • Added @micropython.native decorator on is_any_pressed() for better performance in the button polling loop
  • Extracted is_any_pressed() as a reusable helper function
  • Removed manual layout constants (X0, TITLE_Y, ITEM_Y, etc.) — layout is now handled by steami_screen

Checklist

  • ruff check passes
  • python -m pytest tests/ -k mock -v passes (no mock test broken)
  • Tested on hardware (STM32WB55 / STeaMi board)
  • README updated (if adding/changing public API) — N/A, example only
  • Examples added/updated (lib/mcp23009e/examples/menu_navigation.py)
  • Commit messages follow <scope>: <Description.> format

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.

refactor(mcp23009e): Migrate menu_navigation example to steami_screen.

1 participant