mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 00:28:30 -04:00
AP_Arming: move multiple RC input error to pre-arm failure
This commit is contained in:
parent
4a9ac7ce1c
commit
3e815dd1b0
@ -49,6 +49,7 @@
|
|||||||
#include <AP_RPM/AP_RPM.h>
|
#include <AP_RPM/AP_RPM.h>
|
||||||
#include <AP_Mount/AP_Mount.h>
|
#include <AP_Mount/AP_Mount.h>
|
||||||
#include <AP_OpenDroneID/AP_OpenDroneID.h>
|
#include <AP_OpenDroneID/AP_OpenDroneID.h>
|
||||||
|
#include <AP_SerialManager/AP_SerialManager.h>
|
||||||
|
|
||||||
#if HAL_MAX_CAN_PROTOCOL_DRIVERS
|
#if HAL_MAX_CAN_PROTOCOL_DRIVERS
|
||||||
#include <AP_CANManager/AP_CANManager.h>
|
#include <AP_CANManager/AP_CANManager.h>
|
||||||
@ -1407,6 +1408,16 @@ bool AP_Arming::opendroneid_checks(bool display_failure)
|
|||||||
return true;
|
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)
|
bool AP_Arming::pre_arm_checks(bool report)
|
||||||
{
|
{
|
||||||
#if !APM_BUILD_COPTER_OR_HELI
|
#if !APM_BUILD_COPTER_OR_HELI
|
||||||
@ -1445,7 +1456,8 @@ bool AP_Arming::pre_arm_checks(bool report)
|
|||||||
& aux_auth_checks(report)
|
& aux_auth_checks(report)
|
||||||
& disarm_switch_checks(report)
|
& disarm_switch_checks(report)
|
||||||
& fence_checks(report)
|
& fence_checks(report)
|
||||||
& opendroneid_checks(report);
|
& opendroneid_checks(report)
|
||||||
|
& serial_protocol_checks(report);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AP_Arming::arm_checks(AP_Arming::Method method)
|
bool AP_Arming::arm_checks(AP_Arming::Method method)
|
||||||
@ -1503,6 +1515,7 @@ bool AP_Arming::mandatory_checks(bool report)
|
|||||||
ret &= opendroneid_checks(report);
|
ret &= opendroneid_checks(report);
|
||||||
#endif
|
#endif
|
||||||
ret &= rc_in_calibration_check(report);
|
ret &= rc_in_calibration_check(report);
|
||||||
|
ret &= serial_protocol_checks(report);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -201,6 +201,8 @@ protected:
|
|||||||
bool generator_checks(bool report) const;
|
bool generator_checks(bool report) const;
|
||||||
|
|
||||||
bool opendroneid_checks(bool display_failure);
|
bool opendroneid_checks(bool display_failure);
|
||||||
|
|
||||||
|
bool serial_protocol_checks(bool display_failure);
|
||||||
|
|
||||||
virtual bool system_checks(bool report);
|
virtual bool system_checks(bool report);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user