Changeset 476:32423909dfdb
- Timestamp:
- 03/16/13 06:15:01 (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/fsuipc.py
r456 r476 1646 1646 super(PMDGBoeing737NGModel, self).addMonitoringData(data, fsType) 1647 1647 1648 self._addOffsetWithIndexMember(data, 0x6202, "b", "_pmdgidx_switches")1649 self._addOffsetWithIndexMember(data, 0x6216, "b", "_pmdgidx_xpdr")1650 self._addOffsetWithIndexMember(data, 0x6227, "b", "_pmdgidx_ap")1651 self._addOffsetWithIndexMember(data, 0x6228, "b", "_pmdgidx_aphdgsel")1652 self._addOffsetWithIndexMember(data, 0x622a, "b", "_pmdgidx_apalthold")1653 self._addOffsetWithIndexMember(data, 0x622c, "H", "_pmdgidx_aphdg")1654 self._addOffsetWithIndexMember(data, 0x622e, "H", "_pmdgidx_apalt")1655 1656 1648 if fsType==const.SIM_MSFSX: 1657 print "FSX detected, adding position lights switch offset"1649 print "FSX detected, adding PMDG 737 NGX-specific offsets" 1658 1650 self._addOffsetWithIndexMember(data, 0x6500, "b", 1659 1651 "_pmdgidx_lts_positionsw") 1652 self._addOffsetWithIndexMember(data, 0x6545, "b", "_pmdgidx_cmda") 1653 self._addOffsetWithIndexMember(data, 0x653f, "b", "_pmdgidx_aphdgsel") 1654 self._addOffsetWithIndexMember(data, 0x6543, "b", "_pmdgidx_apalthold") 1655 self._addOffsetWithIndexMember(data, 0x652c, "H", "_pmdgidx_aphdg") 1656 self._addOffsetWithIndexMember(data, 0x652e, "H", "_pmdgidx_apalt") 1657 self._addOffsetWithIndexMember(data, 0x65cd, "b", "_pmdgidx_xpdr") 1658 else: 1659 print "FS9 detected, adding PMDG 737 NG-specific offsets" 1660 self._addOffsetWithIndexMember(data, 0x6202, "b", "_pmdgidx_switches") 1661 self._addOffsetWithIndexMember(data, 0x6216, "b", "_pmdgidx_xpdr") 1662 self._addOffsetWithIndexMember(data, 0x6227, "b", "_pmdgidx_ap") 1663 self._addOffsetWithIndexMember(data, 0x6228, "b", "_pmdgidx_aphdgsel") 1664 self._addOffsetWithIndexMember(data, 0x622a, "b", "_pmdgidx_apalthold") 1665 self._addOffsetWithIndexMember(data, 0x622c, "H", "_pmdgidx_aphdg") 1666 self._addOffsetWithIndexMember(data, 0x622e, "H", "_pmdgidx_apalt") 1660 1667 1661 1668 def getAircraftState(self, aircraft, timestamp, data): … … 1666 1673 timestamp, 1667 1674 data) 1668 if data[self._pmdgidx_switches]&0x01==0x01: 1669 state.altimeter = 1013.25 1675 if self._fsType==const.SIM_MSFS9: 1676 if data[self._pmdgidx_switches]&0x01==0x01: 1677 state.altimeter = 1013.25 1678 state.apMaster = data[self._pmdgidx_ap]&0x02==0x02 1679 state.apHeadingHold = data[self._pmdgidx_aphdgsel]==2 1680 apalthold = data[self._pmdgidx_apalthold] 1681 state.apAltitudeHold = apalthold>=3 and apalthold<=6 1682 else: 1683 state.apMaster = data[self._pmdgidx_cmda]!=0 1684 state.apHeadingHold = data[self._pmdgidx_aphdgsel]!=0 1685 state.apAltitudeHold = data[self._pmdgidx_apalthold]!=0 1686 #state.strobeLightsOn = data[self._pmdgidx_lts_positionsw]==0x02 1687 state.strobeLightsOn = None 1670 1688 1671 1689 state.xpdrC = data[self._pmdgidx_xpdr]==4 1672 1673 state.apMaster = data[self._pmdgidx_ap]&0x02==0x021674 1675 state.apHeadingHold = data[self._pmdgidx_aphdgsel]==21676 1690 state.apHeading = data[self._pmdgidx_aphdg] 1677 1678 apalthold = data[self._pmdgidx_apalthold]1679 state.apAltitudeHold = apalthold>=3 and apalthold<=61680 1691 state.apAltitude = data[self._pmdgidx_apalt] 1681 1682 if self._fsType==const.SIM_MSFSX:1683 state.strobeLightsOn = data[self._pmdgidx_lts_positionsw]==0x021684 1692 1685 1693 return state
Note:
See TracChangeset
for help on using the changeset viewer.