Repository navigation
feat(tools): host the simulated pedal over HTTP - #12
Merged
isod89 merged 2 commits intoNov 8, 2026
Merged
Conversation
…Web MIDI shim tests/edsim.c now also runs the pedal's screen (ui.h, via the shared tests/simlcd.h) and the control dispatch, and keeps its flash in a file (--persist). tools/sim.mjs hosts it: press/knob/state/screen/flash/SysEx API, a control page, and the installer and editor pages with a virtual Web MIDI injected. --update hosts tests/devsim.c for the installer. Adds tests/test_sim.mjs, docs/SIMULATOR.md and the openpocket-simulator skill; the verify and toolchain skills point to it. The stdin/stdout contract of devsim and edsim is kept.
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.
This adds
node tools/op.mjs sim(alsomake sim), which hosts the native simulated pedal behind a local HTTP API so a person or a script can drive it. It can press the footswitches and buttons, turn the knob, return the screen as a PNG, report the pedal's state, accept SysEx, and dump or reset the flash. It also serves the installer and editor pages with a virtual Web MIDI shim (tools/sim/webmidi-shim.js), so both pages can run against the simulated pedal in a browser.The simulators in
tests/edsim.candtests/uisim.cwere extended so the real editor-protocol and screen code can be driven interactively, andtests/test_sim.mjscovers the new server.docs/SIMULATOR.mddescribes it.This is host-only: it does not change the firmware, and it was not run on a real pedal. Sound, USB, Bluetooth and real timing are not simulated. The full host test suite passes.