Skip to content

Commit

Permalink
Pressure alt fix from @AvSquirrel.
Browse files Browse the repository at this point in the history
  • Loading branch information
cyoung committed Sep 24, 2015
1 parent 324bef7 commit 75f6056
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main/gen_gdl90.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ func makeOwnshipReport() bool {

if isTempPressValid() {
alt = uint16(mySituation.pressure_alt)
alt = (alt + 1000) / 25
}
alt = (alt + 1000) / 25
alt = alt & 0xFFF // Should fit in 12 bits.

msg[11] = byte((alt & 0xFF0) >> 4) // Altitude.
Expand Down

0 comments on commit 75f6056

Please sign in to comment.