Plane: add a default Navigation option as explained in the param docs

This commit is contained in:
Tom Pittenger 2016-03-03 09:10:45 -08:00
parent f66d5f7a8c
commit ff249788bf
2 changed files with 7 additions and 1 deletions

View File

@ -6,6 +6,11 @@
void Plane::set_nav_controller(void)
{
switch ((AP_Navigation::ControllerType)g.nav_controller.get()) {
default:
case AP_Navigation::CONTROLLER_DEFAULT:
// fall through to L1 as default controller
case AP_Navigation::CONTROLLER_L1:
nav_controller = &L1_controller;
break;

View File

@ -106,7 +106,8 @@ public:
// select which navigation controller to use by setting the
// NAV_CONTROLLER parameter
enum ControllerType {
CONTROLLER_L1 = 1
CONTROLLER_DEFAULT = 0,
CONTROLLER_L1 = 1
};
};