- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/fsuipc.py
r476 r443 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 1648 1656 if fsType==const.SIM_MSFSX: 1649 print "FSX detected, adding PMDG 737 NGX-specific offsets"1657 print "FSX detected, adding position lights switch offset" 1650 1658 self._addOffsetWithIndexMember(data, 0x6500, "b", 1651 1659 "_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")1667 1660 1668 1661 def getAircraftState(self, aircraft, timestamp, data): … … 1673 1666 timestamp, 1674 1667 data) 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 1668 if data[self._pmdgidx_switches]&0x01==0x01: 1669 state.altimeter = 1013.25 1688 1670 1689 1671 state.xpdrC = data[self._pmdgidx_xpdr]==4 1672 1673 state.apMaster = data[self._pmdgidx_ap]&0x02==0x02 1674 1675 state.apHeadingHold = data[self._pmdgidx_aphdgsel]==2 1690 1676 state.apHeading = data[self._pmdgidx_aphdg] 1677 1678 apalthold = data[self._pmdgidx_apalthold] 1679 state.apAltitudeHold = apalthold>=3 and apalthold<=6 1691 1680 state.apAltitude = data[self._pmdgidx_apalt] 1681 1682 if self._fsType==const.SIM_MSFSX: 1683 state.strobeLightsOn = data[self._pmdgidx_lts_positionsw]==0x02 1692 1684 1693 1685 return state … … 1748 1740 return "FSUIPC/Dreamwings Bombardier Dash 8-Q400" 1749 1741 1750 def addMonitoringData(self, data, fsType):1751 """Add the model-specific monitoring data to the given array."""1752 super(DreamwingsDH8DModel, self).addMonitoringData(data, fsType)1753 1754 self._addOffsetWithIndexMember(data, 0x132c, "d", "_dwdh8d_navgps")1755 1756 1742 def getAircraftState(self, aircraft, timestamp, data): 1757 1743 """Get the aircraft state. … … 1761 1747 timestamp, 1762 1748 data) 1763 if data[self._dwdh8d_navgps]==1: 1764 state.apHeading = None 1749 state.pitotHeatOn = not state.pitotHeatOn 1765 1750 1766 1751 return state
Note:
See TracChangeset
for help on using the changeset viewer.