Browse Source

AP_Arming: added button arming check

gps-1.3.1
Andrew Tridgell 4 years ago
parent
commit
d95f6c8c2f
  1. 6
      libraries/AP_Arming/AP_Arming.cpp

6
libraries/AP_Arming/AP_Arming.cpp

@ -41,6 +41,7 @@ @@ -41,6 +41,7 @@
#include <AP_VisualOdom/AP_VisualOdom.h>
#include <AP_Parachute/AP_Parachute.h>
#include <AP_OSD/AP_OSD.h>
#include <AP_Button/AP_Button.h>
#if HAL_MAX_CAN_PROTOCOL_DRIVERS
#include <AP_CANManager/AP_CANManager.h>
@ -872,6 +873,11 @@ bool AP_Arming::system_checks(bool report) @@ -872,6 +873,11 @@ bool AP_Arming::system_checks(bool report)
return false;
}
#endif
const auto &button = AP::button();
if (!button.arming_checks(sizeof(buffer), buffer)) {
check_failed(ARMING_CHECK_PARAMETERS, report, "%s", buffer);
return false;
}
}
return true;

Loading…
Cancel
Save