SITL: support XPlane-11

the packets are prefixed with DATA* instead of DATA@

This makes it work with both versions
This commit is contained in:
Andrew Tridgell 2017-04-08 19:51:12 +10:00
parent a8b36a9be8
commit 68e0b5b7fa
1 changed files with 1 additions and 1 deletions

View File

@ -122,7 +122,7 @@ bool XPlane::receive_data(void)
}
ssize_t len = socket_in.recv(pkt, sizeof(pkt), wait_time_ms);
if (len < pkt_len+5 || memcmp(pkt, "DATA@", 5) != 0) {
if (len < pkt_len+5 || memcmp(pkt, "DATA", 4) != 0) {
// not a data packet we understand
goto failed;
}