Skip to content

Wait for flight controller heartbeat in initial setup#1148

Merged
1Blademaster merged 4 commits intomainfrom
1146-bug-cant-connect-when-multiple-components-online
Mar 31, 2026
Merged

Wait for flight controller heartbeat in initial setup#1148
1Blademaster merged 4 commits intomainfrom
1146-bug-cant-connect-when-multiple-components-online

Conversation

@1Blademaster
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings March 31, 2026 18:27
@1Blademaster 1Blademaster linked an issue Mar 31, 2026 that may be closed by this pull request
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the Radio backend’s Drone initialization to wait specifically for a flight-controller (autopilot) heartbeat before continuing setup, improving connection correctness when multiple MAVLink components are present.

Changes:

  • Replace wait_heartbeat(timeout=5) with a deadline-based recv_match(type="HEARTBEAT") loop that ignores non-autopilot heartbeats.
  • Improve timeout logging / connectionError messaging to include the configured timeout duration.
  • Derive target_system / target_component from the accepted heartbeat’s source IDs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread radio/app/drone.py Outdated
@1Blademaster 1Blademaster merged commit 0e96371 into main Mar 31, 2026
7 checks passed
@1Blademaster 1Blademaster deleted the 1146-bug-cant-connect-when-multiple-components-online branch March 31, 2026 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Can't connect when multiple components online

2 participants