mirror of https://github.com/ArduPilot/ardupilot
ArduPlane: add REP-147 Global Position Control
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
This commit is contained in:
parent
c22a3439d4
commit
003c50a13c
|
@ -0,0 +1,21 @@
|
||||||
|
|
||||||
|
/*
|
||||||
|
external control library for plane
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <AP_ExternalControl/AP_ExternalControl.h>
|
||||||
|
|
||||||
|
#if AP_EXTERNAL_CONTROL_ENABLED
|
||||||
|
|
||||||
|
#include <AP_Common/Location.h>
|
||||||
|
|
||||||
|
class AP_ExternalControl_Plane : public AP_ExternalControl {
|
||||||
|
public:
|
||||||
|
/*
|
||||||
|
Sets the target global position for a loiter point.
|
||||||
|
*/
|
||||||
|
bool set_global_position(const Location& loc) override WARN_IF_UNUSED;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // AP_EXTERNAL_CONTROL_ENABLED
|
|
@ -85,7 +85,7 @@
|
||||||
#include <AP_Follow/AP_Follow.h>
|
#include <AP_Follow/AP_Follow.h>
|
||||||
#include <AP_ExternalControl/AP_ExternalControl_config.h>
|
#include <AP_ExternalControl/AP_ExternalControl_config.h>
|
||||||
#if AP_EXTERNAL_CONTROL_ENABLED
|
#if AP_EXTERNAL_CONTROL_ENABLED
|
||||||
#include <AP_ExternalControl/AP_ExternalControl.h>
|
#include "AP_ExternalControl_Plane.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "GCS_Mavlink.h"
|
#include "GCS_Mavlink.h"
|
||||||
|
@ -167,6 +167,10 @@ public:
|
||||||
friend class ModeThermal;
|
friend class ModeThermal;
|
||||||
friend class ModeLoiterAltQLand;
|
friend class ModeLoiterAltQLand;
|
||||||
|
|
||||||
|
#if AP_EXTERNAL_CONTROL_ENABLED
|
||||||
|
friend class AP_ExternalControl_Plane;
|
||||||
|
#endif
|
||||||
|
|
||||||
Plane(void);
|
Plane(void);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -776,9 +780,9 @@ private:
|
||||||
|
|
||||||
AP_Param param_loader {var_info};
|
AP_Param param_loader {var_info};
|
||||||
|
|
||||||
// dummy implementation of external control
|
// external control library
|
||||||
#if AP_EXTERNAL_CONTROL_ENABLED
|
#if AP_EXTERNAL_CONTROL_ENABLED
|
||||||
AP_ExternalControl external_control;
|
AP_ExternalControl_Plane external_control;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const AP_Scheduler::Task scheduler_tasks[];
|
static const AP_Scheduler::Task scheduler_tasks[];
|
||||||
|
|
Loading…
Reference in New Issue