Changeset 26:86eae254f951
- Timestamp:
- 02/19/12 15:01:54 (13 years ago)
- Branch:
- default
- Phase:
- public
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
.hgignore
r20 r26 4 4 dist/.+ 5 5 build/.+ 6 mlx-common.nsh -
src/checks.py
r25 r26 476 476 def isCondition(self, flight, aircraft, oldState, state): 477 477 """Check if the fault condition holds.""" 478 isTupolev = aircraft.type in [const.AIRCRAFT_T134, 479 const.AIRCRAFT_T154] 478 480 return (flight.stage!=const.STAGE_PARKING or \ 479 481 not flight.options.fs2Crew) and \ 480 482 not state.antiCollisionLightsOn and \ 481 max(state.n1)>5 483 ((isTupolev and max(state.n1[1:])>5) or \ 484 (not isTupolev and max(state.n1)>5)) 482 485 483 486 def logFault(self, flight, aircraft, logger, oldState, state): … … 835 838 def isCondition(self, flight, aircraft, oldState, state): 836 839 """Check if the fault condition holds.""" 837 return (flight.stage==const.STAGE_BOARDING and \ 838 state.strobeLightsOn and state.onTheGround) or \ 839 (flight.stage==const.STAGE_TAKEOFF and \ 840 not state.strobeLightsOn and not state.gearsDown) or \ 841 (flight.stage in [const.STAGE_CLIMB, const.STAGE_CRUISE, 842 const.STAGE_DESCENT] and \ 843 not state.strobeLightsOn and not state.onTheGround) or \ 844 (flight.stage==const.STAGE_PARKING and \ 845 state.strobeLightsOn and state.onTheGround) 840 if aircraft.type in [const.AIRCRAFT_T134, 841 const.AIRCRAFT_T154, 842 const.AIRCRAFT_YK40]: 843 return False 844 else: 845 return (flight.stage==const.STAGE_BOARDING and \ 846 state.strobeLightsOn and state.onTheGround) or \ 847 (flight.stage==const.STAGE_TAKEOFF and \ 848 not state.strobeLightsOn and not state.gearsDown) or \ 849 (flight.stage in [const.STAGE_CLIMB, const.STAGE_CRUISE, 850 const.STAGE_DESCENT] and \ 851 not state.strobeLightsOn and not state.onTheGround) or \ 852 (flight.stage==const.STAGE_PARKING and \ 853 state.strobeLightsOn and state.onTheGround) 846 854 847 855 def logFault(self, flight, aircraft, logger, oldState, state): -
src/fsuipc.py
r23 r26 12 12 import calendar 13 13 import sys 14 import codecs 14 15 15 16 if os.name == "nt": … … 474 475 self._flareStart = None 475 476 self._flareStartFS = None 476 477 478 self._latin1decoder = codecs.getdecoder("iso-8859-1") 479 477 480 def connect(self, aircraft): 478 481 """Initiate a connection to the simulator.""" … … 592 595 if needNew: 593 596 self._setAircraftModel(AircraftModel.create(self._aircraft, aircraftName)) 594 595 self._aircraft.modelChanged(timestamp, name, self._aircraftModel.name) 597 598 599 self._aircraft.modelChanged(timestamp, self._latin1decoder(name), 600 self._aircraftModel.name) 596 601 597 602 return needNew -
src/mlx.py
r24 r26 392 392 table.attach(self._nav2, 11, 12, 3, 4) 393 393 394 (label, self._fuel) = self._createLabeledEntry("Fuel:", 20, xalign = 0.0)394 (label, self._fuel) = self._createLabeledEntry("Fuel:", 40, xalign = 0.0) 395 395 table.attach(label, 0, 1, 4, 5) 396 396 table.attach(self._fuel, 1, 4, 4, 5) … … 521 521 for fuel in aircraftState.fuel: 522 522 if fuelStr: fuelStr += ", " 523 fuelStr += "%.0f" % (fuel,) 523 fuelStr += "%.0f" % (fuel,) 524 524 self._fuel.set_text(fuelStr) 525 525
Note:
See TracChangeset
for help on using the changeset viewer.