RF Scan/copy: keep every capture in a selectable list - #2747
Open
vnxdtzip wants to merge 1 commit into
Open
Conversation
Scan/copy showed a single signal at a time: each new capture overwrote the previous one on screen, and [NEXT] opened one global menu that acted on whatever happened to be the last decode. Capturing a second remote meant losing the first. Captures now accumulate in an on-screen list (up to 10 slots) that can be scrolled with PREV/NEXT (or UP/DOWN); SEL opens a per-signal menu with Signal Info, Replay, Replay as RAW, Save, Save as RAW and Delete. The global settings (Range, Threshold, Mode, Filter, auto-save, Clear List, Main Menu) moved to a Scan Options menu, reachable from that menu or directly with SEL while the list is empty. Also: - Deduplicate captures by protocol/key/preset/bits, so holding a button no longer fills the list with copies of the same frame. KeeLoq is unaffected since its key changes on every press. - Replay/Save act on the selected entry instead of a single shared buffer, and keeloq_step(1) advances the counter of that entry. - Screen-only actions (Info, Delete, Clear, closing a menu) no longer pay the deinitRfModule() + 1s settle; they just re-arm the receiver. - Wait for a genuinely new key press in the Signal Info view. Some input drivers (the Cardputer ADV's TCA8418 among them) raise AnyKeyPress on key release too, so the leftover release event from the menu selection dismissed the screen the instant it was drawn. - Replace the setup()/loop() mutual recursion and the options-menu recursion with plain loops. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Proposed Changes
Scan/copy currently shows one signal at a time. Every new capture overwrites the previous one on screen, and
[NEXT]opens a single global menu that acts on whatever happened to be the last decode — so capturing a second remote means losing the first, and there is no way to go back to a signal you already caught.This PR turns the capture screen into a list, following the same interaction model used by the file browsers elsewhere in Bruce:
1. CAME 1A2B (12b)), the manufacturer and counter for KeeLoq (3. KeeLoq Nice cnt=42), or the pulse count for raw captures (2. RAW 148 pulses), with a*marking signals already written to storage.Decode/RAW/RAW+CRC), anAwhen auto-save is on, and then/10counter.Behaviour changes that come with it:
keeloq_step(1)now advances the counter of that specific entry.deinitRfModule()+ 1 s settle that every menu action used to trigger; they just re-arm the receiver. Actions that transmit, reconfigure the radio or touch the shared SPI bus keep the full re-init.AnyKeyPresson key release as well, so the leftover release event from the menu selection dismissed the screen the instant it was drawn.The list is capped at 10 entries because a RAW slot holds a duration string of up to ~3 KB (the RMT session captures 256 symbols), which keeps the feature usable on the boards without PSRAM.
Types of Changes
Enhancement, plus one bugfix (Signal Info dismissed immediately on TCA8418 keyboards). No breaking changes to the
.subformat, the RF decoders or the serial commands —display_info(),rfReceiveSignal()andrf_scan()are untouched and still serve the CLI/headless paths.Verification
*; the.subfile is written under/BruceRFas before.Tested by flashing
m5stack-cardputerandelecrow-advance-35-s3; both compile clean and the screen behaves as described. Also exercised on a touch-only board, where the 3x3 touch heatmap maps to PREV/NEXT/SEL/ESC.Testing
Not covered by automated tests — the change is UI/interaction code driven by the display and the input task, which the repo does not currently have a harness for. The signal decoding and
.subwriting paths it calls into are unchanged.Linked Issues
None.
User-Facing Change
Further Comments
Two things worth a maintainer's opinion:
[NEXT]no longer opens the options menu — it scrolls the list, and SEL opens the menu. This is the convention already used by the file browsers, but it is a change in muscle memory for Scan/copy users. OnHAS_3_BUTTONSboards, where PREV and ESC share a button, the same guardloopOptions()uses is applied so a PREV tap does not quit the scan.#define _MAX_CAPTUREDinrf_scan.h.The commit also replaces the
setup()/loop()mutual recursion (and the options-menu recursion) with plain loops — the old code relied on tail-call optimisation to avoid growing the stack on every menu open.🤖 Generated with Claude Code