Script execution

This commit is contained in:
gac-S_Changer
2017-07-10 13:49:29 +02:00
parent 223085a4e0
commit 68f4082b5d

View File

@@ -1,4 +1,4 @@
PLATE_SIZE = 50
PLATE_SIZE = 480
BLOCK_ROI_TOLERANCE = 12 #mm
LED_TOLERANCE = 8 #mm Distance between LEDs = 18mm
PUCK_SIZE = 65
@@ -51,6 +51,14 @@ 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)
def match(self, x, y):
if math.hypot(x-self.led_uni[0], y-self.led_uni[1]) <= LED_TOLERANCE:
return "unipuck"
if math.hypot(x-self.led_mini[0], y-self.led_mini[1]) <= LED_TOLERANCE:
return "minispine"
return N one
_block_ids = []