feat(cli): wavegrid signals — send, probe and listen to OSC for debugging Pangolin - #109
Merged
Merged
Conversation
Contributor
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
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.
Summary
Debugging "is BEYOND receiving anything?" and "which zone is fixture 7?" with a show that streams a whole grid at 30 Hz is hopeless. This adds three hand-driven OSC commands that aim at the project's configured target, so they exercise the same path — same encoders, same addresses — as the running show:
listenis the piece that makes the rest verifiable: UDP gives no delivery signal, so pointing the show at--host 127.0.0.1 --port <n>and listening there is how you see the exact bytes the hardware would get (verified end-to-end locally — probe → listen shows the/beyond/zone/N/livecontrol/*frames and the closing blackout).Two details worth knowing:
255→f:255,i:3→ integer,s:text→ string.adapter.close()on a UDP socket discards queued sends, so an early version's blackout never left the machine — the lit fixture would stay lit after the probe "finished". The probe now holds one adapter for the whole walk and waitsFLUSH_MSafter the final dark frame before closing.New primitives live in
@wavegrid/osc(sendOscMessage,listenForOsc,parseOscArg,parseIndexRange,probeGrid) sonode-oscstays in one package; the CLI gains a@wavegrid/oscdependency.Aiming precedence, with no guessing:
This is deliberate output on a target the operator configured. It is unrelated to
tools/traffic, which stays passive: nothing here replays captures or invents hardware commands, andprobeprints a "lasers will output" warning and supports--dry-run.Test plan
packages/osc/__tests__/debug.test.ts— arg typing/tags, index-range expansion, one-lit-fixture grids, plus a real UDP round trip (sendOscMessage→listenForOsc) asserting the address and float survive.packages/cli/__tests__/osc-signals.test.ts— target resolution: config BEYOND, FB4 fallback, flags winning, port-only override, and the refusal when nothing is configured.signals send, thensignals probe --zones 0-1againstsignals listenon loopback; confirmed the blackout frame arrives (it did not before the flush fix).pnpm -r test,pnpm -r run lint, and CLI/OSC builds pass.Link to Devin session: https://app.devin.ai/sessions/ec43152136134467a853ec0bbf783ea9
Requested by: @pyramation