commander: failsafe_state removed, replaced with bool failsafe, navigation state and failsafe determined directly from main state and conditions

This commit is contained in:
Anton Babushkin
2014-06-16 17:34:21 +02:00
parent 91f0b9eee4
commit e0ed0625f8
9 changed files with 122 additions and 115 deletions
+1 -3
View File
@@ -336,7 +336,7 @@ Navigator::task_main()
}
/* Do stuff according to navigation state set by commander */
switch (_vstatus.set_nav_state) {
switch (_vstatus.nav_state) {
case NAVIGATION_STATE_MANUAL:
case NAVIGATION_STATE_ACRO:
case NAVIGATION_STATE_ALTCTL:
@@ -351,8 +351,6 @@ Navigator::task_main()
_navigation_mode = &_loiter;
break;
case NAVIGATION_STATE_AUTO_RTL:
case NAVIGATION_STATE_AUTO_FAILSAFE_RC_LOSS:
case NAVIGATION_STATE_AUTO_FAILSAFE_DL_LOSS:
_navigation_mode = &_rtl;
break;
case NAVIGATION_STATE_LAND: