Changeset 314:09f49b9eef64 for src/mlx/checks.py
- Timestamp:
- 09/30/12 06:53:14 (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/checks.py
r307 r314 301 301 def _changed(self, oldState, state): 302 302 """Determine if the value has changed.""" 303 return self._getValue(oldState)!=self._getValue(state) 303 currentValue = self._getValue(state) 304 return currentValue is not None and self._getValue(oldState)!=currentValue 304 305 305 306 #--------------------------------------------------------------------------------------- … … 759 760 def isCondition(self, flight, aircraft, oldState, state): 760 761 """Check if the fault condition holds.""" 761 return (flight.stage==const.STAGE_BOARDING and \ 762 state.landingLightsOn and state.onTheGround) or \ 763 (flight.stage==const.STAGE_TAKEOFF and \ 764 not state.landingLightsOn and not state.onTheGround) or \ 765 (flight.stage in [const.STAGE_CLIMB, const.STAGE_CRUISE, 766 const.STAGE_DESCENT] and \ 767 state.landingLightsOn and state.altitude>12500) or \ 768 (flight.stage==const.STAGE_LANDING and \ 769 not state.landingLightsOn and state.onTheGround) or \ 770 (flight.stage==const.STAGE_PARKING and \ 771 state.landingLightsOn and state.onTheGround) 762 return state.landingLightsOn is not None and \ 763 ((flight.stage==const.STAGE_BOARDING and \ 764 state.landingLightsOn and state.onTheGround) or \ 765 (flight.stage==const.STAGE_TAKEOFF and \ 766 not state.landingLightsOn and not state.onTheGround) or \ 767 (flight.stage in [const.STAGE_CLIMB, const.STAGE_CRUISE, 768 const.STAGE_DESCENT] and \ 769 state.landingLightsOn and state.altitude>12500) or \ 770 (flight.stage==const.STAGE_LANDING and \ 771 not state.landingLightsOn and state.onTheGround) or \ 772 (flight.stage==const.STAGE_PARKING and \ 773 state.landingLightsOn and state.onTheGround)) 772 774 773 775 def logFault(self, flight, aircraft, logger, oldState, state):
Note:
See TracChangeset
for help on using the changeset viewer.