diff options
author | Thomas Gubler <thomasgubler@gmail.com> | 2014-06-01 09:50:23 +0200 |
---|---|---|
committer | Thomas Gubler <thomasgubler@gmail.com> | 2014-06-01 09:50:23 +0200 |
commit | dc13307a8e662c34e1a1b6fa7ae47258db1465a0 (patch) | |
tree | 5e2db855a5a4f2acadc5663658658af24a4640b6 /src | |
parent | 98e7d2b998a2dec2436aafb8ee83c2b44b8c9ee4 (diff) | |
parent | fcb890553329b4092c7dca319f5f538865734b3a (diff) | |
download | px4-firmware-dc13307a8e662c34e1a1b6fa7ae47258db1465a0.tar.gz px4-firmware-dc13307a8e662c34e1a1b6fa7ae47258db1465a0.tar.bz2 px4-firmware-dc13307a8e662c34e1a1b6fa7ae47258db1465a0.zip |
Merge pull request #1014 from PX4/rtl_autoland_fix
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 609356eb5..06e0c5904 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 */ |