Skip to content

fix(autoresearch): report the real platform from getPins - #4210

Merged
zackees merged 1 commit into
masterfrom
fix/getpins-platform-identity
Sep 8, 2026
Merged

zackees merged 1 commit into
masterfrom
fix/getpins-platform-identity

Conversation

@zackees

@zackees zackees commented Sep 8, 2026 •

Copy link
Copy Markdown
Member

getPins hand-rolled an ESP32-only preprocessor chain and fell through to
"unknown" for every other target, so the same firmware disagreed with itself
on an RP2350W:

getPins -> {'platform': 'unknown', ...}
status  -> {'platform': 'Raspberry Pi Pico 2 W (RP2350)', ...}

status already uses the shared autoresearch::chipName(), which covers stub,
the ESP32 family, Teensy 4.x and both RP2350 variants. This uses it in
getPins too and drops the duplicated chain — so Teensy and LPC, which were
equally reporting "unknown", are fixed as a side effect.

Verified on hardware

getPins -> {'txPin': 1, 'rxPin': 0, 'success': True,
            'defaults': {'txPin': 1, 'rxPin': 0},
            'platform': 'Raspberry Pi Pico 2 W (RP2350)'}

Matches status on the same firmware. Full --rpc-smoke still passes:
RESULT: RPC smoke PASS (discovery, help, ping, payload, status, drivers, testNoSerial, RP concurrency, error handling).

Why it matters beyond tidiness

Found while evidencing the pin-discovery / testGpioConnection criterion on
#3899, whose closeout explicitly requires recording "the exact commands,
commits, wiring, ports, VID:PIDs/serials"
. Two RPCs on one board reporting
different platform identities is exactly the kind of discrepancy that gets
mis-transcribed into a closeout record, and "unknown" is the more plausible
one to copy since it looks like a deliberate value rather than a gap.

bash lint clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01KkufoNxfnNRU9psT3R9F51

Summary by CodeRabbit

  • Bug Fixes
    • Platform information reported by the pin configuration now matches the platform shown in firmware status.
    • Added support for recognizing platforms beyond the previously limited set.

`getPins` hand-rolled an ESP32-only preprocessor chain and fell through to
"unknown" for every other target, so on an RP2350W the same firmware
disagreed with itself:

    getPins -> {'platform': 'unknown', ...}
    status  -> {'platform': 'Raspberry Pi Pico 2 W (RP2350)', ...}

`status` already uses the shared `autoresearch::chipName()`, which covers
stub, the ESP32 family, Teensy 4.x and both RP2350 variants. Use it here too
and drop the duplicated chain -- this also fixes Teensy and LPC, which were
equally reporting "unknown".

Verified on hardware after the change:

    getPins -> {'txPin': 1, 'rxPin': 0, 'success': True,
                'defaults': {'txPin': 1, 'rxPin': 0},
                'platform': 'Raspberry Pi Pico 2 W (RP2350)'}

Found while evidencing the pin-discovery/testGpioConnection criterion on
#3899, whose closeout requires exact recorded identities -- two RPCs
disagreeing about the platform is the kind of thing that gets mis-transcribed
into a closeout.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01KkufoNxfnNRU9psT3R9F51
@coderabbitai

coderabbitai Bot commented Sep 8, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: 814d3a39-da8e-441b-b10a-955d9503b08e

📥 Commits

Reviewing files that changed from the base of the PR and between 3ee4009 and bc29dc9.

📒 Files selected for processing (1)
  • examples/AutoResearch/AutoResearchRemotePinMethods.cpp

Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review.


📝 Walkthrough

Walkthrough

The getPins RPC now uses autoresearch::chipName() to report platform names. This aligns its output with the status RPC for targets such as RP2350W, Teensy 4.x, and stub platforms.

Changes

Platform identity reporting

Layer / File(s) Summary
Unify getPins platform reporting
examples/AutoResearch/AutoResearchRemotePinMethods.cpp
The handler includes AutoResearchPlatform.h and uses autoresearch::chipName() instead of a limited ESP32 preprocessor chain.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to bc29d

getPins now returns the shared platform identity used by status, correcting platform reporting on supported non-ESP32 targets. The change is ready to merge with no identified current risk.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: updating getPins to report the actual platform.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/getpins-platform-identity

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@zackees
zackees merged commit c245f55 into master Sep 8, 2026
26 checks passed
@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Sep 8, 2026
@zackees
zackees deleted the fix/getpins-platform-identity branch November 5, 2026 05:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant