- File:
-
- 1 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 )
Note:
See TracChangeset
for help on using the changeset viewer.