Replies: 12 comments 11 replies
-
Currently you can only select missions on the ground. However, I did a PR recently that allows you to change missions in flight #8354. Uses the WP mode switch to cycle through the missions when a new "mission select" mode is active. I assign the mode to be active when Poshold is selected but you could use a separate switch if you wanted. Named missions would be nice but doesn't seem so easy to do without rehashing the mission storage format. |
Beta Was this translation helpful? Give feedback.
-
It might be more obvious changing the selected mission using the adjustments framework, but your solution will work. Thanks |
Beta Was this translation helpful? Give feedback.
-
@breadoven I'm looking in your changes in #8354 and trying to understand how it works. What logic causes the currently selected mission index to change? I see '''void selectMultiMissionIndex(int8_t increment)''', which is used by the stick commands. I couldn't see how the mission select mode changes the mission index. Thanks |
Beta Was this translation helpful? Give feedback.
-
nvm. I see it in updateWpMissionChange() |
Beta Was this translation helpful? Give feedback.
-
With #8354 it should be possible to just add an adjustment for the This won't work for the current logic though because the mission waypoint array is overwritten when you arm with the selected mission moved to the start of the array so it always starts at waypoint index 0. You have to reload the mission when disarmed to refresh it. This is so all multi missions are available in Configurator when disarmed. #8354 avoids this overwriting by keeping the mission array intact and picking out the required mission based on start waypoint index for the selected mission instead which is a better way of doing it. When you disarm the start waypoint index is set to 0 and the number of waypoints set to the total in all multi missions making all missions available in Configurator. |
Beta Was this translation helpful? Give feedback.
-
@tonyyng Can you try #8354 to see if the mission index adjustment works with DJI ? Needs Configurator support for the new Adjustment but you should be able enter it via CLI if you know the parameters (adjustment index is 59). https://github.com/iNavFlight/inav/actions/runs/2987946351 is the last run. |
Beta Was this translation helpful? Give feedback.
-
My DJI enabled aircraft has a burned out motor. I'm awaiting replacement parts before I can fly again. What do I need in order to test it? I'm currently on 4.1 (with customizations). I had tried to manually merge #8354, before the latest changes into my repo, but it got too complicated. There were too many changes since I branched off 4.1. |
Beta Was this translation helpful? Give feedback.
-
You can use the target firmware from the inav-6.0.0-ci-20220904-11bc996.zip file in the link above and 6.0 Configurator from http://seyrsnys.myzen.co.uk/inav-configurator-next/. The Adjustment won't appear in the Configurator Adjustment tab since it hasn't been added yet so easiest to set up some other Adjustment function first then just change the Adjustment function ID to 59 using the CLI, e.g. I assume when the Adjustment is active it appears in the DJI OSD field ? Should appear as WPI. If you can get the WPI number to change then it should load the selected mission when the Adjustment isn't active. Check |
Beta Was this translation helpful? Give feedback.
-
I'm getting an error when I try to download Configurator 6.0: |
Beta Was this translation helpful? Give feedback.
-
@breadoven The adjustment selection of the mission index works as expected. With 4 missions loaded, it would let me change the value in the range from 1 to 4. In the DJI craftname field, I see WPI N as one of the messages when adjusting. Thanks |
Beta Was this translation helpful? Give feedback.
-
@breadoven I see a hole in the checking of distance to the first waypoint. https://github.com/iNavFlight/inav/wiki/6.0.0-Release-Notes#increase-nav_wp_safe_distance-maximum It is done against the current mission prior to arming, correct? What happens if you choose a different mission using the mode switch in-flight? Is the check reapplied at that point? I never did like the check prior to arming. I think the check should be done when trying to enter wp mode. |
Beta Was this translation helpful? Give feedback.
-
Yes, I agree with you on the distance check's relevance. I've modded my version to allow the max distance to be 5km so that it only comes into play when I've loaded the wrong mission for the current field. |
Beta Was this translation helpful? Give feedback.
-
Hey @breadoven
As I understand the multiple mission support, the mission can only be selected while on the ground. Is that correct?
What if logic was added so it could be changed through inflight adjustments? Besides the "I forgot to select the right mission" reason, I think it could be useful other ways.
What if your missions were setup as various landing approaches to your flying fields, but from different directions. Then you could use adjustments to select the one appropriate for the current wind direction. It would be nice to be able to give a name to each mission as well. "LAND EAST", or "6K Loop" and see that name displayed.
Thanks
Beta Was this translation helpful? Give feedback.
All reactions