diff options
author | Anton Babushkin <anton.babushkin@me.com> | 2014-02-06 11:56:01 +0100 |
---|---|---|
committer | Anton Babushkin <anton.babushkin@me.com> | 2014-02-06 11:56:01 +0100 |
commit | 29b0678d841666000fd67cc955dba5cf3cc980c5 (patch) | |
tree | efaf48870e56290259f75077ad7ff2d75c738a11 /src/modules/navigator/navigator_main.cpp | |
parent | 9262df6022fa86e06ba83c61b2d67e8f44b81048 (diff) | |
download | px4-firmware-29b0678d841666000fd67cc955dba5cf3cc980c5.tar.gz px4-firmware-29b0678d841666000fd67cc955dba5cf3cc980c5.tar.bz2 px4-firmware-29b0678d841666000fd67cc955dba5cf3cc980c5.zip |
navigator: forbid READY - > RTL transition
Diffstat (limited to 'src/modules/navigator/navigator_main.cpp')
-rw-r--r-- | src/modules/navigator/navigator_main.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/modules/navigator/navigator_main.cpp b/src/modules/navigator/navigator_main.cpp index 5139ae6cd..abd7119f7 100644 --- a/src/modules/navigator/navigator_main.cpp +++ b/src/modules/navigator/navigator_main.cpp @@ -689,7 +689,7 @@ Navigator::task_main() if (_vstatus.return_switch == RETURN_SWITCH_RETURN) { /* switch to RTL if not already landed after RTL and home position set */ if (!(_rtl_state == RTL_STATE_DESCEND && - (myState == NAV_STATE_READY || myState == NAV_STATE_LAND || myState == NAV_STATE_LOITER)) && + (myState == NAV_STATE_LAND || myState == NAV_STATE_LOITER)) && _vstatus.condition_home_position_valid) { dispatch(EVENT_RTL_REQUESTED); } @@ -748,7 +748,7 @@ Navigator::task_main() case NAV_STATE_RTL: if (!(_rtl_state == RTL_STATE_DESCEND && - (myState == NAV_STATE_READY || myState == NAV_STATE_LAND || myState == NAV_STATE_LOITER)) && + (myState == NAV_STATE_LAND || myState == NAV_STATE_LOITER)) && _vstatus.condition_home_position_valid) { dispatch(EVENT_RTL_REQUESTED); } @@ -756,9 +756,7 @@ Navigator::task_main() break; case NAV_STATE_LAND: - if (myState != NAV_STATE_READY) { - dispatch(EVENT_LAND_REQUESTED); - } + dispatch(EVENT_LAND_REQUESTED); break; |