Repository navigation
feat(autoresearch): trigger-time input-mux snapshots in the edge probe (#3586) - #3595
Conversation
#3586) Extend the edge probe's trigger-time register snapshot with the real RX channel CONF1 (0x1C, not the CH3 default at 0x24) and the FUNC71/72_IN_SEL input-mux routing, read at the instant the TX waveform is live on the wire. Findings recorded on #3586 with this tooling: input mux, filter, divider and idle threshold are byte-identical between working and deaf captures at waveform-live time; and WS2811-400 timing (625 ns low gaps) still merges into a single envelope symbol while UART's 490 ns gaps capture fine — the deafness follows the TX DRIVER, not the waveform shape, eliminating electrical/low-pass models. Co-Authored-By: Claude Fable 5 <[email protected]>
📝 WalkthroughWalkthroughThe g_rmt_live array in AutoResearchEdgeProbe.cpp was expanded from 6 to 8 entries, with updated register addresses including a new CH2CONF1 source and two additional FUNC signal input registers on ESP32C6. AutoResearchRemoteSystemMethods.cpp was updated to copy 8 entries instead of 6 into the RPC response. ChangesRMT Live Register Expansion
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
examples/AutoResearch/AutoResearchEdgeProbe.cpp (1)
29-29: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winConsider exposing the snapshot length to avoid a hard-coded cross-file
8.
edgeProbeRmtLive()returns a bare pointer with no length, so consumers must hard-code the element count.AutoResearchRemoteSystemMethods.cpp:364now iteratesk < 8to match this array — the two literals must be kept in sync manually, and a future size bump that misses one site will either truncate the payload or read past the array. Exposing a compile-time count (or an accessor) keeps both sides in lockstep.♻️ Sketch: shared count
-volatile fl::u32 g_rmt_live[8] = {0}; +constexpr fl::u32 kRmtLiveCount = 8; +volatile fl::u32 g_rmt_live[kRmtLiveCount] = {0};Expose it via the header (e.g.
fl::u32 edgeProbeRmtLiveCount();) and use it in the RPC loop instead of the literal8.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@examples/AutoResearch/AutoResearchEdgeProbe.cpp` at line 29, The edge probe snapshot size is duplicated as a hard-coded 8, which requires manual syncing between the array definition and consumers. Expose the snapshot length through a shared symbol in AutoResearchEdgeProbe (for example, a count accessor or constexpr) and update edgeProbeRmtLive and the RPC loop in AutoResearchRemoteSystemMethods to use that shared count instead of the literal. This keeps the snapshot array and its iteration logic aligned if the size changes later.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@examples/AutoResearch/AutoResearchEdgeProbe.cpp`:
- Line 29: The edge probe snapshot size is duplicated as a hard-coded 8, which
requires manual syncing between the array definition and consumers. Expose the
snapshot length through a shared symbol in AutoResearchEdgeProbe (for example, a
count accessor or constexpr) and update edgeProbeRmtLive and the RPC loop in
AutoResearchRemoteSystemMethods to use that shared count instead of the literal.
This keeps the snapshot array and its iteration logic aligned if the size
changes later.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: ea9f5b5a-2505-4559-bd59-db6e11b4e5a4
📒 Files selected for processing (2)
examples/AutoResearch/AutoResearchEdgeProbe.cppexamples/AutoResearch/AutoResearchRemoteSystemMethods.cpp
Extends the edge probe's trigger-time register snapshot with the real RX channel CONF1 (0x1C — the earlier 0x24 read was CH3's reset default) and the FUNC71/72_IN_SEL input-mux routing, captured at the instant the TX waveform is live.
Findings recorded on #3586 with this tooling: input mux, filter, divider, and idle threshold are byte-identical between working and deaf captures at waveform-live time; and WS2811-400 timing (625 ns low gaps) still merges into a single envelope symbol while UART's 490 ns gaps capture fine — the deafness follows the TX driver, not the waveform shape, eliminating electrical/low-pass models.
Host tests + lint clean; C6 compile clean.
Refs #3586.
🤖 Generated with Claude Code
Summary by CodeRabbit