Skip to content

fix: flush watchdog RPC acknowledgement before hang - #3639

Merged
zackees merged 1 commit into
masterfrom
feat/rp2040-rpc-smoke-no-port
Jul 14, 2026
Merged

zackees merged 1 commit into
masterfrom
feat/rp2040-rpc-smoke-no-port

Conversation

@zackees

@zackees zackees commented Jul 14, 2026 •

Copy link
Copy Markdown
Member

Flush the USB CDC TX buffer after deliberateHang's response delay and before disabling interrupts. This makes the watchdog acceptance probe observe the required acknowledgement on RP2040 CDC. Existing 112 autoresearch tests pass; hardware retest pending board recovery.

Summary by CodeRabbit

  • Bug Fixes
    • Improved serial output reliability during deliberate watchdog-reset scenarios.
    • Ensured acknowledgment messages are fully transmitted before the system enters the intentional hang state.

@zackees
zackees force-pushed the feat/rp2040-rpc-smoke-no-port branch from c499ffb to 9db0734 Compare July 14, 2026 22:01
@zackees
zackees merged commit d4bc9d6 into master Jul 14, 2026
6 checks passed
@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: 1ed1435d-313b-43eb-a549-13efb0a5e69a

📥 Commits

Reviewing files that changed from the base of the PR and between fdd17de and 9db0734.

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

📝 Walkthrough

Walkthrough

The deliberate-hang path now explicitly flushes serial output, except on stub and WebAssembly platforms, before disabling interrupts and spinning indefinitely for watchdog recovery.

Changes

Watchdog recovery acknowledgement

Layer / File(s) Summary
Serial acknowledgement flush
examples/AutoResearch/AutoResearch.ino
The deliberate-hang handler keeps the short delay and adds a guarded Serial.flush() before entering the watchdog-triggering hang.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related issues

  • FastLED issue 3630: The change ensures the deliberateHang JSON-RPC acknowledgement is flushed before the intentional hang.
✨ 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 feat/rp2040-rpc-smoke-no-port

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.

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