AP_Arming: add and use AP_RPM_ENABLED

... and backend-specific equivalents
This commit is contained in:
Peter Barker 2022-07-15 21:53:41 +10:00 committed by Andrew Tridgell
parent 586f0c45ac
commit 4fc4e7c532

View File

@ -987,11 +987,13 @@ bool AP_Arming::system_checks(bool report)
}
if (check_enabled(ARMING_CHECK_PARAMETERS)) {
#if AP_RPM_ENABLED
auto *rpm = AP::rpm();
if (rpm && !rpm->arming_checks(sizeof(buffer), buffer)) {
check_failed(ARMING_CHECK_PARAMETERS, report, "%s", buffer);
return false;
}
#endif
auto *relay = AP::relay();
if (relay && !relay->arming_checks(sizeof(buffer), buffer)) {
check_failed(ARMING_CHECK_PARAMETERS, report, "%s", buffer);