Repository navigation
feat(bench): default the bench tools to one plate's carrier - #11
Merged
Merged
Conversation
The harness is built as one stripboard carrier per plate (docs/harness.md), but multi_cell.py and carrier_check.py defaulted to the old toe set (L1, L2, R1, R2) and live_multi.py could only show those four cells. - multi_cell.parse_channels: L / R (a plate's four), all, or names; the default is plate L. carrier_check --units uses it too, and adds the plate L BUS OUT -> plate R BUS IN check when both plates are wired. - live_multi --channels (default L): draws each plate in use with its corners from open_fp.config, the CoP on each plate (toe/heel, inner/outer), and the L/R split when both plates are shown. - docs/harness.md 4-5: drop the now-default flags; add --channels R/all. Co-Authored-By: Claude Opus 5.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.
What does this PR do?
Brings the bench tools in line with the "one stripboard carrier per plate" build in
docs/harness.md(#10):multi_cell.py: newparse_channels():--channelstakesL/R(a plate's four units),all, or names likeL1,R2(parts combine, e.g.L,R1). The default is nowL(L1–L4), not the old toe set L1, L2, R1, R2. With--stdinand no--channelsit still expects whichever units answered in the log.carrier_check.py:--unitsuses the same parser, defaultL. The chain check now reads "plate L BUS OUT to plate R BUS IN". It is added automatically in theunostage when the units span both plates (it used to be behind aheel_chainedflag nothing set).live_multi.py: new--channels(defaultL). The page is built from a layout taken fromopen_fp.config(corner positions and plate centres). It draws each plate in use with its four corners (dashed sockets for corners not in--channels), the total, a CoP dot on each plate plus text ("Plate L: 24 mm toe, 18 mm outer of centre"), and the L/R split and stance CoP when both plates are shown. Tare and Calibrate are unchanged. All 8 channels have colours.docs/harness.md§4–5: removed the flags that are now the default, and added--units R/all,--channels R/alland the live-view variants.Why was this required?
The owner built one carrier per plate, so the docs were changed to that (#10). The tools still defaulted to the toe cells from both plates. Running
multi_cell.pyorcarrier_check.pywith no flags on the plate L carrier would expect R1/R2 and report L3/L4 as unexpected.live_multi.pycouldn't show a heel cell at all, and its "centre of load across the toe line" doesn't mean anything for a single plate.Automated tests
tests/test_bench_multi.py:parse_channels(default is plate L,r/allaliases, combining, de-duplicating, unknown names rejected);run_stdin(None)expects only the units that answered in the log, and a bad--channelsreturns 2.tests/test_bench_carrier.py: the plate R carrier checks D7 and A2 for R1 and R4, with no DRDY check. The chain check appears only in theunostage when both plates are wired. Supply resistance for all 8 units with no cells is about 250 Ω.tests/test_bench_live_multi.py: the layout for plate L matchesopen_fp.config(L1 −307.2/+122.4 toe outer, L3 −62.4/−122.4 heel inner, plate centre −184.8). Covers both plates and a partial toe set (the missing corners are markedon: false). The rendered page has its title and a parseableLAYOUTJSON filled in.pytest: 210 passed.ruff check: clean.pylint: 9.38/10.Manual (human) testing
No hardware run yet. That's for the owner on the plate L carrier (
multi_cell.pyandlive_multi.pywith no flags).What I checked by hand, without hardware:
live_multi's rendered page with a local fake hub sending syntheticads1220_alllines (readbacks, mode, 100 ms windows with load) and opened it in a browser, with no console errors:--channels L: one plate, L1–L4 at the right corners (L1 toe-outer at top-left, L3 heel-inner at bottom-right). With L1 loaded most, the CoP read "24 mm toe, 18 mm outer of centre" and the dot moved up and to the left (outer on plate L). No L/R split shown.--channels all: both plates, 8 cells, split "L 43 % / 57 % R", per-plate CoP lines and a stance line "32 mm toward R of the centre line". All 8 rows in the unit table, all 8 traces in the chart legend.carrier_check.py --units X1prints--units: unknown channel 'X1'; use L, R, all or names from …and exits 2.multi_cell.py --helpshows the new--channelshelp.Checklist
pytest)ruff check app/python tools tests docs/img)PYTHONPATH=app/python:tools/sim:tools/bench pylint app/python/open_fp tools/sim tools/bench --fail-under=9)docs/VERIFIED.md(measurements, fit checks, pin changes) — n/a, no hardware changedocs/img/corner-assembly.svg, CAD STL/STEP) — n/a🤖 Generated with Claude Code