diff --git a/sorteerhoed/central_management.py b/sorteerhoed/central_management.py index 85ca129..5712476 100644 --- a/sorteerhoed/central_management.py +++ b/sorteerhoed/central_management.py @@ -300,13 +300,16 @@ class CentralManagement(): """ 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 = [ 'sudo', 'scanimage', '-d', 'epkowa', '--format', 'jpeg', '--resolution=100', '-l','20','-t','30','-x',str(self.config['scanner']['height']), '-y',str(self.config['scanner']['width']) ] + self.logger.info(f"{cmd}") filename = self.currentHit.getImagePath() proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) # opens connection to scanner, but only starts scanning when output becomes ready: diff --git a/sorteerhoed/plotter.py b/sorteerhoed/plotter.py index 03ea3ce..748a659 100644 --- a/sorteerhoed/plotter.py +++ b/sorteerhoed/plotter.py @@ -86,7 +86,7 @@ class Plotter: continue coordinates.append(coordinate) - self.logger.info(f"Plot: {coordinates}") + self.logger.debug(f"Plot: {coordinates}") if self.ad: self.ad.plan_trajectory(coordinates) # self.ad.moveto(move[0]* plotterWidth, move[1]*plotterHeight)