Copter: AUTO and Guided call wp_and_spline_init

This commit is contained in:
Randy Mackay 2014-05-07 15:03:26 +09:00
parent 11918869a5
commit 3cc5b9446f
2 changed files with 8 additions and 0 deletions

View File

@ -26,6 +26,10 @@ static bool auto_init(bool ignore_checks)
if (auto_yaw_mode == AUTO_YAW_ROI) { if (auto_yaw_mode == AUTO_YAW_ROI) {
set_auto_yaw_mode(AUTO_YAW_HOLD); set_auto_yaw_mode(AUTO_YAW_HOLD);
} }
// initialise waypoint and spline controller
wp_nav.wp_and_spline_init();
// start the mission // start the mission
mission.start(); mission.start();
return true; return true;

View File

@ -14,6 +14,10 @@ static bool guided_pilot_yaw_override_yaw = false;
static bool guided_init(bool ignore_checks) static bool guided_init(bool ignore_checks)
{ {
if (GPS_ok() || ignore_checks) { if (GPS_ok() || ignore_checks) {
// initialise waypoint and spline controller
wp_nav.wp_and_spline_init();
// initialise wpnav to stopping point at current altitude // initialise wpnav to stopping point at current altitude
// To-Do: set to current location if disarmed? // To-Do: set to current location if disarmed?
// To-Do: set to stopping point altitude? // To-Do: set to stopping point altitude?