Changeset 1073:a5a22d24f890 for src


Ignore:
Timestamp:
12/24/22 08:47:04 (2 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
python3
Phase:
public
Message:

New constant for X-Plane 12

Location:
src/mlx
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/checks.py

    r1059 r1073  
    10261026        isXPlane = (flight.aircraftType==const.AIRCRAFT_DH8D or
    10271027                    flight.aircraftType==const.AIRCRAFT_B733) and \
    1028                     (flight.fsType==const.SIM_XPLANE11 or
     1028                    (flight.fsType==const.SIM_XPLANE12 or
     1029                     flight.fsType==const.SIM_XPLANE11 or
    10291030                     flight.fsType==const.SIM_XPLANE10 or
    10301031                     flight.fsType==const.SIM_XPLANE9)
  • src/mlx/const.py

    r1066 r1073  
    5252## Flight simulator type: X-Plane 11
    5353SIM_XPLANE11 = 6
     54
     55## Flight simulator type: X-Plane 12
     56SIM_XPLANE12 = 7
    5457
    5558#-------------------------------------------------------------------------------
  • src/mlx/fs.py

    r919 r1073  
    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, const.SIM_XPLANE11]:
     64    elif type in [const.SIM_XPLANE9, const.SIM_XPLANE10, const.SIM_XPLANE11,
     65                  const.SIM_XPLANE12]:
    6566        return xplane.Simulator(connectionListener, connectAttempts = 3)
    6667    else:
  • src/mlx/xplane.py

    r1070 r1073  
    523523                  (xplaneVersion, xplmVersion, xplraVersion)
    524524                if not autoReconnection:
    525                     fsType = const.SIM_XPLANE11 if xplaneVersion>=11000 else \
    526                       (const.SIM_XPLANE10 if xplaneVersion>=10000 else const.SIM_XPLANE9)
     525                    fsType = \
     526                      const.SIM_XPLANE12 if xplaneVersion>=12000 else \
     527                      const.SIM_XPLANE11 if xplaneVersion>=11000 else \
     528                      const.SIM_XPLANE10 if xplaneVersion>=10000 else \
     529                      const.SIM_XPLANE9
     530
     531                    print("xplane.Handler._connect: fsType:", fsType)
    527532
    528533                    Handler._callSafe(lambda:
Note: See TracChangeset for help on using the changeset viewer.