Changeset 798:d2fd22159c9f for src
- Timestamp:
- 07/26/16 17:27:46 (8 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/mlx
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/acft.py
r797 r798 98 98 """Base class for aircraft.""" 99 99 @staticmethod 100 def create(flight ):100 def create(flight, bookedFlight): 101 101 """Create an aircraft instance for the type in the given flight.""" 102 return _classes[flight.aircraftType](flight) 102 acft = _classes[flight.aircraftType](flight) 103 acft.setBookedFlight(bookedFlight) 104 return acft 103 105 104 106 def __init__(self, flight, minLandingFuel = None, … … 279 281 This default implementation returns DERATE_NONE.""" 280 282 return DERATE_NONE 283 284 def setBookedFlight(self, bookedFlight): 285 """Update the aircraft based on the booked flight data (e.g. tail number). 286 287 This default implementation does nothing.""" 281 288 282 289 def getDerateLine(self, value): -
src/mlx/gui/flight.py
r777 r798 5646 5646 def _connectSimulator(self, simulatorType): 5647 5647 """Connect to the simulator.""" 5648 self.gui.connectSimulator(self._bookedFlight.aircraftType, 5649 simulatorType) 5648 self.gui.connectSimulator(self._bookedFlight, simulatorType) 5650 5649 5651 5650 def _arrivalMETARCallback(self, returned, result): -
src/mlx/gui/gui.py
r769 r798 982 982 self._stdioStartingLine = False 983 983 984 def connectSimulator(self, aircraftType, simulatorType):984 def connectSimulator(self, bookedFlight, simulatorType): 985 985 """Connect to the simulator for the first time.""" 986 986 self._logger.reset() … … 988 988 self._flight = flight.Flight(self._logger, self) 989 989 self._flight.flareTimeFromFS = self.config.flareTimeFromFS 990 self._flight.aircraftType = aircraftType991 self._flight.aircraft = acft.Aircraft.create(self._flight )990 self._flight.aircraftType = bookedFlight.aircraftType 991 self._flight.aircraft = acft.Aircraft.create(self._flight, bookedFlight) 992 992 self._flight.aircraft._checkers.append(self) 993 993
Note:
See TracChangeset
for help on using the changeset viewer.