docs: Bring-up context + rev3/rev4 keypad correction (plan for PiFinder.bringup) - #550
Draft
brickbots wants to merge 1 commit into
Draft
docs: Bring-up context + rev3/rev4 keypad correction (plan for PiFinder.bringup)#550brickbots wants to merge 1 commit into
brickbots wants to merge 1 commit into
Conversation
Groundwork for a `python -m PiFinder.bringup` bench entry point that validates a freshly assembled board: screen, keypad backlight, buzzer, IMU, charger comms and every switch. Adds the Bring-up glossary, which names the distinction the tool's exit status turns on: a check is **probed** (the program reads the answer itself), **exercised** (the builder acts, the program verifies) or **witnessed** (the program can only emit; the builder is the sensor). Only probed and exercised checks can gate a verdict — a program cannot know whether sound came out of a buzzer. It also names **pre-flight** (a provisioning check on the card, not the board) so a missing kernel overlay is never diagnosed as a bad part, and **population map** (which matrix positions carry a switch on a given revision). Corrects the keypad layout in the UI glossary, which still showed the 4-column rev3 pad. The matrix grew to 5 columns in #498: rev4 moved the directional cluster off the bottom row into col 4 and gave it a centre SQUARE, so rev3 has 17 switches and rev4 has 18, with two SQUARE positions. Both clusters emit the same logical keys, so UI code is revision-agnostic — but a logical key therefore does not identify a physical switch, which is why bring-up speaks in matrix positions. Includes the implementation plan for the entry point itself; the code lands in follow-up PRs. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Jul 26, 2026
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.
Groundwork for a
python -m PiFinder.bringupbench entry point for validating freshly assembled rev4 boards. Docs and plan only — no code.What's here
docs/ax/bringup/CONTEXT.md(new) — glossary for the Bring-up context, plus itsCONTEXT-MAP.mdentry and relationships.docs/ax/ui/CONTEXT.md— the keypad-layout block still showed the 4-column rev3 pad; the matrix has been 5 columns since Rev-4 hardware enablement: battery telemetry, sound/earcons, power button, SSD1333 display #498.bringup-implementation-plan.md— the full implementation plan.The vocabulary that does the work
A check is one of three kinds, and the kind decides whether it can gate the exit status:
A program cannot know whether sound came out of a buzzer, so witnessed checks are reported as emitted and the verdict stays silent about them.
Two more: pre-flight (a provisioning check on the card — kernel overlays, bus enablement — so a misprovisioned image is never diagnosed as a bad board) and population map (which matrix positions carry a switch on a given revision).
The keypad correction
The matrix grew from 4 to 5 columns in #498. rev4 moved the directional cluster off the bottom row into col 4 and gave it a centre
SQUARE:rev3 = 17 switches, rev4 = 18, with two
SQUAREpositions. Both clusters emit the same logical keys, so UI code stays revision-agnostic — but a logical key therefore does not identify a physical switch, which is why bring-up speaks in matrix positions rather than keys.Two findings worth a look
pifinder_setup.sh:64may leave the buzzer unrouted. It provisions onlydtoverlay=pwm,pin=13,func=4— a single-channel overlay routing ch1 → GPIO13 (keypad backlight). The buzzer is ch0 → GPIO12, and nothing in the repo provisionspwm-2chan. The Pi's PWM block always exposes two channels, soHardwarePWM(pwm_channel=0)exports fine and drives no pin: silent, with no error. Needs checking against a reference rev4 card's/boot/config.txt.Sequencing
PiFinder/keypad.py(keyboard_pi.pycan't be imported off-Pi), a pure data move landed on its own so a keypad regression stays bisectable.PiFinder/bringup.py+ tests.🤖 Generated with Claude Code