diff --git a/src/ephys_link/__about__.py b/src/ephys_link/__about__.py index b19ee4b..ba51ced 100644 --- a/src/ephys_link/__about__.py +++ b/src/ephys_link/__about__.py @@ -1 +1 @@ -__version__ = "2.2.1" +__version__ = "2.2.2" diff --git a/src/ephys_link/bindings/mpm_binding.py b/src/ephys_link/bindings/mpm_binding.py index 677381d..23bbaa0 100644 --- a/src/ephys_link/bindings/mpm_binding.py +++ b/src/ephys_link/bindings/mpm_binding.py @@ -206,6 +206,7 @@ async def set_depth(self, manipulator_id: str, depth: float, speed: float) -> fl # Keep track of the previous depth to check if the manipulator stopped advancing unexpectedly. current_depth = (await self.get_position(manipulator_id)).w previous_depth = current_depth + depth = self.get_dimensions().w - depth unchanged_counter = 0 # Send move request. @@ -244,7 +245,7 @@ async def set_depth(self, manipulator_id: str, depth: float, speed: float) -> fl self._movement_stopped = False # Return the final depth. - return float((await self.get_position(manipulator_id)).w) + return float(self.get_dimensions().w - (await self.get_position(manipulator_id)).w) @override async def stop(self, manipulator_id: str) -> None: