Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tickets/dm 47890: Support Summit Observing Weeks 49-50 of 2024 #255

Merged
merged 4 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/news/DM-47890.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
In `auxtel/daytime_checkout/slew_and_take_image_checkout.py`, fix how TCS readiness is configured.
1 change: 1 addition & 0 deletions doc/news/DM-47890.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
In `maintel/m1m3/enable_m1m3_slew_controller_flags.py`, update `run_block`` method to use new `m1m3_in_engineering_mode`` context manager to enter/exit engineering mode when setting slew controller settings.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def __init__(self, index=1, add_remotes: bool = True):
# published to the efd.
self.atcs = ATCS(domain=self.domain, intended_usage=atcs_usage, log=self.log)

tcs_ready_to_take_data = self.atcs if add_remotes else None
tcs_ready_to_take_data = self.atcs.ready_to_take_data if add_remotes else None
self.latiss = LATISS(
domain=self.domain,
intended_usage=latiss_usage,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ async def configure(self, config):

async def run_block(self):

for flag, enable in zip(self.config.slew_flags, self.config.enable):
self.log.info(f"Setting m1m3 slew flag {flag.name} to {enable}.")
await self.mtcs.set_m1m3_slew_controller_settings(flag, enable)
async with self.mtcs.m1m3_in_engineering_mode():
for flag, enable in zip(self.config.slew_flags, self.config.enable):
self.log.info(f"Setting m1m3 slew flag {flag.name} to {enable}.")
await self.mtcs.set_m1m3_slew_controller_settings(flag, enable)
7 changes: 7 additions & 0 deletions tests/test_maintel_m1m3_enable_m1m3_controller_flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,16 @@ async def basic_make_script(self, index):
self.script.mtcs = unittest.mock.AsyncMock()
self.script.mtcs.start_task = utils.make_done_future()
self.script.mtcs.set_m1m3_slew_controller_settings = unittest.mock.AsyncMock()
self.script.mtcs.configure_mock(
m1m3_in_engineering_mode=self.mock_m1m3_in_engineering_mode
)

return (self.script,)

@contextlib.asynccontextmanager
async def mock_m1m3_in_engineering_mode(self):
yield

@contextlib.asynccontextmanager
async def make_dry_script(self):
async with self.make_script():
Expand Down
Loading