diff --git a/libraries/AP_ExternalControl/AP_ExternalControl.cpp b/libraries/AP_ExternalControl/AP_ExternalControl.cpp index e0e92f0a29..92a97f18b7 100644 --- a/libraries/AP_ExternalControl/AP_ExternalControl.cpp +++ b/libraries/AP_ExternalControl/AP_ExternalControl.cpp @@ -5,6 +5,16 @@ // singleton instance 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() { singleton = this; diff --git a/libraries/AP_ExternalControl/AP_ExternalControl.h b/libraries/AP_ExternalControl/AP_ExternalControl.h index 34228e2b7a..57670008f4 100644 --- a/libraries/AP_ExternalControl/AP_ExternalControl.h +++ b/libraries/AP_ExternalControl/AP_ExternalControl.h @@ -8,6 +8,7 @@ #if AP_EXTERNAL_CONTROL_ENABLED +#include #include #include @@ -32,6 +33,16 @@ public: 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 { return singleton; }