22 lines
530 B
Python
22 lines
530 B
Python
def get_puck_names():
|
|
return [str(a)+str(b) for a in BLOCKS for b in range(1,6)]
|
|
|
|
|
|
def get_puck_info():
|
|
ret = []
|
|
#for puck in get_puck_names():
|
|
for puck in BasePlate.pucks:
|
|
ret.append({"address" : str(puck.name), "status": str(puck.status), "barcode" : str(puck.id)})
|
|
return ret
|
|
|
|
|
|
def get_puck_obj(address):
|
|
return BasePlate.getChild(address)
|
|
|
|
|
|
def get_puck_obj_by_id(puck_id):
|
|
for puck in BasePlate.pucks:
|
|
if puck.id == puck_id:
|
|
return puck
|
|
return None
|
|
|