Changeset 420:fc063b7b571e


Ignore:
Timestamp:
02/10/13 16:54:52 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
xplane
Phase:
public
Message:

Implemented the most important parts of X-Plane support

Location:
src/mlx
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/checks.py

    r416 r420  
    954954        """Check if the fault condition holds."""
    955955        if flight.stage==const.STAGE_CRUISE:
    956             bankLimit = 30
     956            bankLimit = 32
    957957        elif flight.stage in [const.STAGE_TAKEOFF, const.STAGE_CLIMB,
    958958                              const.STAGE_DESCENT, const.STAGE_LANDING]:
     
    965965    def logFault(self, flight, aircraft, logger, oldState, state):
    966966        """Log the fault."""
     967        message = "Bank too steep (%.1f)" % (state.bank,)
    967968        flight.handleFault(BankChecker, state.timestamp,
    968                            FaultChecker._appendDuring(flight, "Bank too steep"),
     969                           FaultChecker._appendDuring(flight, message),
    969970                           2)
    970971
  • src/mlx/fs.py

    r408 r420  
    33from sound import startSound
    44
    5 import fsuipc
     5import os
     6
     7if os.name=="nt" or "FORCE_PYUIPC_SIM" in os.environ:
     8    import fsuipc as sim
     9else:
     10    import xplane as sim
     11
    612import threading
    713import time
     
    5864    assert type in [const.SIM_MSFS9, const.SIM_MSFSX], \
    5965           "Only MS Flight Simulator 2004 and X are supported"
    60     return fsuipc.Simulator(connectionListener, connectAttempts = 3)
     66    return sim.Simulator(connectionListener, connectAttempts = 3)
    6167
    6268#-------------------------------------------------------------------------------
  • src/mlx/gui/monitor.py

    r408 r420  
    386386            self._gearControlDown.set_sensitive(aircraftState.gearControlDown)
    387387            self._gearsDown.set_sensitive(aircraftState.gearsDown)
    388             self._spoilersArmed.set_sensitive(aircraftState.spoilersArmed)
     388            self._spoilersArmed.set_sensitive(aircraftState.spoilersArmed is True)
    389389            self._spoilersExtension.set_text("%.0f" % (aircraftState.spoilersExtension,))
    390390            self._windSpeed.set_text("%.0f" % (aircraftState.windSpeed,))
Note: See TracChangeset for help on using the changeset viewer.