Add "Restart Mission" checkbox to "Set Current Waypoint" action#14345
Add "Restart Mission" checkbox to "Set Current Waypoint" action#14345jnomikos wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a new “Restart Mission” guided action to let operators reset mission execution back to the first waypoint while in flight (including when the mission is paused), aligning with the UX needs discussed in #13927/#13934.
Changes:
- Extends
Vehicle::setCurrentMissionSequenceto optionally request a mission restart/reset viaMAV_CMD_DO_SET_MISSION_CURRENTparam2. - Adds a new guided action (
Restart Mission) with confirmation text and wires it into the Fly View “Additional Actions” list. - Registers a new FlyView resource (
restart-mission.svg) for the feature’s UI assets.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Vehicle/Vehicle.h | Updates the invokable API to accept an optional restart/reset flag. |
| src/Vehicle/Vehicle.cc | Sends the restart/reset flag as an extra MAVLink command parameter. |
| src/FlyView/GuidedActionsController.qml | Introduces the new guided action (visibility, confirmation, execution). |
| src/FlyView/FlyViewAdditionalActionsList.qml | Exposes “Restart Mission” in the additional actions panel model. |
| src/FlyView/CMakeLists.txt | Adds an SVG resource entry intended for the new action. |
| property bool showLand: _guidedActionsEnabled && _activeVehicle.supports.guidedMode && _vehicleArmed && !_activeVehicle.fixedWing && !_vehicleInLandMode | ||
| property bool showStartMission: _guidedActionsEnabled && _missionAvailable && !_missionActive && !_vehicleFlying && _canStartMission | ||
| property bool showContinueMission: _guidedActionsEnabled && _missionAvailable && !_missionActive && _vehicleArmed && _vehicleFlying && (_currentMissionIndex < _visualItemsCount - 1) | ||
| property bool showRestartMission: _guidedActionsEnabled && _missionAvailable && _vehicleArmed && _vehicleFlying && !_fixedWingOnApproach |
There was a problem hiding this comment.
@copilot actionRestartMission basically does what actionSetWaypoint does, except it has the restart flag set to true. If we don't block actionSetWaypoint during RTL or Land, I don't see the need to hide actionRestartMission.
496585a to
6af2d53
Compare
Codecov Report❌ Patch coverage is
❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (30.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## master #14345 +/- ##
=========================================
Coverage ? 26.45%
=========================================
Files ? 767
Lines ? 66290
Branches ? 30668
=========================================
Hits ? 17540
Misses ? 36292
Partials ? 12458
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Build ResultsPlatform Status
All builds passed. Pre-commit
Pre-commit hooks: 2 passed, 42 failed, 7 skipped. Test Resultslinux-coverage: 88 passed, 0 skipped Code Coverage
Artifact Sizes
Updated: 2026-05-24 19:31:05 UTC • Triggered by: Linux |
|
I don't see how this works. You set the current sequence number to 1. But what if that is pointing to a takeoff item? To me this just requires manual control from the user. Manually pick the right point they want to restart from by clicking on the item. And start the mission. All this special stuff just seems doomed to failure. |
Good point. My current implementation is too error prone. I'll look into making it more similar to how the "set current waypoint" is done |
When vehicle firmware supports restarting mission, set current waypoint action now has a checkbox for "Restart Mission"
06b3084 to
b7b3f53
Compare
|
@DonLakeFlyer I updated the implementation so that the "Restart Mission" is a checkbox option with "Set Current Waypoint" which only shows if the vehicle firmware supports I also updated the PR description above |

Description
On firmware which supports
MAV_CMD_DO_SET_MISSION_CURRENT(ArduPilot), "Set Current Waypoint" command now has a checkbox to optionally "Restart Mission".To summarize, when "Restart Mission" is checked,
MAV_CMD_DO_SET_MISSION_CURRENTwill be sent with the restart param set to true which will restart the mission and any jump counters. This is useful for two cases:User flew a mission to the end which does not contain a RTL and wants to restart their mission from a previous waypoint.
User has a mission with jump counters and wishes to go to a previous waypoint and reset those counters too.
This solves the issue listed here: #13927 and was discussed in this closed PR here: #13934
Type of Change
Testing
Platforms Tested
Flight Stacks Tested
Screenshots
2026-05-08.14-03-59.mp4
2026-05-24.14-37-28.mp4
Checklist
Related Issues
#13927
By submitting this pull request, I confirm that my contribution is made under the terms of the project's dual license (Apache 2.0 and GPL v3).