ardupilot/libraries/AP_ExternalControl/AP_ExternalControl.cpp
Ryan Friedman 98f3f59fb6 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>
2024-11-17 21:05:59 +11:00

35 lines
640 B
C++

#include "AP_ExternalControl.h"
#if AP_EXTERNAL_CONTROL_ENABLED
// 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;
}
namespace AP
{
AP_ExternalControl *externalcontrol()
{
return AP_ExternalControl::get_singleton();
}
};
#endif // AP_EXTERNAL_CONTROL_ENABLED