Skip to content

feat(tools): host the simulated pedal over HTTP - #12

Merged
isod89 merged 2 commits into
isod89:mainfrom
VinSpee:fm/openpocket-upstream-pedal-simulator
Nov 8, 2026
Merged

isod89 merged 2 commits into
isod89:mainfrom
VinSpee:fm/openpocket-upstream-pedal-simulator

Conversation

@VinSpee

@VinSpee VinSpee commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

This adds node tools/op.mjs sim (also make 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.c and tests/uisim.c were extended so the real editor-protocol and screen code can be driven interactively, and tests/test_sim.mjs covers the new server. docs/SIMULATOR.md describes 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.

…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.
@isod89
isod89 merged commit 0c67b16 into isod89:main Nov 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants