Skip to content

fix(autoresearch): use FastLED flush before watchdog hang - #3640

Merged
zackees merged 2 commits into
masterfrom
fix/rp2040-watchdog-flush-lint
Jul 14, 2026
Merged

zackees merged 2 commits into
masterfrom
fix/rp2040-watchdog-flush-lint

Conversation

@zackees

@zackees zackees commented Jul 14, 2026 •

Copy link
Copy Markdown
Member

Replace raw Serial.flush() with fl::flush() so the watchdog ACK drain follows FastLED's serial wrapper and passes AutoResearch lint. No PlatformIO deployment changes.

Summary by CodeRabbit

  • New Features

    • Improved automatic upload-port detection for RP2040-based boards and multiple RP2040 environment variants.
    • Prevented nearby CP210x devices from being incorrectly selected for RP2040 uploads.
  • Bug Fixes

    • Improved acknowledgment handling during deliberate hang and watchdog-reset recovery scenarios.

@coderabbitai

coderabbitai Bot commented Jul 14, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5c6ee9bc-ff64-4101-b4c4-d9dc7b74c288

📥 Commits

Reviewing files that changed from the base of the PR and between d4bc9d6 and d3b1d9d.

📒 Files selected for processing (3)
  • ci/tests/test_autoresearch_phases.py
  • ci/util/port_utils.py
  • examples/AutoResearch/AutoResearch.ino

📝 Walkthrough

Walkthrough

RP2040 environments now use expanded USB VID:PID mappings with CP210x rejection coverage. The AutoResearch deliberate-hang path uses fl::flush(1000) to drain pending JSON-RPC acknowledgments before disabling interrupts.

Changes

RP2040 upload-port detection

Layer / File(s) Summary
RP2040 fingerprint mappings and validation
ci/util/port_utils.py, ci/tests/test_autoresearch_phases.py
RP2040 and Pico environments accept their CDC VID:PID pairs, while tests verify CP210x devices are rejected for RP2040 detection.

Deliberate-hang ACK flushing

Layer / File(s) Summary
Flush ACK before deliberate hang
examples/AutoResearch/AutoResearch.ino
The deliberate-hang recovery path changes from Serial.flush() to fl::flush(1000) before interrupts are disabled.

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

Possibly related PRs

  • FastLED/FastLED#3639: Both changes update deliberate-hang JSON-RPC acknowledgment flushing in AutoResearch.ino.
✨ 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/rp2040-watchdog-flush-lint

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 force-pushed the fix/rp2040-watchdog-flush-lint branch from 0b79f8c to d3b1d9d Compare July 14, 2026 22:24
@zackees
zackees merged commit 9cebcfa into master Jul 14, 2026
8 of 10 checks passed
@zackees
zackees deleted the fix/rp2040-watchdog-flush-lint branch July 14, 2026 22:24
@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Jul 14, 2026
@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Jul 14, 2026
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