Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/checks.py

    r521 r496  
    641641#---------------------------------------------------------------------------------------
    642642
    643 class FlapsLogger(StateChangeLogger, SingleValueMixin, DelayedChangeMixin):
     643class FlapsLogger(StateChangeLogger, SingleValueMixin, SimpleChangeMixin):
    644644    """Logger for the flaps setting."""
    645645    def __init__(self):
     
    652652                                    const.STAGE_TAKEOFF])
    653653        SingleValueMixin.__init__(self, "flapsSet")
    654         DelayedChangeMixin.__init__(self)
    655         self._getLogTimestamp = \
    656             lambda state, forced: \
    657             DelayedChangeMixin._getLogTimestamp(self, state, forced)
    658654
    659655    def _getMessage(self, flight, state, forced):
    660656        """Get the message to log on a change."""
    661         logState = self._lastChangeState if \
    662                    self._lastChangeState is not None else state
    663         speed = logState.groundSpeed if logState.groundSpeed<80.0 \
    664                 else logState.ias
     657        speed = state.groundSpeed if state.groundSpeed<80.0 else state.ias
    665658        return "Flaps %.0f - %.0f %s" % \
    666                (logState.flapsSet, flight.speedFromKnots(speed),
     659               (state.flapsSet, flight.speedFromKnots(speed),
    667660                flight.getEnglishSpeedUnit())
    668661
     
    917910    def isCondition(self, flight, aircraft, oldState, state):
    918911        """Check if the fault condition holds."""
    919         return (not flight.config.usingFS2Crew or not state.parking or
    920                 flight.stage!=const.STAGE_TAXIAFTERLAND) and \
     912        return (flight.stage!=const.STAGE_PARKING or \
     913                not flight.config.usingFS2Crew) and \
    921914                not state.antiCollisionLightsOn and \
    922915                self.isEngineCondition(state)
     
    11331126                  [const.STAGE_CRUISE, const.STAGE_DESCENT,
    11341127                   const.STAGE_GOAROUND] or \
    1135                   (flight.stage==const.STAGE_LANDING and
     1128                  (flight.stage==const.STAGE_LANDING  and
    11361129                   state.groundSpeed>50.0) or \
    11371130                  ((not state.autoXPDR or \
    11381131                    (self._liftOffTime is not None and
    11391132                     state.timestamp > (self._liftOffTime+8))) and \
    1140                    ((flight.stage==const.STAGE_TAKEOFF and
    1141                      not state.onTheGround) or flight.stage==const.STAGE_CLIMB))
     1133                   flight.stage in
     1134                   [const.STAGE_TAKEOFF, const.STAGE_RTO, const.STAGE_CLIMB])
    11421135                  )
    11431136                 )
Note: See TracChangeset for help on using the changeset viewer.