Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/fsuipc.py

    r669 r559  
    381381                    fsType = const.SIM_MSFSX \
    382382                             if pyuipc.fs_version == pyuipc.SIM_FSX \
    383                              else const.SIM_P3D \
    384                              if pyuipc.fs_version == pyuipc.SIM_P3D \
    385383                             else const.SIM_MSFS9
    386384
     
    11761174                      ("radioAltitude", 0x31e4, "d"),
    11771175                      ("altitude", 0x0570, "l"),
    1178                       ("gLoad", 0x11ba, "h"),
     1176                      ("gLoad", 0x11ba, "H"),
    11791177                      ("flapsControl", 0x0bdc, "d"),
    11801178                      ("flapsLeft", 0x0be0, "d"),
     
    16811679        super(PMDGBoeing737NGModel, self).addMonitoringData(data, fsType)
    16821680
    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"
    16861683            self._addOffsetWithIndexMember(data, 0x6500, "b",
    16871684                                           "_pmdgidx_lts_positionsw")
     
    18061803        if data[self._dwdh8d_navgps]==1:
    18071804            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
    18471805
    18481806        return state
     
    21092067        state = super(PTT154Model, self).getAircraftState(aircraft, timestamp, data)
    21102068
    2111         if self._fsType==const.SIM_MSFSX or self._fsType==const.SIM_P3D:
     2069        if self._fsType==const.SIM_MSFSX:
    21122070            state.xpdrC = None
    21132071
     
    21842142AircraftModel.registerSpecial(PMDGBoeing737NGModel)
    21852143AircraftModel.registerSpecial(DreamwingsDH8DModel)
    2186 AircraftModel.registerSpecial(MajesticDH8DModel)
    21872144AircraftModel.registerSpecial(DAF70Model)
    21882145AircraftModel.registerSpecial(PTT154Model)
Note: See TracChangeset for help on using the changeset viewer.