Ignore:
Timestamp:
04/06/13 14:06:45 (11 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
xplane
Parents:
478:00d38a068da9 (diff), 495:9c830f5791a5 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
hg-Phase:
(<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
Message:

Merged the default branch

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/checks.py

    r478 r496  
    13821382            if state.groundSpeed>50:
    13831383                SpeedChecker.logSpeedFault(flight, state)
     1384        else:
     1385            self._takeoffState = None
    13841386
    13851387    def _checkPushAndTaxi(self, flight, aircraft, state):
     
    14261428    def isCondition(self, flight, aircraft, oldState, state):
    14271429        """Check if the fault condition holds."""
    1428         return (flight.stage==const.STAGE_BOARDING and \
     1430        return state.strobeLightsOn is not None and \
     1431              ((flight.stage==const.STAGE_BOARDING and \
    14291432                state.strobeLightsOn and state.onTheGround) or \
    14301433                (flight.stage==const.STAGE_TAKEOFF and \
     
    14341437                  not state.strobeLightsOn and not state.onTheGround) or \
    14351438                  (flight.stage==const.STAGE_PARKING and \
    1436                    state.strobeLightsOn and state.onTheGround)
     1439                   state.strobeLightsOn and state.onTheGround))
    14371440
    14381441    def logFault(self, flight, aircraft, logger, oldState, state):
  • src/mlx/checks.py

    r480 r496  
    957957        """Check if the fault condition holds."""
    958958        if flight.stage==const.STAGE_CRUISE:
    959             bankLimit = 30
     959            isDH8DXplane = flight.aircraftType==const.AIRCRAFT_DH8D and \
     960                           (flight.fsType==const.SIM_XPLANE10 or
     961                            flight.fsType==const.SIM_XPLANE9)
     962            bankLimit = 35 if isDH8DXplane else 30
    960963        elif flight.stage in [const.STAGE_TAKEOFF, const.STAGE_CLIMB,
    961964                              const.STAGE_DESCENT, const.STAGE_LANDING]:
     
    968971    def logFault(self, flight, aircraft, logger, oldState, state):
    969972        """Log the fault."""
     973        message = "Bank too steep (%.1f)" % (state.bank,)
    970974        flight.handleFault(BankChecker, state.timestamp,
    971                            FaultChecker._appendDuring(flight, "Bank too steep"),
     975                           FaultChecker._appendDuring(flight, message),
    972976                           2)
    973977
Note: See TracChangeset for help on using the changeset viewer.