Skip to content

Editor: the panel is controlpanel, with patch pads and LED-ring encoders - #48

Merged
bdbarnett merged 2 commits into
mainfrom
panel/controlpanel-2
Nov 1, 2026
Merged

bdbarnett merged 2 commits into
mainfrom
panel/controlpanel-2

Conversation

@bdbarnett

Copy link
Copy Markdown
Contributor

The editor's panel becomes controlpanel (PyDevices/pydevices#368), a hardware-style panel: patch pads in banks A to H, an encoder with a 16-LED ring per macro, a dot-matrix display, an engine light, and FINE, BYPASS and RELOAD buttons. lib/mpvst_panel/panel.py goes. mpvst_panel keeps EngineAdapter, unchanged, and re-exports controlpanel's build and Panel, so mpvst_editor.py doesn't change.

It follows a patch change from the host. The adapter's macro echoes on a program change (#42) move every encoder and ring. The panel also reads macro_values again after a patch change, and publishes nothing back.

Changes

  • scripts/bootstrap.sh and CONTRIBUTING: controlpanel joins the engine's modules, so it is frozen in beside pydevices.
  • New ctest mpvst_panel_follow runs tests/panel_follow.py in the engine: the real EngineAdapter and panel, LVGL on a display with no window, and a stub vstui. Three host program changes must each move all 16 encoders and rings, light the patch's pad, and send no edit back. With EngineAdapter._load_patch stubbed out (the adapter before Panel: sliders follow a patch change #42) it fails on every patch change, as it should.
  • mpvst_engine_modules also imports controlpanel, so an engine built without it fails there rather than at the first editor open.
  • mpvst_editor_smoke clicks the first encoder, at its new place (118, 168), and requires that the click alone moves nothing. The wheel then raises macro 100 from 64 and closes the gesture. The navigate, close, reopen and restart checks are unchanged.
  • Docs: the editor page, the Windows and Linux guides, the first program, the limitations page.

Wheels. The editor already moves focus with one wheel axis and adjusts with the other, so it builds the panel with two_wheels=True: the encoders stay in edit mode and the adjusting wheel always turns the focused one.

Tested on Linux, rebased onto main after #47, against a unix engine built from micropython-pydevices with controlpanel among its modules (PyDevices/micropython-pydevices#243): all 20 ctests pass, mpvst_engine_modules, mpvst_panel_follow, mpvst_panel_reload and mpvst_editor_smoke included.

After merging, rebuild the engine with scripts/bootstrap.sh (or the build_mp lines in CONTRIBUTING.md): an engine built before this has no controlpanel frozen in, and the editor won't open on it.

Replaces #44.

panel.py goes; mpvst_panel keeps EngineAdapter and re-exports controlpanel's
build and Panel. controlpanel is frozen into the engine beside pydevices.
mpvst_panel_follow runs the real adapter and panel in the engine and checks a
host program change moves every encoder and LED ring. The editor smoke test
clicks the first encoder (a click no longer moves anything) and turns it with
the wheel.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant