Changes in / [521:9f6c08020c54:516:71fe9bfad86e]
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/checks.py
r521 r496 641 641 #--------------------------------------------------------------------------------------- 642 642 643 class FlapsLogger(StateChangeLogger, SingleValueMixin, DelayedChangeMixin):643 class FlapsLogger(StateChangeLogger, SingleValueMixin, SimpleChangeMixin): 644 644 """Logger for the flaps setting.""" 645 645 def __init__(self): … … 652 652 const.STAGE_TAKEOFF]) 653 653 SingleValueMixin.__init__(self, "flapsSet") 654 DelayedChangeMixin.__init__(self)655 self._getLogTimestamp = \656 lambda state, forced: \657 DelayedChangeMixin._getLogTimestamp(self, state, forced)658 654 659 655 def _getMessage(self, flight, state, forced): 660 656 """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 665 658 return "Flaps %.0f - %.0f %s" % \ 666 ( logState.flapsSet, flight.speedFromKnots(speed),659 (state.flapsSet, flight.speedFromKnots(speed), 667 660 flight.getEnglishSpeedUnit()) 668 661 … … 917 910 def isCondition(self, flight, aircraft, oldState, state): 918 911 """Check if the fault condition holds.""" 919 return ( not flight.config.usingFS2Crew or not state.parking or920 flight.stage!=const.STAGE_TAXIAFTERLAND) and \912 return (flight.stage!=const.STAGE_PARKING or \ 913 not flight.config.usingFS2Crew) and \ 921 914 not state.antiCollisionLightsOn and \ 922 915 self.isEngineCondition(state) … … 1133 1126 [const.STAGE_CRUISE, const.STAGE_DESCENT, 1134 1127 const.STAGE_GOAROUND] or \ 1135 (flight.stage==const.STAGE_LANDING and1128 (flight.stage==const.STAGE_LANDING and 1136 1129 state.groundSpeed>50.0) or \ 1137 1130 ((not state.autoXPDR or \ 1138 1131 (self._liftOffTime is not None and 1139 1132 state.timestamp > (self._liftOffTime+8))) and \ 1140 ((flight.stage==const.STAGE_TAKEOFF and1141 not state.onTheGround) or flight.stage==const.STAGE_CLIMB))1133 flight.stage in 1134 [const.STAGE_TAKEOFF, const.STAGE_RTO, const.STAGE_CLIMB]) 1142 1135 ) 1143 1136 ) -
src/mlx/const.py
r521 r516 11 11 12 12 ## The version of the program 13 VERSION="0.2 1xpl"13 VERSION="0.20xpl" 14 14 15 15 #------------------------------------------------------------------------------- -
test/test1.txt
r519 r415 14 14 set adf1=382 15 15 set parking=yes 16 17 16 set parking=no 18 17 set lights=3 … … 28 27 set xpdrC=0 29 28 set altimeter=1004 30 31 29 set lights=23 32 30 set gs=60 ias=60 … … 37 35 set n1_1=90 38 36 set n1_2=90 39 40 37 set gs=100 ias=100 41 38 set gs=120 ias=120 42 39 set onTheGround=no 43 40 set altitude=600 44 45 41 set noseGear=0 46 42 set altitude=2000 47 43 set nav1=111.5 48 44 set flapsControl=0 49 50 45 set altimeter=1013.25 51 46 set altitude=10000 … … 53 48 set ias=400 54 49 set altitude=22001 55 56 50 set vs=-200 57 51 set altitude=15000 … … 64 58 set flapsControl=87.5 65 59 set ias=130 gs=130 66 67 60 set altitude=3500 68 61 set ias=125 gs=125 … … 76 69 set latitude=47.49 longitude=21.62 77 70 set lights=23 78 79 71 set onTheGround=yes 80 72 set n1_1=-10 81 73 set n1_2=-10 74 set n1_1=0 75 set n1_2=0 76 set ias=45 gs=45 82 77 set lights=19 83 set n1_1=2084 set n1_2=2085 set ias=45 gs=4586 78 set ias=35 gs=35 87 79 set ias=20 gs=20 88 80 set xpdrC=1 89 81 set ias=0 gs=0 90 82 set parking=yes 91 set n1_1=092 set n1_2=093 set lights=1794 set ias=0 gs=095 set lights=1
Note:
See TracChangeset
for help on using the changeset viewer.