mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-02 22:18:28 -04:00
AP_ExternalControl: arm through external control
* Prepare for external control enabled flag gating ability to arm in DDS Signed-off-by: Ryan Friedman <25047695+Ryanf55@users.noreply.github.com>
This commit is contained in:
parent
489e8473a2
commit
98f3f59fb6
@ -5,6 +5,16 @@
|
|||||||
// singleton instance
|
// singleton instance
|
||||||
AP_ExternalControl *AP_ExternalControl::singleton;
|
AP_ExternalControl *AP_ExternalControl::singleton;
|
||||||
|
|
||||||
|
bool AP_ExternalControl::arm(AP_Arming::Method method, bool do_arming_checks)
|
||||||
|
{
|
||||||
|
return AP::arming().arm(method, do_arming_checks);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool AP_ExternalControl::disarm(AP_Arming::Method method, bool do_disarm_checks)
|
||||||
|
{
|
||||||
|
return AP::arming().disarm(method, do_disarm_checks);
|
||||||
|
}
|
||||||
|
|
||||||
AP_ExternalControl::AP_ExternalControl()
|
AP_ExternalControl::AP_ExternalControl()
|
||||||
{
|
{
|
||||||
singleton = this;
|
singleton = this;
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
#if AP_EXTERNAL_CONTROL_ENABLED
|
#if AP_EXTERNAL_CONTROL_ENABLED
|
||||||
|
|
||||||
|
#include <AP_Arming/AP_Arming.h>
|
||||||
#include <AP_Common/Location.h>
|
#include <AP_Common/Location.h>
|
||||||
#include <AP_Math/AP_Math.h>
|
#include <AP_Math/AP_Math.h>
|
||||||
|
|
||||||
@ -32,6 +33,16 @@ public:
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
Arm the vehicle
|
||||||
|
*/
|
||||||
|
virtual bool arm(AP_Arming::Method method, bool do_arming_checks) WARN_IF_UNUSED;
|
||||||
|
|
||||||
|
/*
|
||||||
|
Disarm the vehicle
|
||||||
|
*/
|
||||||
|
virtual bool disarm(AP_Arming::Method method, bool do_disarm_checks) WARN_IF_UNUSED;
|
||||||
|
|
||||||
static AP_ExternalControl *get_singleton(void) WARN_IF_UNUSED {
|
static AP_ExternalControl *get_singleton(void) WARN_IF_UNUSED {
|
||||||
return singleton;
|
return singleton;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user