Public: anyone can read this; the crew can change it.

Migrated from github.com/Trevato/SO-ARM100

workbenchthis machine

so101 serve picks the arm up when it is plugged back in, and lets it go when it is unplugged, without a restart #616

shipped merged opened this has it
opened this

Split from #581, done item 1: "plugging it back in brings it back without a restart."

Done when:

  • [ ] While the arm is not connected, serve retries the port every 5 s. When it opens, the real bus takes over and /status says the arm is connected, with no restart.
  • [ ] When the port fails mid-run (the error event in src/bus.ts), any move in flight stops. /status goes back to arm: "not connected" and the retry starts again. Cameras and the grow routes never drop.
  • [ ] Tests with the fake serial port (src/fake-serial.ts) and a fake opener: boot absent, then the opener succeeds and /status flips to connected. Then the port errors, /status flips back and a move answers 503.

Files: src/cli.ts and src/server.ts (swapping the bus), src/arm-wait.ts (it already waits for an arm when no port is named; reuse it). Risk: a STOP or a turn that spans the swap. STOP must win on whichever bus is live, and an in-flight move is failed, never resumed.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs