Changeset 1078:a1e7d4f63210
- Timestamp:
- 02/14/23 15:15:42 (22 months ago)
- Branch:
- python3
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/fsuipc.py
r1077 r1078 1745 1745 super(PMDGBoeing737NGModel, self).addMonitoringData(data, fsType) 1746 1746 1747 if fsType==const.SIM_MSFSX or fsType==const.SIM_P3D :1747 if fsType==const.SIM_MSFSX or fsType==const.SIM_P3D or fsType==const.SIM_MSFS2020: 1748 1748 print("%s detected, adding PMDG 737 NGX-specific offsets" % \ 1749 ("FSX" if fsType==const.SIM_MSFSX else "P3D",)) 1749 ("FSX" if fsType==const.SIM_MSFSX else 1750 "P3D" if fsType==const.SIM_P3D else "MSFS 2020",)) 1750 1751 self._addOffsetWithIndexMember(data, 0x6500, "b", 1751 1752 "_pmdgidx_lts_positionsw") … … 1755 1756 self._addOffsetWithIndexMember(data, 0x652c, "H", "_pmdgidx_aphdg") 1756 1757 self._addOffsetWithIndexMember(data, 0x652e, "H", "_pmdgidx_apalt") 1757 self._addOffsetWithIndexMember(data, 0x65cd, "b", "_pmdgidx_xpdr") 1758 if fsType==const.SIM_MSFS2020: 1759 self._addOffsetWithIndexMember(data, 0x0b46, "b", "_pmdgidx_xpdr") 1760 else: 1761 self._addOffsetWithIndexMember(data, 0x65cd, "b", "_pmdgidx_xpdr") 1758 1762 else: 1759 1763 print("FS9 detected, adding PMDG 737 NG-specific offsets") … … 1773 1777 timestamp, 1774 1778 data) 1775 if self._fsType==const.SIM_MSFS9: 1779 1780 fsType = self._fsType 1781 if fsType==const.SIM_MSFSX or fsType==const.SIM_P3D or \ 1782 fsType==const.SIM_MSFS2020: 1783 state.apMaster = data[self._pmdgidx_cmda]!=0 1784 state.apHeadingHold = data[self._pmdgidx_aphdgsel]!=0 1785 state.apAltitudeHold = data[self._pmdgidx_apalthold]!=0 1786 1787 # state.strobeLightsOn = data[self._pmdgidx_lts_positionsw]==0x02 1788 # state.xpdrC = data[self._pmdgidx_xpdr]==4 1789 if fsType==const.SIM_MSFS2020: 1790 state.xpdrC = data[self._pmdgidx_xpdr]==4 1791 else: 1792 state.strobeLightsOn = None 1793 state.xpdrC = None 1794 else: 1776 1795 if data[self._pmdgidx_switches]&0x01==0x01: 1777 1796 state.altimeter = 1013.25 … … 1785 1804 # state.strobeLightsOn = None 1786 1805 # state.xpdrC = None 1787 else:1788 state.apMaster = data[self._pmdgidx_cmda]!=01789 state.apHeadingHold = data[self._pmdgidx_aphdgsel]!=01790 state.apAltitudeHold = data[self._pmdgidx_apalthold]!=01791 1792 # state.strobeLightsOn = data[self._pmdgidx_lts_positionsw]==0x021793 # state.xpdrC = data[self._pmdgidx_xpdr]==41794 state.strobeLightsOn = None1795 state.xpdrC = None1796 1806 1797 1807 state.apHeading = data[self._pmdgidx_aphdg]
Note:
See TracChangeset
for help on using the changeset viewer.