mirror of https://github.com/ArduPilot/ardupilot
AP_Arming: add pre-arm system check that scripting init succeeded
This commit is contained in:
parent
4c11b77496
commit
00ab0f2c5c
|
@ -32,6 +32,7 @@
|
|||
#include <AP_Baro/AP_Baro.h>
|
||||
#include <AP_RangeFinder/AP_RangeFinder.h>
|
||||
#include <AP_Terrain/AP_Terrain.h>
|
||||
#include <AP_Scripting/AP_Scripting.h>
|
||||
|
||||
#if HAL_WITH_UAVCAN
|
||||
#include <AP_BoardConfig/AP_BoardConfig_CAN.h>
|
||||
|
@ -705,6 +706,13 @@ bool AP_Arming::system_checks(bool report)
|
|||
check_failed(ARMING_CHECK_SYSTEM, report, "Terrain out of memory");
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
#ifdef ENABLE_SCRIPTING
|
||||
const AP_Scripting *scripting = AP_Scripting::get_singleton();
|
||||
if ((scripting != nullptr) && scripting->enabled() && scripting->init_failed()) {
|
||||
check_failed(ARMING_CHECK_SYSTEM, report, "Scripting out of memory");
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if (AP::internalerror().errors() != 0) {
|
||||
|
|
Loading…
Reference in New Issue