CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
Ardupilot

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: Ardupilot/ardupilot
Path: blob/master/libraries/AP_ExternalControl/AP_ExternalControl.cpp
Views: 1798
1
#include "AP_ExternalControl.h"
2
3
#if AP_EXTERNAL_CONTROL_ENABLED
4
5
// singleton instance
6
AP_ExternalControl *AP_ExternalControl::singleton;
7
8
bool AP_ExternalControl::arm(AP_Arming::Method method, bool do_arming_checks)
9
{
10
return AP::arming().arm(method, do_arming_checks);
11
}
12
13
bool AP_ExternalControl::disarm(AP_Arming::Method method, bool do_disarm_checks)
14
{
15
return AP::arming().disarm(method, do_disarm_checks);
16
}
17
18
AP_ExternalControl::AP_ExternalControl()
19
{
20
singleton = this;
21
}
22
23
24
namespace AP
25
{
26
27
AP_ExternalControl *externalcontrol()
28
{
29
return AP_ExternalControl::get_singleton();
30
}
31
32
};
33
34
#endif // AP_EXTERNAL_CONTROL_ENABLED
35
36