- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/fsuipc.py
r669 r559 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 \385 383 else const.SIM_MSFS9 386 384 … … 1176 1174 ("radioAltitude", 0x31e4, "d"), 1177 1175 ("altitude", 0x0570, "l"), 1178 ("gLoad", 0x11ba, " h"),1176 ("gLoad", 0x11ba, "H"), 1179 1177 ("flapsControl", 0x0bdc, "d"), 1180 1178 ("flapsLeft", 0x0be0, "d"), … … 1681 1679 super(PMDGBoeing737NGModel, self).addMonitoringData(data, fsType) 1682 1680 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",) 1681 if fsType==const.SIM_MSFSX: 1682 print "FSX detected, adding PMDG 737 NGX-specific offsets" 1686 1683 self._addOffsetWithIndexMember(data, 0x6500, "b", 1687 1684 "_pmdgidx_lts_positionsw") … … 1806 1803 if data[self._dwdh8d_navgps]==1: 1807 1804 state.apHeading = None 1808 1809 return state1810 1811 #------------------------------------------------------------------------------1812 1813 class MajesticDH8DModel(DH8DModel):1814 """Model handler for the Majestic Dash 8-Q400."""1815 @staticmethod1816 def doesHandle(aircraft, (name, airPath)):1817 """Determine if this model handler handles the aircraft with the given1818 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 @property1825 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 landing1833 lights."""1834 state = super(MajesticDH8DModel, self).getAircraftState(aircraft,1835 timestamp,1836 data)1837 state.antiCollisionLightsOn = None1838 state.strobeLightsOn = None1839 state.pitotHeatOn = None1840 1841 # G-load seems to be offset by -1.0 (i.e a value of 0 seem to mean1842 # a G-load of 1.0)1843 state.gLoad += 1.01844 1845 # None of the gear values seem to work correctly1846 state.gearsDown = state.gearControlDown1847 1805 1848 1806 return state … … 2109 2067 state = super(PTT154Model, self).getAircraftState(aircraft, timestamp, data) 2110 2068 2111 if self._fsType==const.SIM_MSFSX or self._fsType==const.SIM_P3D:2069 if self._fsType==const.SIM_MSFSX: 2112 2070 state.xpdrC = None 2113 2071 … … 2184 2142 AircraftModel.registerSpecial(PMDGBoeing737NGModel) 2185 2143 AircraftModel.registerSpecial(DreamwingsDH8DModel) 2186 AircraftModel.registerSpecial(MajesticDH8DModel)2187 2144 AircraftModel.registerSpecial(DAF70Model) 2188 2145 AircraftModel.registerSpecial(PTT154Model)
Note:
See TracChangeset
for help on using the changeset viewer.