navigator: correctly use all navigator modes

This commit is contained in:
Thomas Gubler 2014-08-15 01:26:43 +02:00
parent 85d8781bc3
commit 8bc7d7f43d
2 changed files with 3 additions and 2 deletions

View File

@ -65,9 +65,8 @@
/** /**
* Number of navigation modes that need on_active/on_inactive calls * Number of navigation modes that need on_active/on_inactive calls
* Currently: mission, loiter, and rtl
*/ */
#define NAVIGATOR_MODE_ARRAY_SIZE 4 #define NAVIGATOR_MODE_ARRAY_SIZE 6
class Navigator : public control::SuperBlock class Navigator : public control::SuperBlock
{ {

View File

@ -141,6 +141,8 @@ Navigator::Navigator() :
_navigation_mode_array[1] = &_loiter; _navigation_mode_array[1] = &_loiter;
_navigation_mode_array[2] = &_rtl; _navigation_mode_array[2] = &_rtl;
_navigation_mode_array[3] = &_offboard; _navigation_mode_array[3] = &_offboard;
_navigation_mode_array[4] = &_dataLinkLoss;
_navigation_mode_array[5] = &_engineFailure;
updateParams(); updateParams();
} }