Changeset 499:9ff36d6cab14


Ignore:
Timestamp:
04/07/13 06:33:43 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
xplane
Phase:
public
Message:

The simulator interface used depends on the type given

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/fs.py

    r420 r499  
    55import os
    66
    7 if os.name=="nt" or "FORCE_PYUIPC_SIM" in os.environ:
    8     import fsuipc as sim
    9 else:
    10     import xplane as sim
     7import fsuipc
     8import xplane
    119
    1210import threading
     
    6260    FIXME: add info
    6361    """
    64     assert type in [const.SIM_MSFS9, const.SIM_MSFSX], \
    65            "Only MS Flight Simulator 2004 and X are supported"
    66     return sim.Simulator(connectionListener, connectAttempts = 3)
     62    if type in [const.SIM_MSFS9, const.SIM_MSFSX]:
     63        return fsuipc.Simulator(connectionListener, connectAttempts = 3)
     64    elif type in [const.SIM_XPLANE9, const.SIM_XPLANE10]:
     65        return xplane.Simulator(connectionListener, connectAttempts = 3)
     66    else:
     67        "Only MS Flight Simulator 2004 and X or X-Plane 9 and 10 are supported"
    6768
    6869#-------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.