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