Changeset 520:6a09d031f8f0
- Timestamp:
- 06/05/13 15:40:01 (12 years ago)
- Branch:
- default
- Children:
- 521:9f6c08020c54, 522:63e057098ed7
- Phase:
- public
- Tags:
- version_0.21
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/checks.py
r519 r520 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
Note:
See TracChangeset
for help on using the changeset viewer.