Skip to content

feat: stick-as-nav, configurable deadzone, and menu bug fixes from hardware bring-up - #54

Merged
thePunderWoman merged 1 commit into
mainfrom
stick-nav-deadzone-menu-fixes
Sep 23, 2026
Merged

thePunderWoman merged 1 commit into
mainfrom
stick-nav-deadzone-menu-fixes

Conversation

@thePunderWoman

Copy link
Copy Markdown
Owner

Summary

Continued hands-on testing of the on-device menu turned up several real bugs and one missing feature:

  • Left/Right button mapping was backwardsButtons::kLeftUp/kLeftDown and kRightUp/kRightDown were mapped to the physically wrong pairs (Vol/Trigger swapped). Confirmed against the real controller and fixed; nothing else hardcodes the physical mapping, so this one change fixes it everywhere (menu-open combo, uplink suppression, Button Test display).
  • Calibration now confirms with Macro1, not Stick Click — clicking the stick itself risks nudging its position right as center/extremes are being captured, and there's no button actually labeled "Enter" on this controller.
  • Droid-naming screen fixes — it had zero on-screen instructions, and Bumper used to backspace one character at a time before actually leaving (looked broken unless you'd already cleared everything you'd typed). Added instructions; Bumper now always exits immediately, matching every other screen.
  • Thumbstick as menu navigation — an alternative to the Left Up/Down buttons everywhere nav applies, with fire/rearm thresholds so holding it doesn't spam-scroll. Tuned down from 60% to 25% after real hardware testing showed 60 wasn't reliably reachable in every direction even at full push.
  • Stick calibration safety gateconfirmDone() now refuses to finish unless all four extremes are at least 300 raw ADC counts from center. Confirming too early was silently saving a near-zero range, which made ordinary ADC noise read as huge stick movement (this is the bug behind today's "cursor won't stop scrolling" report). Rolling-step instructions rewritten to be explicit ("Rotate stick all the way around 3 times, return to center, then press Macro1").
  • Configurable stick deadzone — new "Stick Deadzone" menu screen, presets 0/3/5/8/12/15/20%, persisted alongside the rest of calibration. Previously a fixed 3% baked into the code.
  • Systemic redraw bug, fixed properly — the display only redrew when the current screen or main-menu selection changed, so any in-place change that didn't also switch screens (list scrolling, text-entry letters, calibration step progress, Display/Power Config value cycling, the new Stick Deadzone value) silently never appeared after a screen's first render. This is the root cause behind several "button doesn't seem to do anything" reports today (droid-name letters not updating, Power/Display Config cursor not moving). Fixed by having MenuController::tick() report whether it fired a nav event and redrawing whenever any menu-mutating call happens, rather than continuing to enumerate individual per-screen fields — this had already slipped through once before (Button Test's last-pressed-button field).

Test plan

  • pio test -e native — 284/284 passing
  • pio run -e esp32s3 — builds clean
  • All fixes verified against real hardware this session: stick-up navigation, Display Config and Power Config cursor movement, droid-name letter scrolling, and the calibration safety gate all confirmed working after the fixes

🤖 Generated with Claude Code

…rdware bring-up

Found and fixed during continued hands-on testing of the on-device menu:

- Left Up/Down and Right Up/Down were mapped to the physically wrong
  button pairs (Vol/Trigger swapped) -- confirmed against the real
  controller and corrected in Buttons::kPins.
- Stick calibration's confirm step used Stick Click, which risks nudging
  the stick right as its center/extreme position is being captured, and
  there's no button actually labeled "Enter" on this controller --
  switched calibration screens to confirm with Macro1 instead.
- The droid-naming screen had zero on-screen instructions and Bumper
  would backspace one character at a time before actually leaving,
  which looked broken to anyone who hadn't already cleared what they'd
  typed -- added instructions and made Bumper always exit immediately,
  matching every other screen's universal-back convention.
- Added the thumbstick as an alternative to the Left Up/Down buttons for
  menu navigation everywhere it applies, with a fire/rearm threshold so
  holding it doesn't spam repeated scrolls. Tuned down from an initial
  60% threshold to 25% after real hardware testing showed 60 wasn't
  reliably reachable in every direction even at full physical push.
- StickCalibrationFlow::confirmDone() now refuses to finish unless every
  one of the four extremes is at least 300 raw ADC counts from center --
  confirming too early (before the stick was actually pushed to its
  extremes) was silently saving a near-zero range, which made ordinary
  ADC noise read as huge stick movement once anything (menu nav or
  gameplay) consumed the calibrated percentage. Rewrote the rolling-step
  instructions to be explicit about what to actually do.
- Added a user-adjustable stick deadzone (Stick Deadzone menu screen,
  presets 0/3/5/8/12/15/20%, persisted via the existing calibration NVS
  namespace) -- previously a fixed 3% baked into calibrateStickAxis().
- Fixed a systemic redraw bug: the display only redrew when
  currentScreen()/selectedMainMenuItem() changed, so any in-place change
  that didn't also switch screens -- list scrolling, text-entry letters,
  calibration step progress, Display/Power Config value cycling, the new
  Stick Deadzone value -- silently never appeared after a screen's first
  render. Fixed by having MenuController::tick() report whether it fired
  a nav event and redrawing whenever any menu-mutating call happened
  this tick, rather than continuing to enumerate individual fields (this
  is the second time a new per-screen field slipped through that way).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@thePunderWoman
thePunderWoman merged commit 7c094b6 into main Sep 23, 2026
2 checks passed
@thePunderWoman
thePunderWoman deleted the stick-nav-deadzone-menu-fixes branch September 23, 2026 05:45
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