feat(console): analog-input calibration UI (two-point, deadband) + wire 0xA5/0xA6/0xA7 + ai_cal (S2) — Studio v0.75 - #191
Open
mbreiser wants to merge 3 commits into
Open
feat(console): analog-input calibration UI (two-point, deadband) + wire 0xA5/0xA6/0xA7 + ai_cal (S2) — Studio v0.75#191mbreiser wants to merge 3 commits into
mbreiser wants to merge 3 commits into
Conversation
mbreiser
force-pushed
the
feat/console-analog-cal
branch
from
September 9, 2026 12:24
62ca46d to
9017158
Compare
mbreiser
force-pushed
the
feat/console-analog-in
branch
from
September 9, 2026 12:25
17e97b0 to
e169159
Compare
mbreiser
force-pushed
the
feat/console-analog-cal
branch
2 times, most recently
from
September 9, 2026 13:46
59965c8 to
8a5bce4
Compare
mbreiser
force-pushed
the
feat/console-analog-in
branch
from
September 10, 2026 16:55
9312b56 to
b3dfb8a
Compare
…o-point, deadband, clear, read) + wire 0xA5/0xA6/0xA7 + ai_cal capability (S2) — Studio v0.75
Studio half S2 of docs/development/analog-input-plan.md § 4. Stacked on S1
(feat/console-analog-in). Pairs with firmware F2 (feat/ai-calibration).
- js/arena-wire-g6.js: OPCODES SET_ANALOG_CAL 0xA5 / GET_ANALOG_CAL 0xA6 /
GET_ANALOG_IN_RAW 0xA7; ANALOG_CAL_ACTIONS {sampleGround 0, sampleOpen 1,
setDeadband 2, clear 0xFF}; encodeSetAnalogCal(ch, action, mv) with range
checks, encodeGetAnalogCal, encodeGetAnalogInRaw; decodeAnalogCal (18-byte
record -> {version, adcBits, source, sdMirrorOk, channels[{valid, rawOpen,
rawGnd, deadbandMv, gainMvPerCount, offsetMv}]}), decodeAnalogInRaw;
CAPABILITY_BITS bit 6 'ai_cal'. Tests 186 -> 204.
- js/studio-analog-in.js: nominalMv, calLine, calMv, calStepsText,
describeCalSource, calTableRows.
- arena_studio.html: "calibrate" row in the Analog In panel — channel select,
Read (0xA6 + 0xA7 -> table with both points, mV/count, offset, deadband, live
raw on the calibrated and nominal scales), "1 · Sample +10 V (open)",
"2 · Sample 0 V (ground cap)", deadband Set, Clear (confirm). Writes are
advanced-only (SAFE_BLOCKED_CMDS) and gated on the ai_cal capability; every
write is logged to the Console and to the bridge run log (event analog_cal),
and refreshes the 0xA4 flags text. Warns when the +10 V point reads low
(BNC not open / un-reworked board). HELP text updated; footer v0.75.
- tests/test-studio-analog-in.js 105 -> 148: calibration math + wiring incl.
the safe-mode set (writes blocked, read allowed) and the ai_cal gate.
- Release notes v0.75.
Not bench-tested (no hardware). Browser check offline: panel renders, handlers
wired; the real two-point flow needs a board with ai_cal firmware.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… 0xA5 get-analog-in-raw, 0xA6 set-analog-cal, 0xA7 get-analog-cal (matches firmware feat/ai-calibration) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…libration action at a time Codex review item 6: the calibration writes used the transport's 500 ms default while the controller averages 256 reads (~10 ms) and writes EEPROM + the SD mirror — a slow card would have tripped the timeout and left the UI stale; use 2 s like the rig-I/O apply path. Repeated clicks queued further EEPROM writes behind the first; a calibrating flag now refuses them with a note. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
mbreiser
force-pushed
the
feat/console-analog-cal
branch
from
September 10, 2026 22:40
8a5bce4 to
846df07
Compare
mbreiser
added a commit
that referenced
this pull request
Sep 10, 2026
…(fw #48), first reworked-board analog results Merge plan: B1 rows ticked with the rig05-mr run (#188 merged f744e12, #186 closed), B2 ticked (#190 merged 880ffd5, #191 rebased --onto and held), 12-18 bring-up + loopback numbers. Handover: status table + Windows gotchas (Git Bash TZ prints UTC, base-retarget runs no CI, rebase --onto after a squashed parent, PYTHONUTF8, teensy upload port/power). Analog plan § 5.1: T1/T6 results — AI1 tolerance-class, AI2 stage-2 divider ≈ 0.26 (inspect R179/R181). CLAUDE.md: Windows-safe ET timestamp recipe. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
mbreiser
added a commit
that referenced
this pull request
Sep 10, 2026
… lab-PC handover + 2026-09-10 bench results (#192) * docs: controller telemetry ring buffer — feasibility, design, T1–T6 + L1–L4 bench plan (no code) Proposal for a controller-side RAM ring buffer (frame/command/state events, analog ticks yoked to frame index) drained live over USB with an ack-cursor, replacing the SD-card event-log shape of LAB-149. Answers the two-file vs integrated question (sidecar first), timestamps/clock-fit, and lays out the glass-to-glass latency measurement plan for FicTrac closed loop. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * docs(telemetry proposal): use the 0xA8/0xA9 opcodes reserved by firmware PR #47 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * docs: merge + bench plan for 2026-09-08/09 (run-log stack, analog F1/F2 + S1/S2, cleanup) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * docs(merge plan): #186/#188 rebased; flag gzip-blind runlog index builder Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * docs(merge plan): #189 merged; gzip index-builder fix built + tested (PR pending) Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * docs(merge plan): #193 merged + installed in the course repo; Action rebuild green Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * docs(merge plan): corpus gates 174/174 on rebased #188; index.json filter fix Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * docs: Codex cross-review of the pending merge-plan work (2026-09-09) — fixed bugs, discussion items, open questions Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * docs(merge plan): stacks rebased onto main after #193; pixi.toml test-line collision note Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * docs(codex review + merge plan): second pass — discussion items 4/6/7/8/9/10 done Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * docs: lab-PC handover — install list, branch state, gate B1 step-by-step, minimal analog, firmware, gotchas Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * docs(lab-pc handover): optional bench launcher — FicTrac / configGui / bridge / Studio buttons with status Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> * docs: 2026-09-10 bench day — gates B1/B2 passed, 12-18 arena flashed (fw #48), first reworked-board analog results Merge plan: B1 rows ticked with the rig05-mr run (#188 merged f744e12, #186 closed), B2 ticked (#190 merged 880ffd5, #191 rebased --onto and held), 12-18 bring-up + loopback numbers. Handover: status table + Windows gotchas (Git Bash TZ prints UTC, base-retarget runs no CI, rebase --onto after a squashed parent, PYTHONUTF8, teensy upload port/power). Analog plan § 5.1: T1/T6 results — AI1 tolerance-class, AI2 stage-2 divider ≈ 0.26 (inspect R179/R181). CLAUDE.md: Windows-safe ET timestamp recipe. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.1 <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.
Studio half S2 of docs/development/analog-input-plan.md § 4. Stacks on S1 (#190) — retarget to
mainas #190 merges. Pairs with firmware F2 (reiserlab/LED-Display_G6_Firmware_Arena branchfeat/ai-calibration); without that firmware the panel says "needs ai_cal firmware" and the calibration controls do nothing.What changed (Studio v0.75)
Analog In panel → calibrate row
calibrated (both points)/+10 V point ✓ · 0 V point —/no points), the two raw points, mV per count and offset, deadband, and the live raw count evaluated on the calibrated and the nominal scale so the effect of the calibration is visible.SAFE_BLOCKED_CMDS; Read stays available), gated on theai_calcapability, logged to the Console and to the bridge run log (event: 'analog_cal'with the returned record), and they refresh the panel's flags text.Wire (
js/arena-wire-g6.js):GET_ANALOG_IN_RAW0xA5 /SET_ANALOG_CAL0xA6 /GET_ANALOG_CAL0xA7,ANALOG_CAL_ACTIONS,encodeSetAnalogCal(ch, action, mv)with range checks,decodeAnalogCal(18-byte record → channels with the implied linea/b),decodeAnalogInRaw, capability bit 6ai_cal.Module (
js/studio-analog-in.js):nominalMv,calLine,calMv,calStepsText,describeCalSource,calTableRows.Tests
tests/test-arena-wire-g6.js186 → 204: encoders (names and codes, deadband bytes), rejections (ch 3, unknown action, deadband range/type), record decode (header, valid channel line a/b, invalid channel, short payload), raw decode, capability name.tests/test-studio-analog-in.js105 → 148: nominal/calibrated math, step text, source text, table rows with and without live raws; HTML wiring — element ids, all five handlers, the safe-mode set blocks the four writes and not the read, theai_calgate, theanalog_callog event, the clear confirmation, footer v0.75.pixi run testpasses; touched JS Prettier-clean; inline Studio scripts parse.🤖 Generated with Claude Code