Commit 0c156128 authored by Joel Collins's avatar Joel Collins
Browse files

Minor formatting changes

parent 7ad1e750
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -107,7 +107,7 @@ class Microscope(object):
            logging.info("Attached dummy stage.")
        # If stage object has a lock
        if hasattr(self.stage, 'lock'):
            logging.info("Attaching {} to composite lock.".format(self.stage.lock))
            logging.info("Attaching lock {} to composite lock.".format(self.stage.lock))
            # Add the lock to the microscope composite lock
            self.lock.locks.append(self.stage.lock)

+1 −3
Original line number Diff line number Diff line
@@ -50,10 +50,8 @@ class Plugin(MicroscopePlugin):
        print("Starting a long-running task...")
        n_array = []

        #print("Acquiring camera and stage locks...")
        #with self.microscope.camera.lock, self.microscope.stage.lock:
        print("Acquiring composite microscope lock...")
        with self.microscope.lock:
        with self.microscope.camera.lock, self.microscope.stage.lock:
            for _ in range(t_run):
                n_array.append(random.random())
                time.sleep(1)