introduce new nav state to allow normal rtl with RC switch

This commit is contained in:
Thomas Gubler
2014-08-26 22:22:59 +02:00
parent 8a9da209d1
commit 3d528a2c97
3 changed files with 6 additions and 2 deletions
+4 -1
View File
@@ -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 */