Skip to content

Conversation

@DonLakeFlyer
Copy link
Collaborator

Fix #13224

@rubenp02 Can you verify this works for you?

@DonLakeFlyer DonLakeFlyer requested a review from Copilot September 4, 2025 22:15
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 PR removes hardcoded flight mode names from ArduPilot firmware plugins by moving them from inline return statements to proper method implementations that use dynamic mode mappings.

  • Replaces hardcoded string literals in header files with method declarations
  • Implements new methods in .cc files that use _modeEnumToString mapping for dynamic flight mode names
  • Adds debug logging for flight mode changes

Reviewed Changes

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

Show a summary per file
File Description
src/FirmwarePlugin/FirmwarePlugin.cc Adds debug logging for flight mode transitions
src/FirmwarePlugin/APM/ArduRoverFirmwarePlugin.h Moves hardcoded "Hold" and "Follow" modes to method declarations
src/FirmwarePlugin/APM/ArduRoverFirmwarePlugin.cc Implements pauseFlightMode() and followFlightMode() using dynamic mappings
src/FirmwarePlugin/APM/ArduPlaneFirmwarePlugin.h Moves hardcoded "Loiter" mode to method declaration
src/FirmwarePlugin/APM/ArduPlaneFirmwarePlugin.cc Implements pauseFlightMode() using dynamic mapping

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@rubenp02
Copy link
Contributor

rubenp02 commented Sep 5, 2025

This fixes the issue! Thank you.

@DonLakeFlyer DonLakeFlyer merged commit 1b6faac into Stable_V5.0 Sep 5, 2025
11 of 12 checks passed
@DonLakeFlyer DonLakeFlyer deleted the APMStandardModes branch September 5, 2025 16:20
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.

3 participants