From b867fccdd665ff3a8eeedcee7d7fb17742a716c3 Mon Sep 17 00:00:00 2001 From: gac-S_Changer Date: Mon, 10 Jul 2017 18:03:09 +0200 Subject: [PATCH] Script execution --- script/test/TestLayout.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/script/test/TestLayout.py b/script/test/TestLayout.py index 2336d44..7449d70 100644 --- a/script/test/TestLayout.py +++ b/script/test/TestLayout.py @@ -18,24 +18,26 @@ def plot_base_plate(points = None, title = None): # time.sleep(0.001) for puck in get_pucks(block.id): - print puck.number + print puck.id (xu, yu) = puck.led_uni (xm, ym) = puck.led_mini - plot_point(p, xu, yu, size = 3, color = r.color, name = str(puck.number)+"u") - plot_point(p, xm, ym, size = 7, color = r.color, name = str(puck.number)+"m") - plot_circle(p, xu, yu, LED_TOLERANCE, width = 0, color = r.color, name = str(puck.number)+"uc") - plot_circle(p, xm, ym, LED_TOLERANCE, width = 0, color = r.color, name = str(puck.number)+"mc") - p.addText((xu+xm)/2, (yu+ym)/2, str(puck.number), r.color) - plot_circle(p, xm, ym, PUCK_SIZE/2, width = 0, color = Color.GRAY, name = str(puck.number)) + plot_point(p, xu, yu, size = 3, color = r.color, name = str(puck.id)+"u") + plot_point(p, xm, ym, size = 7, color = r.color, name = str(puck.id)+"m") + plot_circle(p, xu, yu, LED_TOLERANCE, width = 0, color = r.color, name = str(puck.id)+"uc") + plot_circle(p, xm, ym, LED_TOLERANCE, width = 0, color = r.color, name = str(puck.id)+"mc") + p.addText((xu+xm)/2, (yu+ym)/2, str(puck.id), r.color) + plot_circle(p, xm, ym, PUCK_SIZE/2, width = 0, color = Color.GRAY, name = str(puck.id)) if points is not None: for point in points: - c = Color.GRAY + c, w = Color.GRAY, 1 for puck in get_pucks(): match = puck.match(point[0], point[1]) if match is not None: + w=2 c = Color.DARK_GRAY if match == "minispine" else Color.BLACK + - plot_cross(p,point[0], point[1], size = 10, width = 1, color = c, name = "P"+ str(points.index(point))) + plot_cross(p,point[0], point[1], size = 10, width = w, color = c, name = "P"+ str(points.index(point))) #plot_point(p,point[0], point[1], size = 5, color = Color.BLACK, name = "Pc"+ str(points.index(point)))