aboutsummaryrefslogtreecommitdiff
path: root/src/modules/navigator/navigator_main.cpp
diff options
context:
space:
mode:
authorThomas Gubler <thomasgubler@gmail.com>2014-08-26 22:22:59 +0200
committerThomas Gubler <thomasgubler@gmail.com>2014-08-26 22:22:59 +0200
commit3d528a2c979e7d0df1171afc1f038759c7b01383 (patch)
tree5119ba64f72c21c946c0fa8d94d5ed5a4696739c /src/modules/navigator/navigator_main.cpp
parent8a9da209d194b4f35000935379901ed6091091f9 (diff)
downloadpx4-firmware-3d528a2c979e7d0df1171afc1f038759c7b01383.tar.gz
px4-firmware-3d528a2c979e7d0df1171afc1f038759c7b01383.tar.bz2
px4-firmware-3d528a2c979e7d0df1171afc1f038759c7b01383.zip
introduce new nav state to allow normal rtl with RC switch
Diffstat (limited to 'src/modules/navigator/navigator_main.cpp')
-rw-r--r--src/modules/navigator/navigator_main.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/modules/navigator/navigator_main.cpp b/src/modules/navigator/navigator_main.cpp
index c173ecd50..9a8c54e7e 100644
--- a/src/modules/navigator/navigator_main.cpp
+++ b/src/modules/navigator/navigator_main.cpp
@@ -433,13 +433,16 @@ Navigator::task_main()
case NAVIGATION_STATE_AUTO_LOITER:
_navigation_mode = &_loiter;
break;
- case NAVIGATION_STATE_AUTO_RTL:
+ case NAVIGATION_STATE_AUTO_RCRECOVER:
if (_param_rcloss_obc.get() != 0) {
_navigation_mode = &_rcLoss;
} else {
_navigation_mode = &_rtl;
}
break;
+ case NAVIGATION_STATE_AUTO_RTL:
+ _navigation_mode = &_rtl;
+ break;
case NAVIGATION_STATE_AUTO_RTGS: //XXX OBC: differentiate between rc loss and dl loss here
/* Use complex data link loss mode only when enabled via param
* otherwise use rtl */