Changeset 1043:3629e16455ef for src
- Timestamp:
- 04/03/22 14:32:40 (3 years ago)
- Branch:
- python3
- Phase:
- public
- Location:
- src/mlx
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/acft.py
r919 r1043 516 516 This default implementation checks the N1 values, but for 517 517 piston-powered aircraft you need to check the RPMs.""" 518 for n1 in aircraftState.n1: 519 if n1>=0.5: return False 518 if aircraftState.n1 is not None: 519 for n1 in aircraftState.n1: 520 if n1 is not None and n1>=0.5: return False 520 521 return True 521 522 -
src/mlx/checks.py
r919 r1043 977 977 be on.""" 978 978 if state.n1 is not None: 979 return max(state.n1)>5 979 for n1 in state.n1: 980 if n1 is not None and n1>5: 981 return True 982 return False 980 983 elif state.rpm is not None: 981 984 return max(state.rpm)>0 … … 1590 1593 def isCondition(self, flight, aircraft, oldState, state): 1591 1594 """Check if the fault condition holds.""" 1592 return flight.stage==const.STAGE_TAKEOFF and \ 1593 state.n1 is not None and max(state.n1)>97 1595 if flight.stage==const.STAGE_TAKEOFF and state.n1 is not None: 1596 for n1 in state.n1: 1597 if n1 is not None and n1>97: 1598 return True 1599 return False 1594 1600 1595 1601 def logFault(self, flight, aircraft, logger, oldState, state):
Note:
See TracChangeset
for help on using the changeset viewer.