Ignore:
Timestamp:
09/30/12 06:53:14 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Added support for the landing lights and the NAV frequencies being unreliable and the Digital Aviation F70 model

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/fsuipc.py

    r298 r314  
    896896            return False
    897897
     898        print "fsuipc.Simulator: new aircraft name and air file path: %s, %s" % \
     899              (name, airPath)
     900
    898901        self._aircraftName = aircraftName
    899902        needNew = self._aircraftModel is None
     
    16611664
    16621665        return state
     1666
    16631667#------------------------------------------------------------------------------
    16641668
     
    16961700        """Get the name for this aircraft model."""
    16971701        return "FSUIPC/Generic Fokker 70"
     1702
     1703#------------------------------------------------------------------------------
     1704
     1705class DAF70Model(F70Model):
     1706    """Model for the Digital Aviation F70 implementation on FS9."""
     1707    @staticmethod
     1708    def doesHandle(aircraft, (name, airPath)):
     1709        """Determine if this model handler handles the aircraft with the given
     1710        name."""
     1711        return aircraft.type == const.AIRCRAFT_F70 and \
     1712               (airPath.endswith("fokker70_2k4_v4.1.air") or
     1713                airPath.endswith("fokker70_2k4_v4.3.air"))
     1714
     1715    @property
     1716    def name(self):
     1717        """Get the name for this aircraft model."""
     1718        return "FSUIPC/Digital Aviation Fokker 70"
     1719
     1720    def getAircraftState(self, aircraft, timestamp, data):
     1721        """Get the aircraft state.
     1722
     1723        Get it from the parent, and then invert the pitot heat state."""
     1724        state = super(DAF70Model, self).getAircraftState(aircraft,
     1725                                                         timestamp,
     1726                                                         data)
     1727        state.landingLightsOn = None
     1728        state.nav2 = None
     1729
     1730        return state
    16981731
    16991732#------------------------------------------------------------------------------
     
    18811914AircraftModel.registerSpecial(PMDGBoeing737NGModel)
    18821915AircraftModel.registerSpecial(DreamwingsDH8DModel)
    1883 
    1884 #------------------------------------------------------------------------------
     1916AircraftModel.registerSpecial(DAF70Model)
     1917
     1918#------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.