diff --git a/openflexure_microscope/api/v1/blueprints/stage.py b/openflexure_microscope/api/v1/blueprints/stage.py index 1b816150..a6a08d38 100644 --- a/openflexure_microscope/api/v1/blueprints/stage.py +++ b/openflexure_microscope/api/v1/blueprints/stage.py @@ -81,7 +81,9 @@ class PositionAPI(MicroscopeView): # Move if stage exists if self.microscope.stage: - self.microscope.stage.move_rel(position) + # Explicitally acquire lock + with self.microscope.stage.lock: + self.microscope.stage.move_rel(position) out = filter_dict(self.microscope.state, ('stage', 'position'))