Ignore:
Files:
3 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                 )
  • src/mlx/const.py

    r521 r516  
    1111
    1212## The version of the program
    13 VERSION="0.21xpl"
     13VERSION="0.20xpl"
    1414
    1515#-------------------------------------------------------------------------------
  • test/test1.txt

    r519 r415  
    1414set adf1=382
    1515set parking=yes
    16 
    1716set parking=no
    1817set lights=3
     
    2827set xpdrC=0
    2928set altimeter=1004
    30 
    3129set lights=23
    3230set gs=60 ias=60
     
    3735set n1_1=90
    3836set n1_2=90
    39 
    4037set gs=100 ias=100
    4138set gs=120 ias=120
    4239set onTheGround=no
    4340set altitude=600
    44 
    4541set noseGear=0
    4642set altitude=2000
    4743set nav1=111.5
    4844set flapsControl=0
    49 
    5045set altimeter=1013.25
    5146set altitude=10000
     
    5348set ias=400
    5449set altitude=22001
    55 
    5650set vs=-200
    5751set altitude=15000
     
    6458set flapsControl=87.5
    6559set ias=130 gs=130
    66 
    6760set altitude=3500
    6861set ias=125 gs=125
     
    7669set latitude=47.49 longitude=21.62
    7770set lights=23
    78 
    7971set onTheGround=yes
    8072set n1_1=-10
    8173set n1_2=-10
     74set n1_1=0
     75set n1_2=0
     76set ias=45 gs=45
    8277set lights=19
    83 set n1_1=20
    84 set n1_2=20
    85 set ias=45 gs=45
    8678set ias=35 gs=35
    8779set ias=20 gs=20
    8880set xpdrC=1
    89 
     81set ias=0 gs=0
    9082set parking=yes
    91 set n1_1=0
    92 set n1_2=0
    93 set lights=17
    94 set ias=0 gs=0
    95 set lights=1
Note: See TracChangeset for help on using the changeset viewer.