Changeset 383:fcb9932b14ee for src/mlx/flight.py
- Timestamp:
- 12/21/12 15:44:59 (11 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/flight.py
r365 r383 24 24 It is also the hub for the other main objects participating in the handling of 25 25 the flight.""" 26 @staticmethod 27 def canLogCruiseAltitude(stage): 28 """Determine if the cruise altitude can be logged in the given 29 stage.""" 30 return stage in [const.STAGE_CRUISE, const.STAGE_DESCENT, 31 const.STAGE_LANDING] 32 26 33 def __init__(self, logger, gui): 27 34 """Construct the flight.""" … … 414 421 def cruiseLevelChanged(self): 415 422 """Called when the cruise level hass changed.""" 416 if self._stage in [const.STAGE_CRUISE, const.STAGE_DESCENT, 417 const.STAGE_LANDING]: 423 if self.canLogCruiseAltitude(self._stage): 418 424 message = "Cruise altitude modified to %d feet" % \ 419 (self. cruiseAltitude,)425 (self._gui.loggableCruiseAltitude,) 420 426 self.logger.message(self.aircraft.timestamp, message) 427 return True 428 else: 429 return False 421 430 422 431 def _updateFlownDistance(self, currentState):
Note:
See TracChangeset
for help on using the changeset viewer.