Skip to content

fix(mavlink): request autopilot version during bootstrap - #2166

Merged
mbuckton merged 4 commits into
developmentfrom
agent/mavlink-autopilot-bootstrap-request
Aug 10, 2026
Merged

fix(mavlink): request autopilot version during bootstrap#2166
mbuckton merged 4 commits into
developmentfrom
agent/mavlink-autopilot-bootstrap-request

Conversation

@mbuckton

Copy link
Copy Markdown
Contributor

What changed

  • wires MAVLink bootstrap to the recorded endpoint response topic and correlation route
  • sends MAV_CMD_REQUEST_MESSAGE (512) for AUTOPILOT_VERSION (148)
  • maps both MISSING_AUTOPILOT_VERSION and MISSING_CAPABILITIES to the same request
  • deduplicates the shared request and keeps the existing 2-second retry cadence
  • deliberately ignores every non-148 bootstrap event so this PR does not activate unrelated requests
  • adds focused tests for command contents, routing, missing routes, request deduplication, retries, and clearing both degraded states from one response

Root cause

The readiness and bootstrap state engine already produced a request for message 148, but MavlinkTwinUpdater constructed MavlinkDroneMonitor with a null MavlinkBootstrapEventPublisher. ArduPilot does not have to stream AUTOPILOT_VERSION, so the twin remained degraded.

Other configured bootstrap requests left dormant

Missing state Configured action
MISSING_HOME_POSITION request HOME_POSITION (242) once
MISSING_BATTERY_STATE request BATTERY_STATUS (147) once
MISSING_GLOBAL_POSITION stream GLOBAL_POSITION_INT (33) at 2 Hz
MISSING_GPS_FIX stream GPS_RAW_INT (24) at 1 Hz
MISSING_SYSTEM_STATE stream SYS_STATUS (1) at 1 Hz

STALE_POSITION and STALE_POWER currently have no recovery request mapping. These should be reviewed separately before activating the remaining publisher paths.

Validation

Focused tests were added, but local Maven could not reach repository.mapsmessaging.io or Maven Central and stopped during POM resolution before compilation. Repository CI is the executable validation path.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: ebb38664-7e03-4cf5-9411-68a5e967fd55

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

@mbuckton
mbuckton marked this pull request as ready for review August 10, 2026 01:49
@mbuckton
mbuckton merged commit 99a2285 into development Aug 10, 2026
3 checks passed
@mbuckton
mbuckton deleted the agent/mavlink-autopilot-bootstrap-request branch August 10, 2026 01: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.

1 participant