Skip to content

Conversation

@DonLakeFlyer
Copy link
Contributor

@DonLakeFlyer DonLakeFlyer commented Nov 24, 2025

Copilot AI review requested due to automatic review settings November 24, 2025 18:22
@DonLakeFlyer
Copy link
Contributor Author

Gonna sit on this for a couple days to see if anyone comes up with some nasty reason to not remove v1 support

Copilot finished reviewing on behalf of DonLakeFlyer November 24, 2025 18:25
Copy link
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

This pull request removes support for the MAVLink v1 protocol, enforcing MAVLink v2 as the only supported protocol version. When MAVLink v1 traffic is detected on a link, QGroundControl now notifies the user and stops processing that link.

Key Changes:

  • Removed protocol version negotiation and tracking from Vehicle and MultiVehicleManager
  • Eliminated the PROTOCOL_VERSION request state from the initial connection state machine
  • Added MAVLink v1 traffic detection with user notification in LinkInterface
  • Simplified RallyPoint and GeoFence support checks by removing protocol version requirements

Reviewed changes

Copilot reviewed 22 out of 22 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/Vehicle/Vehicle.h Removed maxProtoVersion tracking and requestProtocolVersion signal
src/Vehicle/Vehicle.cc Removed protocol version negotiation logic and _setMaxProtoVersion methods
src/Vehicle/MultiVehicleManager.h Removed _requestProtocolVersion slot
src/Vehicle/MultiVehicleManager.cc Removed protocol version negotiation across multiple vehicles
src/Vehicle/InitialConnectStateMachine.h Removed _stateRequestProtocolVersion state and handler
src/Vehicle/InitialConnectStateMachine.cc Removed PROTOCOL_VERSION request logic; now assumes MAVLink v2 support
src/Settings/MavlinkSettings.h Removed requireMatchingMavlinkVersions setting
src/Settings/MavlinkSettings.cc Removed requireMatchingMavlinkVersions declaration
src/MissionManager/RallyPointManager.cc Simplified supported() to only check capability bits
src/MissionManager/RallyPointController.cc Removed requestProtocolVersion signal connection; simplified support check
src/MissionManager/GeoFenceManager.cc Simplified supported() to only check capability bits
src/MissionManager/GeoFenceController.cc Removed requestProtocolVersion signal connection; simplified support check
src/MissionManager/MavCmdInfoCommon.json Removed MAV_CMD_REQUEST_PROTOCOL_VERSION entry
src/Comms/MockLink/MockLink.h Removed _handleRequestMessageProtocolVersion handler
src/Comms/MockLink/MockLink.cc Removed protocol version request handling logic
src/Comms/MockLink/MockConfiguration.h Removed protocol version failure test modes
src/Comms/MAVLinkProtocol.h Removed version tracking and setVersion method
src/Comms/MAVLinkProtocol.cc Replaced version switching with v1 traffic detection; added QTimer include
src/Comms/LinkManager.cc Removed setVersion call during link creation
src/Comms/LinkInterface.h Added reportMavlinkV1Traffic method and tracking flag
src/Comms/LinkInterface.cc Implemented v1 traffic detection with user notification
test/Vehicle/InitialConnectTest.cc Removed protocol version failure test cases

Copy link
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

Copilot reviewed 22 out of 22 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (1)

src/Vehicle/InitialConnectStateMachine.h:81

  • The _rgProgressWeights array has 8 elements but the first comment still references "_stateRequestCapabilities" which was removed. The array indices don't match the state machine functions. The array should have comments matching the actual states:
  • _stateRequestAutopilotVersion (not "Capabilities")
  • _stateRequestStandardModes
  • _stateRequestCompInfo
  • _stateRequestParameters
  • _stateRequestMission
  • _stateRequestGeoFence
  • _stateRequestRallyPoints
  • _stateSignalInitialConnectComplete

This mismatch could cause confusion when maintaining or debugging the progress tracking logic.

    static constexpr const int _rgProgressWeights[] = {
        1, //_stateRequestCapabilities
        1, //_stateRequestStandardModes
        5, //_stateRequestCompInfo
        5, //_stateRequestParameters
        2, //_stateRequestMission
        1, //_stateRequestGeoFence
        1, //_stateRequestRallyPoints
        1, //_stateSignalInitialConnectComplete
    };

Notify user if v1 traffic is detected on link
Copy link
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

Copilot reviewed 22 out of 22 changed files in this pull request and generated 1 comment.


qCDebug(LinkInterfaceLog) << "_allocateMavlinkChannel" << _mavlinkChannel;

mavlink_set_proto_version(_mavlinkChannel, MAVLINK_VERSION); // We only support v2 protcol
Copy link

Copilot AI Nov 25, 2025

Choose a reason for hiding this comment

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

Typo in comment: "protcol" should be "protocol".

Suggested change
mavlink_set_proto_version(_mavlinkChannel, MAVLINK_VERSION); // We only support v2 protcol
mavlink_set_proto_version(_mavlinkChannel, MAVLINK_VERSION); // We only support v2 protocol

Copilot uses AI. Check for mistakes.
@DonLakeFlyer DonLakeFlyer merged commit b44a33f into master Dec 1, 2025
27 checks passed
@DonLakeFlyer DonLakeFlyer deleted the MavlinkV2Only branch December 1, 2025 15:57
@hamishwillee
Copy link
Contributor

I may be the minority, but I think this is a good step forward. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecate PROTOCOL_VERSION

3 participants