Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Mission Upload mid flight #10273

Merged
merged 3 commits into from
Aug 3, 2024
Merged

Allow Mission Upload mid flight #10273

merged 3 commits into from
Aug 3, 2024

Conversation

b14ckyy
Copy link
Collaborator

@b14ckyy b14ckyy commented Aug 1, 2024

With mLRS going to support full MSP connection together with RC link, it will be much easier to have a GCS connected to your craft while flying with a stable serial link. This opens the opportunity to upload and manage waypoint missions on the fly. Should even work with ELRS and Ardu Mission planner or any other SiK Radio, if someone wants to go down that route.
WP Upload when armed was blocked until now so it would be nice to open up this possibility since INAV got much more robust than 10 years ago.

  • Allows Mission Upload in flight
  • Mission Upload is still rejected when WP mode is active to avoid accidental interruption (WP-RTH would trigger during upload)
  • If pilot pauses mission (with loiter for example) and the new mission upload is in total shorter than the current waypoint index (to resume mission) the active waypoint is reset to mission start. This prevents INAV to fly to a ghost WP of the old mission.

Tested in HITL with multiple uploads and downloads and paused missions at different stages. Even did Settings changes for Navigation and PIDs mid flight with no problem noticed (although some settings had no immediate effect).
I had one instance where a reupload of an adjusted mission prevented the jump pointer from working after resume but could not replicate again. Needs a bit more testing to make sure Jump points are not occasionally broken. Worked fine on further tests.

Potential Bug in Master #10275

@mmosca
Copy link
Collaborator

mmosca commented Aug 3, 2024

Is it possible to reset the mission to the closest waypoint, instead of start?

@b14ckyy
Copy link
Collaborator Author

b14ckyy commented Aug 3, 2024

Hmmm. Interesting thought but I don't really see the point.
Do we even have a function to scan all waypoints of a mission and find the closest one? What would be the use case for that?

If a mission is just edited, maybe the pilot notices a error and wants to pause, edit and resume, it would just continue to the last WP it was already flying to. With the closest WP it would mean the plane or copter could fly back to the last passed one or jump to a completely different one that is meant to be on the return path.

@b14ckyy b14ckyy merged commit 895be05 into iNavFlight:master Aug 3, 2024
22 checks passed
@MrD-RC MrD-RC added this to the 8.0 milestone Nov 19, 2024
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