Changeset 339:ede634649e12


Ignore:
Timestamp:
11/17/12 12:36:20 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Added the special PMDG offsets for the transponder and AP data

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/fsuipc.py

    r337 r339  
    16201620
    16211621        self._addOffsetWithIndexMember(data, 0x6202, "b", "_pmdgidx_switches")
     1622        self._addOffsetWithIndexMember(data, 0x6216, "b", "_pmdgidx_xpdr")
     1623        self._addOffsetWithIndexMember(data, 0x6227, "b", "_pmdgidx_ap")
     1624        self._addOffsetWithIndexMember(data, 0x6228, "b", "_pmdgidx_aphdgsel")
     1625        self._addOffsetWithIndexMember(data, 0x622a, "b", "_pmdgidx_apalthold")
     1626        self._addOffsetWithIndexMember(data, 0x622c, "H", "_pmdgidx_aphdg")
     1627        self._addOffsetWithIndexMember(data, 0x622e, "H", "_pmdgidx_apalt")
    16221628
    16231629        if fsType==const.SIM_MSFSX:
     
    16351641        if data[self._pmdgidx_switches]&0x01==0x01:
    16361642            state.altimeter = 1013.25
     1643
     1644        state.xpdrC = data[self._pmdgidx_xpdr]==4
     1645
     1646        state.apMaster = data[self._pmdgidx_ap]&0x02==0x02
     1647
     1648        state.apHeadingHold = data[self._pmdgidx_aphdgsel]==2
     1649        state.apHeading = data[self._pmdgidx_aphdg]
     1650
     1651        apalthold = data[self._pmdgidx_apalthold]
     1652        state.apAltitudeHold = apalthold>=3 and apalthold<=6
     1653        state.apAltitude = data[self._pmdgidx_apalt]
    16371654
    16381655        if self._fsType==const.SIM_MSFSX:
Note: See TracChangeset for help on using the changeset viewer.