From 4dca8eb8ae036d7e0f8943cafee07f0c9bd4041f Mon Sep 17 00:00:00 2001 From: Tiago Ribeiro Date: Wed, 20 Nov 2024 23:40:24 -0700 Subject: [PATCH] fixup! In maintel/mtcs, override point_azel method to use move_p2p and move_rotator methods. --- .../lsst/ts/observatory/control/maintel/mtcs.py | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/python/lsst/ts/observatory/control/maintel/mtcs.py b/python/lsst/ts/observatory/control/maintel/mtcs.py index 10450915..aeb46798 100644 --- a/python/lsst/ts/observatory/control/maintel/mtcs.py +++ b/python/lsst/ts/observatory/control/maintel/mtcs.py @@ -377,17 +377,11 @@ async def point_azel( getattr(self.rem, comp).evt_summaryState.flush() move_tasks.append(asyncio.create_task(self.check_component_state(comp))) - try: - for task in asyncio.as_completed(move_tasks): - await task - if move_tasks[0].done() and move_tasks[1].done(): - self.log.info("Telescope and rotator in position.") - break - finally: - for task in move_tasks: - if not task.done(): - self.log.debug("Cancelling task...") - task.cancel() + for task in asyncio.as_completed(move_tasks): + await task + if move_tasks[0].done() and move_tasks[1].done(): + self.log.info("Telescope and rotator in position.") + break async def wait_for_inposition( self,