AP_SerialManager: fixed matching bug in protocol_match()
thanks to Mike Clement for noticing this
This commit is contained in:
parent
c5c40adb76
commit
5284211c96
@ -313,13 +313,13 @@ bool AP_SerialManager::protocol_match(enum SerialProtocol protocol1, enum Serial
|
|||||||
|
|
||||||
// mavlink match
|
// mavlink match
|
||||||
if (((protocol1 == SerialProtocol_MAVLink) || (protocol1 == SerialProtocol_MAVLink2)) &&
|
if (((protocol1 == SerialProtocol_MAVLink) || (protocol1 == SerialProtocol_MAVLink2)) &&
|
||||||
((protocol2 == SerialProtocol_MAVLink) || (protocol1 == SerialProtocol_MAVLink2))) {
|
((protocol2 == SerialProtocol_MAVLink) || (protocol2 == SerialProtocol_MAVLink2))) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// gps match
|
// gps match
|
||||||
if (((protocol1 == SerialProtocol_GPS) || (protocol1 == SerialProtocol_GPS2)) &&
|
if (((protocol1 == SerialProtocol_GPS) || (protocol1 == SerialProtocol_GPS2)) &&
|
||||||
((protocol2 == SerialProtocol_GPS) || (protocol1 == SerialProtocol_GPS2))) {
|
((protocol2 == SerialProtocol_GPS) || (protocol2 == SerialProtocol_GPS2))) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user