Copter: changes for AC_WPNav

This commit is contained in:
Andrew Tridgell 2017-02-12 09:34:00 +11:00
parent 17e1329068
commit f1917dddd0
1 changed files with 2 additions and 2 deletions

View File

@ -607,13 +607,13 @@ void Copter::allocate_motors(void)
}
AP_Param::load_object_from_eeprom(pos_control, pos_control->var_info);
wp_nav = new AC_WPNav(inertial_nav, ahrs, *pos_control, *attitude_control);
wp_nav = new AC_WPNav(inertial_nav, *ahrs_view, *pos_control, *attitude_control);
if (wp_nav == nullptr) {
AP_HAL::panic("Unable to allocate WPNav");
}
AP_Param::load_object_from_eeprom(wp_nav, wp_nav->var_info);
circle_nav = new AC_Circle(inertial_nav, ahrs, *pos_control);
circle_nav = new AC_Circle(inertial_nav, *ahrs_view, *pos_control);
if (wp_nav == nullptr) {
AP_HAL::panic("Unable to allocate CircleNav");
}