Skip to content

Commit

Permalink
In maintel/mtcs.py, implement the ready_to_offset context man…
Browse files Browse the repository at this point in the history
…ager to enable/disable the m1m3 slew flag.
  • Loading branch information
tribeiro committed Dec 11, 2024
1 parent 276a634 commit 6415881
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions python/lsst/ts/observatory/control/maintel/mtcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -2724,6 +2724,16 @@ async def m1m3_booster_valve(self) -> typing.AsyncIterator[None]:
await self.wait_m1m3_settle()
await self.close_m1m3_booster_valve()

@contextlib.asynccontextmanager
async def ready_to_offset(self) -> typing.AsyncIterator[None]:
"""Make sure telescope is ready to perform an offset.
Overrides the parent class to implement setting/unsetting
the slew flag on m1m3.
"""
async with self.m1m3_booster_valve():
yield

async def wait_m1m3_settle(self) -> None:
"""Wait until m1m3 has settle."""
# For now this method will only sleep for m1m3_settle_time.
Expand Down

0 comments on commit 6415881

Please sign in to comment.