Changeset 1154:516ca7c94d1d for src/mlx/rpccommon.py
- Timestamp:
- 04/24/24 18:31:17 (3 weeks ago)
- Branch:
- python3
- hg-Phase:
- (<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/rpccommon.py
r919 r1154 4 4 5 5 from . import const 6 from .gates import lhbpGates 6 7 7 8 #------------------------------------------------------------------------------ … … 51 52 """Check if the gate of the given plane conflicts with another plane's 52 53 position.""" 54 gate = lhbpGates.find(plane.gateNumber) 53 55 for p in self._planes.values(): 54 56 if p.tailNumber!=plane.tailNumber and \ 55 p.status==const.PLANE_HOME and \ 56 p.gateNumber==plane.gateNumber: 57 return True 57 p.status==const.PLANE_HOME: 58 if p.gateNumber==plane.gateNumber: 59 return True 60 if gate is not None and not gate.isAvailable(plane, 61 lhbpGates, 62 [p.gateNumber]): 63 return True 58 64 59 65 return False … … 66 72 gateNumbers.add(p.gateNumber) 67 73 return gateNumbers 74 75 def iterAvailableLHBPGates(self, tailNumber): 76 """Iterate over the available gates at LHBP.""" 77 occupiedGateNumbers = self.getOccupiedGateNumbers() 78 plane = self.__getitem__(tailNumber) 79 for gate in lhbpGates.gates: 80 if gate.isAvailable(plane, lhbpGates, occupiedGateNumbers): 81 yield gate 68 82 69 83 def updatePlane(self, tailNumber, status, gateNumber = None):
Note:
See TracChangeset
for help on using the changeset viewer.