Loading openflexure_microscope/microscope.py +46 −46 Original line number Diff line number Diff line Loading @@ -153,7 +153,7 @@ class Microscope: Return: dict: Dictionary containing complete microscope state """ with self.lock: with self.lock(timeout=None): state = {"camera": self.camera.state, "stage": self.stage.state} return state Loading @@ -161,7 +161,7 @@ class Microscope: """ Applies a settings dictionary to the microscope. Missing parameters will be left untouched. """ with self.lock: with self.lock(timeout=None): logging.debug("Microscope: Applying settings: {}".format(settings)) # If attached to a camera Loading Loading @@ -199,8 +199,6 @@ class Microscope: This is to ensure that settings for currently disconnected hardware don't get removed from the settings file. """ with self.lock: settings_current = { "id": self.id, "name": self.name, Loading @@ -208,6 +206,7 @@ class Microscope: "extensions": self.extension_settings, } with self.lock(timeout=None): # If attached to a camera if self.camera: settings_current_camera = self.camera.read_settings() Loading Loading @@ -255,6 +254,7 @@ class Microscope: @property def configuration(self): with self.lock(timeout=None): initial_configuration = self.configuration_file.load() current_configuration = { Loading Loading
openflexure_microscope/microscope.py +46 −46 Original line number Diff line number Diff line Loading @@ -153,7 +153,7 @@ class Microscope: Return: dict: Dictionary containing complete microscope state """ with self.lock: with self.lock(timeout=None): state = {"camera": self.camera.state, "stage": self.stage.state} return state Loading @@ -161,7 +161,7 @@ class Microscope: """ Applies a settings dictionary to the microscope. Missing parameters will be left untouched. """ with self.lock: with self.lock(timeout=None): logging.debug("Microscope: Applying settings: {}".format(settings)) # If attached to a camera Loading Loading @@ -199,8 +199,6 @@ class Microscope: This is to ensure that settings for currently disconnected hardware don't get removed from the settings file. """ with self.lock: settings_current = { "id": self.id, "name": self.name, Loading @@ -208,6 +206,7 @@ class Microscope: "extensions": self.extension_settings, } with self.lock(timeout=None): # If attached to a camera if self.camera: settings_current_camera = self.camera.read_settings() Loading Loading @@ -255,6 +254,7 @@ class Microscope: @property def configuration(self): with self.lock(timeout=None): initial_configuration = self.configuration_file.load() current_configuration = { Loading