aanpassing calibratie

This commit is contained in:
mt 2019-11-01 18:57:38 +01:00
parent 9b5b7bd924
commit 692f50b8a7
2 changed files with 7 additions and 4 deletions

View file

@ -312,8 +312,8 @@ class CentralManagement():
self.eventQueue.put(Signal('scan.start')) self.eventQueue.put(Signal('scan.start'))
cmd = [ cmd = [
'sudo', 'scanimage', '-d', 'epkowa', '--format', 'jpeg', 'sudo', 'scanimage', '-d', 'epkowa', '--format', 'jpeg',
'--resolution=100', '-l','20','-t','30','-x',str(255), '--resolution=100', '-l','20','-t','30','-x',str(185),
'-y',str(185) '-y',str(245)
] ]
self.logger.info(f"{cmd}") self.logger.info(f"{cmd}")
filename = self.currentHit.getImagePath() filename = self.currentHit.getImagePath()

View file

@ -29,7 +29,7 @@ class Plotter:
def park(self): def park(self):
self.logger.info("Queue to park plotter") self.logger.info("Queue to park plotter")
self.goPark = True 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): def start(self):
try: try:
@ -95,7 +95,7 @@ class Plotter:
self.logger.debug(f"Plot: {coordinates}") self.logger.debug(f"Plot: {coordinates}")
if self.ad: if self.ad:
if len(coordinates) < 2: 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]) self.ad.moveto(coordinates[0][0], coordinates[0][1])
else: else:
self.ad.plan_trajectory(coordinates) self.ad.plan_trajectory(coordinates)
@ -130,6 +130,9 @@ class Plotter:
# if no info comes in for .5sec, plot that segment # if no info comes in for .5sec, plot that segment
segment = self.q.get(True, .5) segment = self.q.get(True, .5)
if self.goPark:
print("seg",segment)
# change of pen state? draw previous segments! # 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: if (segment[2] == 1 and not self.pen_down) or (segment[2] == 0 and self.pen_down) or len(segments) > 150:
if len(segments): if len(segments):