diff --git a/arena_console.html b/arena_console.html index 2c2e4c8..7b0014f 100644 --- a/arena_console.html +++ b/arena_console.html @@ -1434,7 +1434,7 @@ > SD card + title="Format the SD card - wipes patterns, firmware image, and manifests (PURGE_MEMORY 0x8F)">xXx { if (!session.connected) return; - if (!confirm('Delete ALL patterns from SD card? This cannot be undone.')) return; + if (!confirm('Format the SD card? This wipes ALL patterns, the panel firmware image, and manifests. This cannot be undone.')) return; const resp = await run( - 'delete-all-patterns', - Wire.encodeDeleteAllPatterns(), + 'purge-memory', + Wire.encodePurgeMemory(), (r) => (r && r.ok ? 'done' : null), { timeoutMs: 30000 } ); diff --git a/arena_studio.html b/arena_studio.html index 44a8548..a7f35d7 100644 --- a/arena_studio.html +++ b/arena_studio.html @@ -2703,7 +2703,7 @@

Import error

- + @@ -4900,7 +4900,7 @@

Import error

} Studio.clearConsoleAutoStop = clearAutoStop; // Run-path pre-emption (module block) - // The firmware refuses SD-write + ISP commands (0x8D/0xE0/0x8A/0xC8/0xC9) + // The firmware refuses SD-write + ISP commands (0x8D/0xE0/0x8A/0x8F/0xC8/0xC9) // unless the display is stopped (state ALL_OFF — CE_DISPLAY_ACTIVE with // "Stop display before …" otherwise). STOP_DISPLAY also BLANKS the panels // (they latch their last frame, so the controller pushes a dark frame). @@ -5028,8 +5028,9 @@

Import error

}, csdpurge: () => guardDestructive(async () => { if (!connected()) return; - if (!confirm('Delete ALL patterns from the SD card? This cannot be undone.')) return; - const r = await send(Wire.encodeDeleteAllPatterns(), 'DELETE_ALL_PATTERNS 0x8F', { timeoutMs: 30000 }); + if (!confirm('Format the SD card? This wipes ALL patterns, the panel firmware image, and manifests. This cannot be undone.')) return; + await quiesceDisplay(); // 0x8F requires the display stopped + const r = await send(Wire.encodePurgeMemory(), 'PURGE_MEMORY 0x8F', { timeoutMs: 30000 }); if (r && Wire.decodeResponse(r) && Wire.decodeResponse(r).ok) sdRefresh(); }), // panel firmware @@ -14929,7 +14930,7 @@

Import error

'[data-cmd="csdlist"]': 'Re-read the memory card’s pattern list.', '[data-cmd="cpatinfo"]': 'Ask the arena again about the selected pattern (frames, size).', '[data-cmd="csdarchive"]': 'Download every pattern on the card as one ZIP file.', - '[data-cmd="csdpurge"]': 'Delete ALL patterns from the card. It will ask first.', + '[data-cmd="csdpurge"]': 'Erase everything on the memory card, patterns, panel firmware, all of it, by reformatting it. It will ask first.', '[data-cmd="cmemsd"]': 'Show the patterns on the SD memory card.', '[data-cmd="cmempsram"]': 'Show the patterns in the controller’s RAM.', '#cPatThumb': 'Preview of the selected pattern — hover to animate multi-frame patterns.', diff --git a/docs/development/arena-studio-wireframe-v6.html b/docs/development/arena-studio-wireframe-v6.html index a8915bd..8db33c8 100644 --- a/docs/development/arena-studio-wireframe-v6.html +++ b/docs/development/arena-studio-wireframe-v6.html @@ -710,7 +710,7 @@

Sequence · test any single condition ▶ - +
diff --git a/js/arena-wire-g6.js b/js/arena-wire-g6.js index ae8bad3..373796c 100644 --- a/js/arena-wire-g6.js +++ b/js/arena-wire-g6.js @@ -57,7 +57,7 @@ const ArenaWireG6 = (function () { GET_PATTERN_FILE: 0x84, // [03 84 idx_lo idx_hi] 1-based; response: uint64 LE size, then raw bytes SET_PATTERN_FILE: 0x85, // [0x85, idx_lo, idx_hi, len64 LE, data…] upload file (bulk stream) DELETE_PATTERN_FILE: 0x86, // [03 86 idx_lo idx_hi] delete 1-based pattern; idx=0 deletes pattern.temp - DELETE_ALL_PATTERNS: 0x8f, // [01 8F] delete all files in /patterns + PURGE_MEMORY: 0x8f, // [01 8F] format the SD card (wipes everything, not just /patterns) GET_SD_ARCHIVE: 0x8a, // [01 8A] stream full SD as ZIP; only in ALL_OFF state STOP_DISPLAY: 0x30, STREAM_FRAME: 0x32, // host-streamed full frame ("FR"+blocks; see encodeStreamFrame) @@ -507,9 +507,11 @@ const ArenaWireG6 = (function () { return frame(OPCODES.GET_PATTERN_FILE, u16le(index, 'index')); // 03 84 lo hi } - // delete-all-patterns (0x8F) — delete every file in /patterns. - function encodeDeleteAllPatterns() { - return frame(OPCODES.DELETE_ALL_PATTERNS); // 01 8F + // purge-memory (0x8F): format the SD card (wipes everything, not just + // /patterns: also /firmware/panel.bin and both manifests). Much slower + // than the per-file delete it replaced; give it a generous timeout. + function encodePurgeMemory() { + return frame(OPCODES.PURGE_MEMORY); // 01 8F } // delete-pattern-file (0x86) — delete the pattern at 1-based index. @@ -853,7 +855,7 @@ const ArenaWireG6 = (function () { encodeGetPatternFile, encodeSetPatternFile, encodeDeletePatternFile, - encodeDeleteAllPatterns, + encodePurgeMemory, encodeGetSdArchive, encodeSetFirmwareFile, encodeGetFirmwareInfo,