- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/xplane.py
r893 r909 506 506 (xplaneVersion, xplmVersion, xplraVersion) 507 507 if not autoReconnection: 508 fsType = const.SIM_XPLANE10 if xplaneVersion>=10000 else const.SIM_XPLANE9 508 fsType = const.SIM_XPLANE11 if xplaneVersion>=11000 else \ 509 (const.SIM_XPLANE10 if xplaneVersion>=10000 else const.SIM_XPLANE9) 509 510 510 511 Handler._callSafe(lambda: … … 1434 1435 1435 1436 flapsControl = data[self._monidx_flapsControl] 1436 flapsIndex = int( flapsControl * (len(self._flapsNotches)-1))1437 flapsIndex = int(round(flapsControl * (len(self._flapsNotches)-1))) 1437 1438 state.flapsSet = 0 if flapsIndex<1 else self._flapsNotches[flapsIndex] 1438 1439 … … 1878 1879 1879 1880 class T154Model(GenericAircraftModel): 1880 """Generic model for the Tupolev Tu-1 34 aircraft."""1881 """Generic model for the Tupolev Tu-154 aircraft.""" 1881 1882 fuelTanks = [const.FUELTANK_CENTRE, const.FUELTANK_CENTRE2, 1882 1883 const.FUELTANK_RIGHT, const.FUELTANK_LEFT, … … 1902 1903 del state.reverser[1] 1903 1904 return state 1905 1906 #------------------------------------------------------------------------------ 1907 1908 class FelisT154Model(T154Model): 1909 """Model for Felis' Tupolev Tu-154-M aircraft.""" 1910 @staticmethod 1911 def doesHandle(aircraft, (tailnum, author, description, notes, 1912 icao, liveryPath)): 1913 """Determine if this model handler handles the aircraft with the given 1914 name.""" 1915 return aircraft.type==const.AIRCRAFT_T154 and \ 1916 author.find("Felis")!=-1 and \ 1917 description.find("Tu154M")!=-1 1918 1919 def __init__(self): 1920 """Construct the model.""" 1921 super(T154Model, self). \ 1922 __init__(flapsNotches = [0, 15, 28, 36, 45], 1923 fuelTanks = T154Model.fuelTanks, 1924 numEngines = 3) 1925 1926 @property 1927 def name(self): 1928 """Get the name for this aircraft model.""" 1929 return "X-Plane/Felis Tupolev Tu-154-M" 1904 1930 1905 1931 #------------------------------------------------------------------------------ … … 1944 1970 1945 1971 AircraftModel.registerSpecial(FJSDH8DModel) 1972 AircraftModel.registerSpecial(FelisT154Model) 1946 1973 1947 1974 #------------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.