Changeset 369:dcc9f8bd75dd for src/mlx
- Timestamp:
- 12/16/12 16:33:38 (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/acft.py
r366 r369 64 64 """Construct the aircraft for the given type.""" 65 65 self._flight = flight 66 67 self._name = None 68 self._modelName = None 69 66 70 self._aircraftState = None 67 71 … … 201 205 def modelChanged(self, timestamp, aircraftName, modelName): 202 206 """Called when the simulator's aircraft changes.""" 203 self._flight.logger.message(timestamp, 204 "Aircraft: name='%s', model='%s'" % \ 205 (aircraftName, modelName)) 207 self._name = aircraftName 208 self._modelName = modelName 209 if self._flight.stage is not None: 210 self._logNameAndModel(timestamp) 206 211 207 212 def handleState(self, aircraftState): … … 240 245 """Set the given stage as the new one and do whatever should be 241 246 done.""" 247 if newStage==const.STAGE_BOARDING: 248 self._logNameAndModel(aircraftState.timestamp) 249 242 250 if self._flight.setStage(aircraftState.timestamp, newStage): 243 251 if newStage==const.STAGE_PUSHANDTAXI: … … 463 471 self._adf2Logger.forceLog(flight, logger, aircraftState) 464 472 473 def _logNameAndModel(self, timestamp): 474 """Log the aircraft's name and model with taking the timestamp from the 475 given state.""" 476 self._flight.logger.message(timestamp, 477 "Aircraft: name='%s', model='%s'" % \ 478 (self._name, self._modelName)) 479 465 480 #--------------------------------------------------------------------------------------- 466 481
Note:
See TracChangeset
for help on using the changeset viewer.