Changeset 26:86eae254f951 for src/checks.py
- Timestamp:
- 02/19/12 15:01:54 (13 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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):
Note:
See TracChangeset
for help on using the changeset viewer.