Add camera hub TTS and pan-tilt MOD - #645
Conversation
📝 WalkthroughWalkthroughAdds a camera hub command capability for validated TTS speech and Stack-chan pan/tilt movement. The capability delegates to audio and motion targets, returns structured acknowledgements, and is exposed through the runtime context with WASM and test-module wiring. ChangesCamera Hub Commands
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant CameraHub as Camera hub
participant Adapter as CameraHubCommandAdapter
participant Audio as Audio capability
participant Motion as Motion capability
CameraHub->>Adapter: Submit tts.speak or panTilt.move
Adapter->>Audio: Delegate speech command
Audio-->>Adapter: Return speech result
Adapter->>Motion: Delegate converted pose and duration
Motion-->>Adapter: Return movement result
Adapter-->>CameraHub: Return command acknowledgement
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Cloudflare PR previewOpen the latest preview for commit Immutable deployment: https://add3dfce.stack-chan-pr-preview.pages.dev Warning Pull request previews contain untrusted web and firmware code. Review the changes before granting WebSerial/Bluetooth permissions or flashing a device. |
|
@coderabbitai review |
✅ Action performedReview finished.
|
What
tts.speakandpanTilt.movecontext.audio.say()providercontext.motion.setPose()body posesArchitecture
Camera Hub command interpretation is application-specific and now lives entirely under
firmware/mods/examples/camera_hub_commands.A future generic
moddable-tailscalewrapper may live under the hostcontext.connectivitynamespace and own Tailnet startup, MagicDNS, WebSocket transport, reconnect, and lifecycle. The MOD will consume that transport and remain responsible for JSON command semantics and mapping commands to Stack-chan audio/motion capabilities.This PR does not add the Tailnet transport yet. The current MOD exposes
executeCameraHubCommand()as the protocol boundary and does not connect to the hub by itself.Impact
Release impact: minor for the new sample MOD. Existing host capabilities and runtime composition are unchanged.
Changeset:
.changeset/private-camera-hub-commands.md.Checks
npm run format -- --write mods/examples/camera_hub_commands: passesnpm run lint -- mods/examples/camera_hub_commands: passes with one pre-existing informational finding outside this MODnpm run check:architecture: 74 passednpm run mod:build -- m5stackchan_cores3 ./mods/examples/camera_hub_commands/manifest.json: passedThe first Linux smoke attempt did not reach the host-ready marker and had no exception log. Re-running the same job without code changes passed both smoke targets, confirming a transient mcsim startup failure.