mirror of https://github.com/ArduPilot/ardupilot
AP_Arming: move multiple RC input error to pre-arm failure
This commit is contained in:
parent
d253b725fb
commit
16e21d42ee
|
@ -49,6 +49,7 @@
|
|||
#include <AP_RPM/AP_RPM.h>
|
||||
#include <AP_Mount/AP_Mount.h>
|
||||
#include <AP_OpenDroneID/AP_OpenDroneID.h>
|
||||
#include <AP_SerialManager/AP_SerialManager.h>
|
||||
|
||||
#if HAL_MAX_CAN_PROTOCOL_DRIVERS
|
||||
#include <AP_CANManager/AP_CANManager.h>
|
||||
|
@ -1407,6 +1408,16 @@ bool AP_Arming::opendroneid_checks(bool display_failure)
|
|||
return true;
|
||||
}
|
||||
|
||||
//Check for multiple RC in serial protocols
|
||||
bool AP_Arming::serial_protocol_checks(bool display_failure)
|
||||
{
|
||||
if (AP::serialmanager().have_serial(AP_SerialManager::SerialProtocol_RCIN, 1)) {
|
||||
check_failed(display_failure, "Multiple SERIAL ports configured for RC input");
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AP_Arming::pre_arm_checks(bool report)
|
||||
{
|
||||
#if !APM_BUILD_COPTER_OR_HELI
|
||||
|
@ -1445,7 +1456,8 @@ bool AP_Arming::pre_arm_checks(bool report)
|
|||
& aux_auth_checks(report)
|
||||
& disarm_switch_checks(report)
|
||||
& fence_checks(report)
|
||||
& opendroneid_checks(report);
|
||||
& opendroneid_checks(report)
|
||||
& serial_protocol_checks(report);
|
||||
}
|
||||
|
||||
bool AP_Arming::arm_checks(AP_Arming::Method method)
|
||||
|
@ -1503,6 +1515,7 @@ bool AP_Arming::mandatory_checks(bool report)
|
|||
ret &= opendroneid_checks(report);
|
||||
#endif
|
||||
ret &= rc_in_calibration_check(report);
|
||||
ret &= serial_protocol_checks(report);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -201,6 +201,8 @@ protected:
|
|||
bool generator_checks(bool report) const;
|
||||
|
||||
bool opendroneid_checks(bool display_failure);
|
||||
|
||||
bool serial_protocol_checks(bool display_failure);
|
||||
|
||||
virtual bool system_checks(bool report);
|
||||
|
||||
|
|
Loading…
Reference in New Issue