feat: stick-as-nav, configurable deadzone, and menu bug fixes from hardware bring-up - #54
Merged
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Continued hands-on testing of the on-device menu turned up several real bugs and one missing feature:
Buttons::kLeftUp/kLeftDownandkRightUp/kRightDownwere 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).confirmDone()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").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 passingpio run -e esp32s3— builds clean🤖 Generated with Claude Code