diff options
author | Anton Babushkin <anton.babushkin@me.com> | 2014-04-23 15:24:45 +0200 |
---|---|---|
committer | Anton Babushkin <anton.babushkin@me.com> | 2014-04-23 15:24:45 +0200 |
commit | 320c97c498cc6e8f2634f88147f0ef15ca9b24e3 (patch) | |
tree | 17c1ec664a7d0ecbb98ac8447fd08e09ce2a1082 /src/modules | |
parent | 60554c8a5682bc5b2edb66e1ca6b7a9163b1dbf9 (diff) | |
download | px4-firmware-320c97c498cc6e8f2634f88147f0ef15ca9b24e3.tar.gz px4-firmware-320c97c498cc6e8f2634f88147f0ef15ca9b24e3.tar.bz2 px4-firmware-320c97c498cc6e8f2634f88147f0ef15ca9b24e3.zip |
navigator: check if mission reached on vehicle_status updates
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/navigator/navigator_main.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/modules/navigator/navigator_main.cpp b/src/modules/navigator/navigator_main.cpp index 37009ff69..d4d23396a 100644 --- a/src/modules/navigator/navigator_main.cpp +++ b/src/modules/navigator/navigator_main.cpp @@ -774,6 +774,13 @@ Navigator::task_main() } } + /* check if waypoint has been reached in MISSION, RTL and LAND modes */ + if (myState == NAV_STATE_MISSION || myState == NAV_STATE_RTL || myState == NAV_STATE_LAND) { + if (check_mission_item_reached()) { + on_mission_item_reached(); + } + } + } else { /* navigator shouldn't act */ dispatch(EVENT_NONE_REQUESTED); |