- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/fsuipc.py
r559 r669 381 381 fsType = const.SIM_MSFSX \ 382 382 if pyuipc.fs_version == pyuipc.SIM_FSX \ 383 else const.SIM_P3D \ 384 if pyuipc.fs_version == pyuipc.SIM_P3D \ 383 385 else const.SIM_MSFS9 384 386 … … 1174 1176 ("radioAltitude", 0x31e4, "d"), 1175 1177 ("altitude", 0x0570, "l"), 1176 ("gLoad", 0x11ba, " H"),1178 ("gLoad", 0x11ba, "h"), 1177 1179 ("flapsControl", 0x0bdc, "d"), 1178 1180 ("flapsLeft", 0x0be0, "d"), … … 1679 1681 super(PMDGBoeing737NGModel, self).addMonitoringData(data, fsType) 1680 1682 1681 if fsType==const.SIM_MSFSX: 1682 print "FSX detected, adding PMDG 737 NGX-specific offsets" 1683 if fsType==const.SIM_MSFSX or fsType==const.SIM_P3D: 1684 print "%s detected, adding PMDG 737 NGX-specific offsets" % \ 1685 ("FSX" if fsType==const.SIM_MSFSX else "P3D",) 1683 1686 self._addOffsetWithIndexMember(data, 0x6500, "b", 1684 1687 "_pmdgidx_lts_positionsw") … … 1803 1806 if data[self._dwdh8d_navgps]==1: 1804 1807 state.apHeading = None 1808 1809 return state 1810 1811 #------------------------------------------------------------------------------ 1812 1813 class MajesticDH8DModel(DH8DModel): 1814 """Model handler for the Majestic Dash 8-Q400.""" 1815 @staticmethod 1816 def doesHandle(aircraft, (name, airPath)): 1817 """Determine if this model handler handles the aircraft with the given 1818 name.""" 1819 return aircraft.type==const.AIRCRAFT_DH8D and \ 1820 (name.find("MJC8Q400")!=-1 or \ 1821 airPath.lower().find("mjc8q400") or \ 1822 airPath.lower().find("mjc8q4.air")) 1823 1824 @property 1825 def name(self): 1826 """Get the name for this aircraft model.""" 1827 return "FSUIPC/Majestic Bombardier Dash 8-Q400" 1828 1829 def getAircraftState(self, aircraft, timestamp, data): 1830 """Get the aircraft state. 1831 1832 Get it from the parent, and then clear the anti-collision and landing 1833 lights.""" 1834 state = super(MajesticDH8DModel, self).getAircraftState(aircraft, 1835 timestamp, 1836 data) 1837 state.antiCollisionLightsOn = None 1838 state.strobeLightsOn = None 1839 state.pitotHeatOn = None 1840 1841 # G-load seems to be offset by -1.0 (i.e a value of 0 seem to mean 1842 # a G-load of 1.0) 1843 state.gLoad += 1.0 1844 1845 # None of the gear values seem to work correctly 1846 state.gearsDown = state.gearControlDown 1805 1847 1806 1848 return state … … 2067 2109 state = super(PTT154Model, self).getAircraftState(aircraft, timestamp, data) 2068 2110 2069 if self._fsType==const.SIM_MSFSX :2111 if self._fsType==const.SIM_MSFSX or self._fsType==const.SIM_P3D: 2070 2112 state.xpdrC = None 2071 2113 … … 2142 2184 AircraftModel.registerSpecial(PMDGBoeing737NGModel) 2143 2185 AircraftModel.registerSpecial(DreamwingsDH8DModel) 2186 AircraftModel.registerSpecial(MajesticDH8DModel) 2144 2187 AircraftModel.registerSpecial(DAF70Model) 2145 2188 AircraftModel.registerSpecial(PTT154Model)
Note:
See TracChangeset
for help on using the changeset viewer.