Skip to content

Make Wio Tracker L1 joystick pins overridable - #3987

Open
jadonfloyd wants to merge 1 commit into
meshcore-dev:devfrom
jadonfloyd:wio-l1-overridable-joystick-pins
Open

jadonfloyd wants to merge 1 commit into
meshcore-dev:devfrom
jadonfloyd:wio-l1-overridable-joystick-pins

Conversation

@jadonfloyd

Copy link
Copy Markdown

Requested by Jadon · project thread

What

Wraps the JOYSTICK_UP/DOWN/LEFT/RIGHT/PRESS defines in variants/wio-tracker-l1/variant.h in #ifndef guards so a build can remap the joystick pins with -D flags. Defaults are unchanged.

This follows @ripplebiz's suggestion on #2185 (simpler alternative to a JOYSTICK_ROTATION flag): just make the pin defs overridable.

Example

For an enclosure with the display mounted rotated 90° relative to the joystick (up/down should navigate left/right):

build_flags = ${env:WioTrackerL1Eink_companion_radio_ble.build_flags}
  -D JOYSTICK_UP=PIN_BUTTON4
  -D JOYSTICK_DOWN=PIN_BUTTON5
  -D JOYSTICK_LEFT=PIN_BUTTON3
  -D JOYSTICK_RIGHT=PIN_BUTTON2

Testing

  • WioTrackerL1Eink_companion_radio_ble builds stock and with the four flags above (no redefinition warnings). Preprocessed target.cpp shows joystick_left/right on pins 27/28 stock and 26/25 remapped.
  • Tested on a Wio Tracker L1 E-ink with the equivalent remap (board-down → left, board-up → right); navigation works as expected.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XZSU585Bf7KxVsYxYZyfun

Wrap the JOYSTICK_* pin defines in variants/wio-tracker-l1/variant.h
in #ifndef guards so builds can remap them with -D flags, e.g. for
enclosures that mount the display rotated 90 degrees relative to the
joystick. No change to default behavior.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XZSU585Bf7KxVsYxYZyfun

This branch has not been deployed

No deployments
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