Commit graph

3 commits

Author SHA1 Message Date
cjjohn
4b5da69174 Add free-text notes per button/encoder action
Lets you record what a binding actually does (e.g. "Save in Fusion
360") alongside the auto-generated label ("Strg+S"). Notes live in a
new "note" field on every action dict, purely local like profile
names -- the firmware struct has no room for strings, and
pack_config/unpack_config already only touch type/data so the extra
key round-trips harmlessly.

Two things had to be handled carefully: changing a button's key/type
must not wipe its note (all set_button_*/set_encoder_* setters and the
edit dialog now carry the previous note forward), and re-reading from
the board must not erase notes either, since the firmware doesn't know
about them -- versapad_combined.merge_notes() restores them onto the
freshly-fetched state by button/encoder index.

Editable via the Programmiermodus dialog (new text field), visible on
both the desktop card (grown from 84 to 114px to fit it) and the
browser view. MCP server gets set_button_note()/set_encoder_note() so
notes can be set programmatically too.
2026-08-15 11:15:36 +02:00
cjjohn
8ba524c07b Release COM port after each versapad MCP tool call
get_board_status()/load_from_board()/write_to_board() kept the serial
link open indefinitely after use (VersaPadLink._ensure_open() never
closes on its own). Any session that called one of these left the COM
port locked for VersaGUI/desktop_viewer/server.py's board fallback
until the MCP server process was killed. Close the link in a finally
block after each call instead.
2026-08-09 18:23:33 +02:00
cjjohn
e456af7c19 Add MCP server so Claude (or any MCP client) can reprogram VersaPad directly
Wraps the existing protocol/serial/combined-config layers as MCP tools
(set_button_key, set_encoder_consumer, set_macro, load_from_board,
write_to_board, ...) instead of requiring hand-written JSON + manual
GUI import. Registered at user scope via `claude mcp add`.
2026-08-05 08:16:22 +02:00