-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Multi waypoint mission option #6765
Multi waypoint mission option #6765
Conversation
Does this work together with the configurator? @ArnoTlse is working on improving the mission control tab. Maybe this could be incorporated? |
Works fine with Configurator, loads the selected mission when you load from EEPROM. Needs to be done twice because the first attempt fails but this is an existing bug. Also saves a single mission correctly. Easy to test anyway, just play around with the CLI WP settings to see what's loading. Only thing missing perhaps is the ability to see the full list of WPs loaded. You can see the full list after you've entered it but after rebooting you only see WPs in the selected mission when you enter WP in the CLI since they're the only ones loaded in |
To be useful fo rmost user who plan mission via graphical planner rather than arcane CLI stanza; it needs to be integrated into the MSP_WP_MISSION_LOAD / MSP_WP_MISSION_SAVE functions where there is currently a not yet implemented / unused Possibly also extending MSP_WP_GETINFO to provide info on the number of populated slots. |
I'm not sure how practical fully implementing indexed MSP_WP_MISSION_LOAD / MSP_WP_MISSION_SAVE would be:
|
This is really a basic implementation of an idea for multiple missions. Wouldn't be any use if you typically use more than 30 WPs in a mission. However, if you're using less than 20 then it does provide an option to have easy access to more than a single mission without the need to use other tools to load new missions in the field. I'm not sure the CLI is that arcane given it's the only way to change numerous settings, sometimes quite basic ones at that, The biggest part of setting up a mission is entering it in something like Configurator Mission Control and changing the various settings per WP. Copying the CLI WP output for each mission from the CLI and pasting it into a multi WP file then ultimately pasting all the entries back into the CLI to set up the multi mission is the easy part. I had a cursory look at the MSP stuff and the way Configurator works with it loading and saving missions. I also came to the conclusion that using a mission number index wouldn't help because the multi mission input relies on looking for the end of mission flag (165) rather than counting mission entries based on an index. The mission index is perhaps more relevant for a multi dimensional If you consider the multi mission entry is essentially a "single" mission file but with multiple end of mission flags then that would be an easier way of handling it. As far as I can see Mission Control doesn't use the 165 flag to indicate the end of a mission, it counts WP entries instead. It could work with multi mission entries If it used the 165 flag to process WP entries although in that case it would need the total number of WP entries in the multi mission file to work, so just a multi mission total WP count variable adding perhaps. In fact when I was playing with this I set the total number of WPs to the total for all missions. This loaded all the missions correctly in Mission Control ... but all joined together as one huge mission (would have needed a big battery). |
Make all multi mission WPs visible in CLI mode
Improve handling single WP missions. Block RTH single WP missions from causing problem finding end of multi mission entry.
Fix arm screen message
- Check number missions loaded during boot with option to load selected mission at the same time - Mission selection from OSD mission field using stick commands - Added total number WPs in all missions
Updated:
|
Changed to load all missions always and only load selected mission on ARM
protect against incorrect mission index setting
If this is considered a worthwhile addition to INAV then it's now working as required so good to merge. Configurator Mission Control support for it is also complete and good to merge, iNavFlight/inav-configurator#1381. The basic way this functions in the final version is as follows: Multi missions are handled as a "single" mission (WP numbers sequential from start to end of all mission entries) but with multiple mission end flags. Configurator Mission Control now reads the WP flag from the FC or On NVM load when disarmed all multi mission WP entries are loaded into Jump sanity checking still works but only at the point of Arming if the selected mission isn't the first mission (single missions work as before). Distance to first WP sanity checking works as before whilst disarmed. Example mission:
|
Thanks, I'll take a look at this over the weekend. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tested this extensively (via adding support to mwp) and have had no issues.
It seems a bit "inelegant", but as we have no other solution without fine control of config flash I/O, I see no other or better solution. And this has the benefit of conserving resources on the FC side.
Monumental piece of work pulling all this together.
PR adds the ability to load multiple WP missions together from the CLI. Once loaded and saved from the CLI an individual mission can be selected using the
nav_multi_waypoint_mission_index
setting with the mission loaded in the usual way prior to flight.nav_multi_waypoint_mission_index
can be changed using OSD CMS input.Example CLI WP input:
The above WP entries are input to the CLI successively and then saved using the
WP save
command as usual. Ifmulti_waypoint_mission_index
is set to 2 then the following mission will be loaded:PR also adds a WP mission entry to the Arming screen, after the Craft name, showing the selected mission number. total missions available and the number of WPs in the selected mission. If the selected mission number is higher than the number of missions then no mission is loaded and the Arming screen mission message indicates the selected mission is out of range.
nav_multi_waypoint_mission_index
resets to 1 when new missions are loaded and saved in the CLI.