mirror of https://github.com/ArduPilot/ardupilot
23 lines
513 B
C++
23 lines
513 B
C++
|
/*
|
||
|
external control library for plane
|
||
|
*/
|
||
|
|
||
|
|
||
|
#include "AP_ExternalControl_Plane.h"
|
||
|
#if AP_EXTERNAL_CONTROL_ENABLED
|
||
|
|
||
|
#include "Plane.h"
|
||
|
|
||
|
/*
|
||
|
Sets the target global position for a loiter point.
|
||
|
*/
|
||
|
bool AP_ExternalControl_Plane::set_global_position(const Location& loc)
|
||
|
{
|
||
|
|
||
|
// set_target_location already checks if plane is ready for external control.
|
||
|
// It doesn't check if flying or armed, just that it's in guided mode.
|
||
|
return plane.set_target_location(loc);
|
||
|
}
|
||
|
|
||
|
#endif // AP_EXTERNAL_CONTROL_ENABLED
|