diff --git a/libraries/AP_Relay/AP_Relay.cpp b/libraries/AP_Relay/AP_Relay.cpp index 47d2b030b8..33c1a2d48e 100644 --- a/libraries/AP_Relay/AP_Relay.cpp +++ b/libraries/AP_Relay/AP_Relay.cpp @@ -472,6 +472,18 @@ bool AP_Relay::arming_checks(size_t buflen, char *buffer) const } return false; } + + // Each pin can only be used by a single relay + for (uint8_t j=i+1; jsnprintf(buffer, buflen, "pin conflict RELAY%u_PIN = RELAY%u_PIN", int(i+1), int(j+1)); + return false; + } + } } return true; }