Skip to content

Commit

Permalink
BDS40 Fixes selected MCP altitude decoding
Browse files Browse the repository at this point in the history
  • Loading branch information
Douglasdc3 committed Nov 16, 2020
1 parent a6c1ed3 commit a1e1d94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/aero/t2s/modes/decoder/df/bds/Bds40.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public Bds40(short[] data) {
return;
}

selectedAltitude = (((data[4] & 0x7F) << 5) | (data[6] >> 3)) * 16;
selectedAltitude = (((data[4] & 0b01111111) << 5) | (data[5] & 0b11111000) >>> 3) * 16;
if (statusMcp) {
if (selectedAltitude > 50000) {
invalidate();
Expand Down

0 comments on commit a1e1d94

Please sign in to comment.