Changeset 592:1d9795bde55c for src/mlx
- Timestamp:
- 12/23/14 09:29:51 (10 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/mlx
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/acft.py
r591 r592 91 91 return _classes[flight.aircraftType](flight) 92 92 93 def __init__(self, flight, minLandingFuel = None): 93 def __init__(self, flight, minLandingFuel = None, 94 recommendedLandingFuel = None): 94 95 """Construct the aircraft for the given type.""" 95 96 self._flight = flight 96 97 self._minLandingFuel = minLandingFuel 98 self._recommendedLandingFuel = recommendedLandingFuel 97 99 98 100 self._name = None … … 211 213 """Get the flight the aircraft belongs to.""" 212 214 return self._flight 215 216 @property 217 def minLandingFuel(self): 218 """Get the minimum acceptable amount of the landing fuel.""" 219 return self._minLandingFuel 220 221 @property 222 def recommendedLandingFuel(self): 223 """Get the recommended amount of the landing fuel.""" 224 return self._recommendedLandingFuel 213 225 214 226 @property … … 639 651 - n1: left, right 640 652 - reverser: left, right""" 641 def __init__(self, flight, minLandingFuel = 2500): 642 super(Boeing737, self).__init__(flight, minLandingFuel = minLandingFuel) 653 def __init__(self, flight, minLandingFuel = 2500, 654 recommendedLandingFuel = 3500): 655 super(Boeing737, self).__init__(flight, 656 minLandingFuel = minLandingFuel, 657 recommendedLandingFuel = 658 recommendedLandingFuel) 643 659 644 660 self.gearSpeedLimit = 270 … … 703 719 """Base class for the various aircraft in the Boeing 737 Classic family.""" 704 720 def __init__(self, flight): 705 super(Boeing737CL, self).__init__(flight, minLandingFuel = 3500) 721 super(Boeing737CL, self).__init__(flight, minLandingFuel = 3500, 722 recommendedLandingFuel = None) 706 723 707 724 #--------------------------------------------------------------------------------------- -
src/mlx/gui/flight.py
r590 r592 1603 1603 """Construct the page.""" 1604 1604 super(FuelPage, self).__init__(wizard, xstr("fuel_title"), 1605 xstr("fuel_help"), 1605 xstr("fuel_help_pre") + 1606 xstr("fuel_help_post"), 1606 1607 completedHelp = xstr("fuel_chelp")) 1607 1608 … … 1625 1626 """Activate the page.""" 1626 1627 self._setupTanks(self._wizard._fuelData) 1628 1629 aircraft = self._wizard.gui.flight.aircraft 1630 minLandingFuel = aircraft.minLandingFuel 1631 recommendedLandingFuel = aircraft.recommendedLandingFuel 1632 1633 middleHelp = "" if minLandingFuel is None else \ 1634 (xstr("fuel_help_min") % (minLandingFuel,)) \ 1635 if recommendedLandingFuel is None else \ 1636 (xstr("fuel_help_min_rec") % (minLandingFuel, 1637 recommendedLandingFuel)) 1638 self.setHelp(xstr("fuel_help_pre") + middleHelp + xstr("fuel_help_post")) 1627 1639 1628 1640 def finalize(self):
Note:
See TracChangeset
for help on using the changeset viewer.