mirror of
https://github.com/mikecarper/MeshCore.git
synced 2026-11-12 12:27:39 +00:00
MESH_RADIO_PRESETS_RESIDENT (default 1) selects where the preset table lives. With 0, every preset command, loadSlot(), activeSlot() and table() read /presets into a stack-local table, work on it, save and drop it. Only the pending-revert mirror (slot, previous tuple), the countdown and the timebase stay resident: RadioPresetCLI is 32 B on 32-bit targets (static_assert <= 40 B) instead of ~220 B. Unrelated CLI lines never touch /presets and plain reads never write flash. Hooks are now a static function table plus a context pointer passed to begin(), so the object keeps one pointer instead of seven. Replies, revert/commit/retry and boot-revert behave the same in both modes; the host tests run every harness in both modes and add read-only, unrelated command and failed-seed-save cases. cli_reply_text hashes refreshed for the begin() call sites. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>