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'))
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()

View File

@ -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: