From 692f50b8a75da69c171bd9a3f108d91040ade0c5 Mon Sep 17 00:00:00 2001 From: mt Date: Fri, 1 Nov 2019 18:57:38 +0100 Subject: [PATCH] aanpassing calibratie --- sorteerhoed/central_management.py | 4 ++-- sorteerhoed/plotter.py | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sorteerhoed/central_management.py b/sorteerhoed/central_management.py index 435515e..f9ead4a 100644 --- a/sorteerhoed/central_management.py +++ b/sorteerhoed/central_management.py @@ -312,8 +312,8 @@ class CentralManagement(): self.eventQueue.put(Signal('scan.start')) cmd = [ 'sudo', 'scanimage', '-d', 'epkowa', '--format', 'jpeg', - '--resolution=100', '-l','20','-t','30','-x',str(255), - '-y',str(185) + '--resolution=100', '-l','20','-t','30','-x',str(185), + '-y',str(245) ] self.logger.info(f"{cmd}") filename = self.currentHit.getImagePath() diff --git a/sorteerhoed/plotter.py b/sorteerhoed/plotter.py index 2b953b8..f9f4221 100644 --- a/sorteerhoed/plotter.py +++ b/sorteerhoed/plotter.py @@ -29,7 +29,7 @@ class Plotter: def park(self): self.logger.info("Queue to park plotter") self.goPark = True - self.q.put([(-1/2.54)/self.plotWidth,0,0]) + self.q.put([(1/2.54)/self.plotWidth + 1,0,0]) def start(self): try: @@ -95,7 +95,7 @@ class Plotter: self.logger.debug(f"Plot: {coordinates}") if self.ad: if len(coordinates) < 2: - self.info("Plot single point (park?)") + self.logger.info("Plot single point (park?)") self.ad.moveto(coordinates[0][0], coordinates[0][1]) else: self.ad.plan_trajectory(coordinates) @@ -129,6 +129,9 @@ class Plotter: try: # if no info comes in for .5sec, plot that segment segment = self.q.get(True, .5) + + if self.goPark: + print("seg",segment) # change of pen state? draw previous segments! if (segment[2] == 1 and not self.pen_down) or (segment[2] == 0 and self.pen_down) or len(segments) > 150: