diff options
author | Anton Babushkin <anton.babushkin@me.com> | 2014-05-28 08:33:04 +0200 |
---|---|---|
committer | Anton Babushkin <anton.babushkin@me.com> | 2014-05-28 08:33:04 +0200 |
commit | fcb890553329b4092c7dca319f5f538865734b3a (patch) | |
tree | bc89bfdae180cdb403dd7688fb6632666545b68c /src | |
parent | 7e7d78f50655f2f5f1291cf79a249e06f6a08017 (diff) | |
download | px4-firmware-fcb890553329b4092c7dca319f5f538865734b3a.tar.gz px4-firmware-fcb890553329b4092c7dca319f5f538865734b3a.tar.bz2 px4-firmware-fcb890553329b4092c7dca319f5f538865734b3a.zip |
navigator: autocontinue and RTL autolanding fixes
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/navigator/navigator_main.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/modules/navigator/navigator_main.cpp b/src/modules/navigator/navigator_main.cpp index 87c893079..310bdf9ea 100644 --- a/src/modules/navigator/navigator_main.cpp +++ b/src/modules/navigator/navigator_main.cpp @@ -1458,7 +1458,6 @@ Navigator::check_mission_item_reached() /* XXX TODO count turns */ if ((_mission_item.nav_cmd == NAV_CMD_LOITER_TURN_COUNT || - _mission_item.nav_cmd == NAV_CMD_LOITER_TIME_LIMIT || _mission_item.nav_cmd == NAV_CMD_LOITER_UNLIMITED) && _mission_item.loiter_radius > 0.01f) { @@ -1567,7 +1566,14 @@ Navigator::on_mission_item_reached() } if (_mission.current_mission_available()) { - set_mission_item(); + if (_mission_item.autocontinue) { + /* continue mission */ + set_mission_item(); + + } else { + /* autocontinue disabled for this item */ + request_loiter_or_ready(); + } } else { /* if no more mission items available then finish mission */ |