diff --git a/script/setup/Layout.py b/script/setup/Layout.py index ee94d11..3086961 100644 --- a/script/setup/Layout.py +++ b/script/setup/Layout.py @@ -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 = []