Logger changes

This commit is contained in:
Ruben van de Ven 2019-10-31 15:49:12 +01:00
parent 83a8bd3158
commit 33f253cbc2
2 changed files with 5 additions and 2 deletions

View file

@ -300,13 +300,16 @@ class CentralManagement():
""" """
Run scanimage on scaner and returns a string with the filename Run scanimage on scaner and returns a string with the filename
""" """
self.eventQueue.put(Signal('scan.start')) if self.isScanning.is_set():
raise Exception("Already scanning!")
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(self.config['scanner']['height']), '--resolution=100', '-l','20','-t','30','-x',str(self.config['scanner']['height']),
'-y',str(self.config['scanner']['width']) '-y',str(self.config['scanner']['width'])
] ]
self.logger.info(f"{cmd}")
filename = self.currentHit.getImagePath() filename = self.currentHit.getImagePath()
proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
# opens connection to scanner, but only starts scanning when output becomes ready: # opens connection to scanner, but only starts scanning when output becomes ready:

View file

@ -86,7 +86,7 @@ class Plotter:
continue continue
coordinates.append(coordinate) coordinates.append(coordinate)
self.logger.info(f"Plot: {coordinates}") self.logger.debug(f"Plot: {coordinates}")
if self.ad: if self.ad:
self.ad.plan_trajectory(coordinates) self.ad.plan_trajectory(coordinates)
# self.ad.moveto(move[0]* plotterWidth, move[1]*plotterHeight) # self.ad.moveto(move[0]* plotterWidth, move[1]*plotterHeight)