Skip to content

Editor preset backup/restore, capture names keep their file names; rebuild Icarus 0.11 - #4

Open
28spawn wants to merge 2 commits into
mainfrom
fix/emulator-toolchain-detection
Open

28spawn wants to merge 2 commits into
mainfrom
fix/emulator-toolchain-detection

Conversation

@28spawn

@28spawn 28spawn commented Nov 10, 2026

Copy link
Copy Markdown
Owner

What changed

Editor: save and restore all presets (b16341c)

  • New SysEx command PA_CMD_PA_PRESET (83, reply 0x63): [index] returns [index, status] plus the stored pa_preset_t (164 bytes; status 1 = no such preset). It is read only.
  • In the editor's Presets tab, Save all presets reads P01..P80 into one icarus-presets JSON file. Restore all presets writes it back through the existing preset upload (cmd 25, target 0) and reads each preset back to check it. EMPTY slots in the file are skipped, and Onyx files are refused because their slots differ.

Captures keep their file names (b16341c)

  • The editor had a single reply slot, and the 1.5 s live refresh could take it mid-upload, so a new capture stayed "USER NAM". Requests now run one at a time.
  • An upload to a given slot now replaces that capture in place instead of adding a new one, and the editor renames it from the new file.
  • A name is no longer cut at its first dot ("JCM800 v1.5" stayed "JCM800 v1"). Only a real file extension is dropped, in the editor and in clean_nam_name.

Test fix

  • test_sysex_read.c: check_reply returned a pointer into its own stack buffer, so the device-info text checks read dead stack memory. Once sysex.c grew, that turned into failures in the build. The buffer is now static.

Release (9fe0ca6)

  • release/Icarus_0.11 was rebuilt with these changes. Bluetooth is off in the package.

Testing

  • qa_gate.py --base main --release: READY FOR BENCH TEST, 83 pass, 0 fail.
  • New coverage: test_editor_protocol.py (cmd 83, preset upload, bad CRC refused, upload/rename/replace in place) and test_editor_page.py (the JSON round trip in Node, and a restore read back on the emulated unit).

For the reviewer

  • No hardware run is recorded for this image yet.
  • The restore path depends on the firmware refusing a record with a bad magic or CRC. That is checked in the tests, not on a unit.

🤖 Generated with Claude Code

28spawn and others added 2 commits November 10, 2026 17:58
…e names

Presets tab: "Save all presets" reads P01..P80 with the new
PA_CMD_PA_PRESET (83, reply 0x63) and downloads one icarus-presets
.json; "Restore all presets" writes a file back through the preset
upload (target 0), reading each preset back to check it. EMPTY slots in
the file are left alone (a saved slot is never EMPTY); Onyx files are
refused, as the slots differ.

Capture names ("USER NAM" instead of the file name):
- the editor had one reply slot, and the 1.5 s live refresh could take
  it mid-upload, so the new capture was not found and never renamed.
  Requests now run one at a time.
- an upload to a given capture slot was stored under "USER NAM nn" and
  matched by name, so replacing a renamed capture added a new one. It
  now replaces in place, and the editor renames it from the new file.
- names were cut at the first dot ("JCM800 v1.5" -> "JCM800 v1"); only
  a real file extension is dropped now, in the editor and the firmware.

Tests: test_editor_protocol (cmd 83, preset upload, bad CRC refused,
upload/rename/replace in place) and test_editor_page (the JSON round
trip in Node, a restore read back on the emulated unit).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ure-name fixes

Bluetooth stays off in the package. QA gate (qa_gate.py --base main
--release): READY FOR BENCH TEST, 83 pass, 0 fail. No hardware run is
recorded for this image yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant