Script execution

This commit is contained in:
gac-S_Changer
2017-07-07 16:11:32 +02:00
parent 2e5642576d
commit 6593425fbc

View File

@@ -48,7 +48,8 @@ class Puck:
def __str__(self):
return "Number: " + str(self.number) + "\nBlock: " + str(self.block) + "\nIndex: " + str(self.index) + "\nAngle: " + str(self.angle) + \
"\nCenter: " + str(self.center) + "\nLed Unipuck: " + str(self.led_uni) + "\nLed Minispine: " + str(self.led_mini)
_block_ids = []
_puck_list = []
_block_list = []
@@ -62,6 +63,10 @@ def get_pucks(block = None):
for p in _puck_list:
if (block is None) or (block==p.block):
ret.append(p)
print p.block
print _block_ids
if p.block not in (_block_ids):
_block_ids.append(p.block)
return ret
@@ -76,7 +81,7 @@ class Block:
return "Id: " + str(self.id) + "\nAngle: " + str(self.angle_range) + "\nX: " + str(self.x_range) + "\nY: " + str(self.y_range)
for id in ("A", "B", "C", "D", "E", "F"):
for id in _block_ids:
pucks = get_pucks(id)
angles, x, y = [], [], []
for p in pucks: