[mission] add an option to skip the first GOTO in mission PATH (#3463)
Issues due date / Add labels to issues (push) Has been cancelled
Doxygen / build (push) Has been cancelled

Going a GOTO can be problematic with hybrid aircraft when the flight
mode is different between a simple goto (hover) and a route (forward).
This commit is contained in:
Gautier Hattenberger
2025-06-04 22:42:30 +02:00
committed by GitHub
parent 06a0542090
commit e7273bda38
@@ -156,6 +156,10 @@ static inline bool mission_nav_segment(struct _mission_element *el)
}
#ifndef MISSION_PATH_SKIP_GOTO
#define MISSION_PATH_SKIP_GOTO FALSE
#endif
/** Navigation function along a path
*/
static inline bool mission_nav_path(struct _mission_element *el)
@@ -166,7 +170,7 @@ static inline bool mission_nav_path(struct _mission_element *el)
if (el->element.mission_path.path_idx == 0) { //first wp of path
el->element.mission_wp.wp = el->element.mission_path.path[0];
if (!mission_nav_wp(el)) { el->element.mission_path.path_idx++; }
if (MISSION_PATH_SKIP_GOTO || !mission_nav_wp(el)) { el->element.mission_path.path_idx++; }
}
else if (el->element.mission_path.path_idx < el->element.mission_path.nb) { //standart wp of path