Ignore:
Files:
7 added
8 edited

Legend:

Unmodified
Added
Removed
  • MANIFEST.in

    r36 r916  
    11include mlx.nsi
    22include makeinst.bat
     3include winemakeinst.bat
    34include license.txt
    45include runmlx.py
  • setup.py

    r875 r916  
    6363                           glob(os.path.join(cefDir, "locales", "*"))))
    6464
     65    if os.getenv("WINE")=="yes":
     66        winsysdir=os.getenv("WINSYSDIR")
     67        data_files.append(("", [os.path.join(winsysdir, "python27.dll")]))
     68        data_files.append(("library", [
     69                            os.path.join(winsysdir, "pywintypes27.dll"),
     70                            os.path.join(winsysdir, "WINHTTP.dll")]))
     71
     72        if gtkRuntimeDir:
     73            gtkBinDir = os.path.join(gtkRuntimeDir, "bin")
     74            data_files.append(("library", [
     75                                os.path.join(gtkBinDir, "freetype6.dll"),
     76                                os.path.join(gtkBinDir, "intl.dll"),
     77                                os.path.join(gtkBinDir, "zlib1.dll"),
     78                                os.path.join(gtkBinDir, "libglib-2.0-0.dll"),
     79                                os.path.join(gtkBinDir, "libatk-1.0-0.dll"),
     80                                os.path.join(gtkBinDir, "libcairo-2.dll"),
     81                                os.path.join(gtkBinDir, "libexpat-1.dll"),
     82                                os.path.join(gtkBinDir, "libpangowin32-1.0-0.dll"),
     83                                os.path.join(gtkBinDir, "libgio-2.0-0.dll"),
     84                                os.path.join(gtkBinDir, "libgdk-win32-2.0-0.dll"),
     85                                os.path.join(gtkBinDir, "libpng14-14.dll"),
     86                                os.path.join(gtkBinDir, "libgobject-2.0-0.dll"),
     87                                os.path.join(gtkBinDir, "libgdk_pixbuf-2.0-0.dll"),
     88                                os.path.join(gtkBinDir, "libfontconfig-1.dll"),
     89                                os.path.join(gtkBinDir, "libpangoft2-1.0-0.dll"),
     90                                os.path.join(gtkBinDir, "libgmodule-2.0-0.dll"),
     91                                os.path.join(gtkBinDir, "libpango-1.0-0.dll"),
     92                                os.path.join(gtkBinDir, "libpangocairo-1.0-0.dll"),
     93                                os.path.join(gtkBinDir, "libgtk-win32-2.0-0.dll"),
     94                                os.path.join(gtkBinDir, "libgthread-2.0-0.dll")
     95                              ]))
     96        if cefDir:
     97            data_files.append(("library", [
     98                                os.path.join(cefDir, "libcef.dll")
     99                              ]))
     100
    65101    print data_files
    66102
  • src/mlx/acft.py

    r899 r917  
    11491149            self.mtow = 100000
    11501150            self.mlw = 80000
     1151        elif bookedFlight.tailNumber=="HA-LCX":
     1152            self.mtow = 100000
     1153            self.mlw = 80000
     1154            self.mzfw = 74000
     1155
     1156            self.flapSpeedLimits = { 15 : 227,
     1157                                     28 : 194,
     1158                                     36 : 178,
     1159                                     45 : 162 }
    11511160
    11521161    def _appendLightsLoggers(self):
  • src/mlx/checks.py

    r896 r917  
    10211021    def isCondition(self, flight, aircraft, oldState, state):
    10221022        """Check if the fault condition holds."""
     1023        isXPlane = (flight.aircraftType==const.AIRCRAFT_DH8D or
     1024                    flight.aircraftType==const.AIRCRAFT_B733) and \
     1025                    (flight.fsType==const.SIM_XPLANE11 or
     1026                     flight.fsType==const.SIM_XPLANE10 or
     1027                     flight.fsType==const.SIM_XPLANE9)
    10231028        if flight.stage==const.STAGE_CRUISE:
    1024             isDH8DXplane = flight.aircraftType==const.AIRCRAFT_DH8D and \
    1025                            (flight.fsType==const.SIM_XPLANE10 or
    1026                             flight.fsType==const.SIM_XPLANE9)
    1027             bankLimit = 35 if isDH8DXplane else 30
     1029            bankLimit = 40 if isXPlane else 30
    10281030        elif flight.stage in [const.STAGE_TAKEOFF, const.STAGE_CLIMB,
    10291031                              const.STAGE_DESCENT, const.STAGE_LANDING]:
    1030             bankLimit = 35
     1032            bankLimit = 45 if isXPlane else 35
    10311033        else:
    10321034            return False
  • src/mlx/const.py

    r907 r917  
    4949## Flight simulator type: Prepar3D
    5050SIM_P3D = 5
     51
     52## Flight simulator type: X-Plane 11
     53SIM_XPLANE11 = 6
    5154
    5255#-------------------------------------------------------------------------------
  • src/mlx/fs.py

    r765 r909  
    6262    if type in [const.SIM_MSFS9, const.SIM_MSFSX]:
    6363        return fsuipc.Simulator(connectionListener, connectAttempts = 3)
    64     elif type in [const.SIM_XPLANE9, const.SIM_XPLANE10]:
     64    elif type in [const.SIM_XPLANE9, const.SIM_XPLANE10, const.SIM_XPLANE11]:
    6565        return xplane.Simulator(connectionListener, connectAttempts = 3)
    6666    else:
    67         "Only MS Flight Simulator 2004 and X or X-Plane 9 and 10 are supported"
     67        "Only MS Flight Simulator 2004 and X or X-Plane 9, 10 and 11 are supported"
    6868
    6969#-------------------------------------------------------------------------------
  • src/mlx/gui/cef.py

    r805 r915  
    309309        container.connect("size-allocate", _handleSizeAllocate)
    310310    else:
    311         container = gtk.VBox(True, 0)
     311        container = gtk.DrawingArea()
    312312
    313313    container.show()
     
    327327            windowID = window.handle
    328328    else:
    329         m = re.search("GtkVBox at 0x(\w+)", str(container))
    330         hexID = m.group(1)
    331         windowID = int(hexID, 16)
     329        windowID = container.window.xid
    332330
    333331    windowInfo = cefpython.WindowInfo()
  • src/mlx/xplane.py

    r893 r909  
    506506                  (xplaneVersion, xplmVersion, xplraVersion)
    507507                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)
    509510
    510511                    Handler._callSafe(lambda:
     
    14341435
    14351436        flapsControl = data[self._monidx_flapsControl]
    1436         flapsIndex = int(flapsControl * (len(self._flapsNotches)-1))
     1437        flapsIndex = int(round(flapsControl * (len(self._flapsNotches)-1)))
    14371438        state.flapsSet = 0 if flapsIndex<1 else self._flapsNotches[flapsIndex]
    14381439
     
    18781879
    18791880class T154Model(GenericAircraftModel):
    1880     """Generic model for the Tupolev Tu-134 aircraft."""
     1881    """Generic model for the Tupolev Tu-154 aircraft."""
    18811882    fuelTanks = [const.FUELTANK_CENTRE, const.FUELTANK_CENTRE2,
    18821883                 const.FUELTANK_RIGHT, const.FUELTANK_LEFT,
     
    19021903        del state.reverser[1]
    19031904        return state
     1905
     1906#------------------------------------------------------------------------------
     1907
     1908class 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"
    19041930
    19051931#------------------------------------------------------------------------------
     
    19441970
    19451971AircraftModel.registerSpecial(FJSDH8DModel)
     1972AircraftModel.registerSpecial(FelisT154Model)
    19461973
    19471974#------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.