From 37d80e9a7b102648cd271b6dd58aae5f09a18024 Mon Sep 17 00:00:00 2001 From: wakonig_k Date: Wed, 22 May 2024 11:52:32 +0200 Subject: [PATCH] fix: added backward compatible fix --- csaxs_bec/scans/owis_grid.py | 8 ++++++++ csaxs_bec/scans/sgalil_grid.py | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/csaxs_bec/scans/owis_grid.py b/csaxs_bec/scans/owis_grid.py index 025cae9..9372309 100644 --- a/csaxs_bec/scans/owis_grid.py +++ b/csaxs_bec/scans/owis_grid.py @@ -308,3 +308,11 @@ class OwisGrid(AsyncFlyScanBase): yield from self.stubs.send_rpc_and_wait("samy", "velocity.put", self.high_velocity) yield from self.stubs.send_rpc_and_wait("samy", "acceleration.put", self.high_acc_time) super().finalize() + + def _move_scan_motors_and_wait(self, pos): + # TODO: remove this method once BEC MR 637 is merged + # pylint: disable=no-member + if hasattr(super(), "_move_scan_motors_and_wait"): + yield from super()._move_scan_motors_and_wait(pos) + else: + yield from self._move_and_wait(pos) diff --git a/csaxs_bec/scans/sgalil_grid.py b/csaxs_bec/scans/sgalil_grid.py index b646fdf..fe66b25 100644 --- a/csaxs_bec/scans/sgalil_grid.py +++ b/csaxs_bec/scans/sgalil_grid.py @@ -215,3 +215,11 @@ class SgalilGrid(AsyncFlyScanBase): # logger.info('Testing Scan abortion, would have raised here!') # except Exception as exc: # logger.info(f'{exc}') + + def _move_scan_motors_and_wait(self, pos): + # TODO: remove this method once BEC MR 637 is merged + # pylint: disable=no-member + if hasattr(super(), "_move_scan_motors_and_wait"): + yield from super()._move_scan_motors_and_wait(pos) + else: + yield from self._move_and_wait(pos)