Script execution

This commit is contained in:
gac-S_Changer
2017-07-10 18:28:13 +02:00
parent f1d21649bd
commit 7a6d1fe9c3

View File

@@ -159,6 +159,25 @@ def clear_detection(block_id=None):
for puck in get_pucks(block_id):
puck.detect = DET_ERROR
def get_puck_detection(det_type, block_id=None):
ret = []
for puck in get_pucks(block_id):
if puck.detect == det_type:
ret.append(puck.id)
return ret
def get_unipucks(block_id=None):
return get_puck_detection(DET_UNIPUCK, block_id)
def get_minispines(block_id=None):
return get_puck_detection(DET_MINISPINE, block_id)
def get_empties(block_id=None):
return get_puck_detection(DET_EMPTY, block_id)
def get_det_errors(block_id=None):
return get_puck_detection(DET_ErrorK, block_id)
###################################################################################################
#Plotting
###################################################################################################