Line data Source code
1 : #include "AP_ExternalControl.h" 2 : 3 : #if AP_EXTERNAL_CONTROL_ENABLED 4 : 5 : // singleton instance 6 : AP_ExternalControl *AP_ExternalControl::singleton; 7 : 8 0 : bool AP_ExternalControl::arm(AP_Arming::Method method, bool do_arming_checks) 9 : { 10 0 : return AP::arming().arm(method, do_arming_checks); 11 : } 12 : 13 0 : bool AP_ExternalControl::disarm(AP_Arming::Method method, bool do_disarm_checks) 14 : { 15 0 : return AP::arming().disarm(method, do_disarm_checks); 16 : } 17 : 18 1978 : AP_ExternalControl::AP_ExternalControl() 19 : { 20 1978 : singleton = this; 21 1978 : } 22 : 23 : 24 : namespace AP 25 : { 26 : 27 0 : AP_ExternalControl *externalcontrol() 28 : { 29 0 : return AP_ExternalControl::get_singleton(); 30 : } 31 : 32 : }; 33 : 34 : #endif // AP_EXTERNAL_CONTROL_ENABLED