Merge pull request #41 from henry1952/patch-3

Fix an error in the bit range used to decode CF in DF18 messages (harmless)
This commit is contained in:
Oliver Jowett 2019-04-13 11:38:48 +08:00 committed by GitHub
commit a24718feca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -568,9 +568,9 @@ int decodeModesMessage(struct modesMessage *mm, unsigned char *msg)
mm->CC = getbit(msg, 7); mm->CC = getbit(msg, 7);
} }
// CF (Control field) // CF (Control field, see Figure 2-2 ADS-B Message BaselineFormat Structure)
if (mm->msgtype == 18) { if (mm->msgtype == 18) {
mm->CF = getbits(msg, 5, 8); mm->CF = getbits(msg, 6, 8);
} }
// DR (Downlink Request) // DR (Downlink Request)