Script execution
This commit is contained in:
@@ -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 = []
|
||||
|
||||
Reference in New Issue
Block a user