Skip to content

Commit

Permalink
fixup! In maintel/mtcs, override point_azel method to use move_p2p an…
Browse files Browse the repository at this point in the history
…d move_rotator methods.
  • Loading branch information
tribeiro committed Nov 21, 2024
1 parent bb613fc commit 4dca8eb
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions python/lsst/ts/observatory/control/maintel/mtcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 4dca8eb

Please sign in to comment.