Changeset 496:0dadad5a93b8 for src/mlx/checks.py
- Timestamp:
- 04/06/13 14:06:45 (11 years ago)
- Branch:
- xplane
- Parents:
-
478:00d38a068da9 (diff), 495:9c830f5791a5 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - hg-Phase:
- (<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/checks.py
r478 r496 1382 1382 if state.groundSpeed>50: 1383 1383 SpeedChecker.logSpeedFault(flight, state) 1384 else: 1385 self._takeoffState = None 1384 1386 1385 1387 def _checkPushAndTaxi(self, flight, aircraft, state): … … 1426 1428 def isCondition(self, flight, aircraft, oldState, state): 1427 1429 """Check if the fault condition holds.""" 1428 return (flight.stage==const.STAGE_BOARDING and \ 1430 return state.strobeLightsOn is not None and \ 1431 ((flight.stage==const.STAGE_BOARDING and \ 1429 1432 state.strobeLightsOn and state.onTheGround) or \ 1430 1433 (flight.stage==const.STAGE_TAKEOFF and \ … … 1434 1437 not state.strobeLightsOn and not state.onTheGround) or \ 1435 1438 (flight.stage==const.STAGE_PARKING and \ 1436 state.strobeLightsOn and state.onTheGround) 1439 state.strobeLightsOn and state.onTheGround)) 1437 1440 1438 1441 def logFault(self, flight, aircraft, logger, oldState, state): -
src/mlx/checks.py
r480 r496 957 957 """Check if the fault condition holds.""" 958 958 if flight.stage==const.STAGE_CRUISE: 959 bankLimit = 30 959 isDH8DXplane = flight.aircraftType==const.AIRCRAFT_DH8D and \ 960 (flight.fsType==const.SIM_XPLANE10 or 961 flight.fsType==const.SIM_XPLANE9) 962 bankLimit = 35 if isDH8DXplane else 30 960 963 elif flight.stage in [const.STAGE_TAKEOFF, const.STAGE_CLIMB, 961 964 const.STAGE_DESCENT, const.STAGE_LANDING]: … … 968 971 def logFault(self, flight, aircraft, logger, oldState, state): 969 972 """Log the fault.""" 973 message = "Bank too steep (%.1f)" % (state.bank,) 970 974 flight.handleFault(BankChecker, state.timestamp, 971 FaultChecker._appendDuring(flight, "Bank too steep"),975 FaultChecker._appendDuring(flight, message), 972 976 2) 973 977
Note:
See TracChangeset
for help on using the changeset viewer.