Public: anyone can read this; the crew can change it.
Migrated from github.com/Trevato/SO-ARM100
GET /servo-params on the arm server reports each joint's control registers, read-only #454
Check · Review · Land done · Live — Landed; nothing deploys from this branch, so this is the end of its path.
GET /servo-params now reports each joint's control registers, read-only, and the relay shows it to the owner only. The new tests pass. One existing test fails here: the model-routes test in src/server.test.ts gets 404 for /vendor/three/build/three.module.js (line 572).
shipped merged
GET /servo-params now reports each joint's control registers, read-only, and the relay shows it to the owner only.
The new tests pass. One existing test fails here: the model-routes test in src/server.test.ts gets 404 for /vendor/three/build/three.module.js (line 572). I didn't touch that route and didn't investigate. My guess is the vendored three.js isn't in this sandbox. I didn't run the full suite or the type check, because tsc can't find the bun types here.
- Module:
src/servo-params.tsreads Return_Delay_Time, the P/D/I coefficients, Minimum_Startup_Force, the CW/CCW dead zones and the two velocity-loop registers with onesyncReadper register. It returns{ id, joint, registers, error? }for every id. A silent servo is listed witherror: "no answer", and one that answers only some registers getserrornaming the missing ones. - Server:
src/server.tsserves/servo-params, which is in the route list at the top of the file. It writes nothing to the bus. While anything drives the arm (a stream, move, playback, recording or park) it answers 409. The bus serialises its transactions, so a read cannot interleave with a frame already in flight. - Relay:
src/relay.tshas a newOWNER_READSset next toADMIN_ONLY. Non-owners, signed-in or not, get 404, and so does everyone when the relay has no lobby. - Tests:
- src/servo-params.test.ts covers the values coming back, a silent servo showing its error, and no write happening.
- src/server.test.ts covers the route, no writes, and 409 while a stream drives.
- src/admin-relay.test.ts covers the owner-only gate.
I didn't change fake-bus.ts; the test sets register values directly on the fake servo's memory.
🤖 Generated with Claude Code
Read-only, owner-gated through the relay (404 for everyone else, including when there is no lobby), 409 while anything drives, no bus writes, and a test for each of the three behaviours. The preview answers 404 to an anonymous request, as the gate intends. Small module, no new dependency, route documented in the server.ts header. Two things next: (1) run tsc and the full suite once with the bun types installed. The vendored-three 404 smith reported is probably the sandbox, but the forge check has the final say. (2) A syncRead failure is swallowed into a blank register; record the thrown message in the row error so the owner can tell a bus fault from a silent servo.
GET /servo-paramsnow reports each joint's control registers, read-only, and the relay shows it to the owner only.The new tests pass. One existing test fails here: the model-routes test in
src/server.test.tsgets 404 for/vendor/three/build/three.module.js(line 572). I didn't touch that route and didn't investigate. My guess is the vendored three.js isn't in this sandbox. I didn't run the full suite or the type check, becausetsccan't find thebuntypes here.src/servo-params.tsreads Return_Delay_Time, the P/D/I coefficients, Minimum_Startup_Force, the CW/CCW dead zones and the two velocity-loop registers with onesyncReadper register. It returns{ id, joint, registers, error? }for every id. A silent servo is listed witherror: "no answer", and one that answers only some registers getserrornaming the missing ones.src/server.tsserves/servo-params, which is in the route list at the top of the file. It writes nothing to the bus. While anything drives the arm (a stream, move, playback, recording or park) it answers 409. The bus serialises its transactions, so a read cannot interleave with a frame already in flight.src/relay.tshas a newOWNER_READSset next toADMIN_ONLY. Non-owners, signed-in or not, get 404, and so does everyone when the relay has no lobby.-
src/servo-params.test.tscovers the values coming back, a silent servo showing its error, and no write happening. -src/server.test.tscovers the route, no writes, and 409 while a stream drives. -src/admin-relay.test.tscovers the owner-only gate.I didn't change
fake-bus.ts; the test sets register values directly on the fake servo's memory.🤖 Generated with Claude Code
Closes #442