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 45566 #887

Merged
merged 2 commits into from
Aug 7, 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
2 changes: 2 additions & 0 deletions doc/news/interface_changes/DM-45566.mthexapod.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Remove the MTHexapod_logevent_controllerState.offlineSubstate and add the MTHexapod_logevent_configuration.drivesEnabled.
Remove the OfflineSubstate enum in MTHexapod and MTRotator.
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
ControllerState_Enabled=2,
ControllerState_Offline=3,
ControllerState_Fault=4
</Enumeration>
<Enumeration>
OfflineSubstate_PublishOnly=0,
OfflineSubstate_Available=1
</Enumeration>
<Enumeration>
EnabledSubstate_Stationary=0,
Expand Down Expand Up @@ -255,6 +251,13 @@
<Units>um/s2</Units>
<Count>1</Count>
</item>
<item>
<EFDB_Name>drivesEnabled</EFDB_Name>
<Description>Drives are enabled or not.</Description>
<IDL_Type>boolean</IDL_Type>
<Units>unitless</Units>
<Count>1</Count>
</item>
</SALEvent>
<SALEvent>
<Subsystem>MTHexapod</Subsystem>
Expand All @@ -279,13 +282,6 @@
<Units>unitless</Units>
<Count>1</Count>
</item>
<item>
<EFDB_Name>offlineSubstate</EFDB_Name>
<Description>Substate in OFFLINE mode, an OfflineSubstate enumeration value.</Description>
<IDL_Type>long</IDL_Type>
<Units>unitless</Units>
<Count>1</Count>
</item>
<item>
<EFDB_Name>enabledSubstate</EFDB_Name>
<Description>Substate in ENABLED mode, an EnabledSubstate enumeration value.</Description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
ControllerState_Enabled=2,
ControllerState_Offline=3,
ControllerState_Fault=4
</Enumeration>
<Enumeration>
OfflineSubstate_PublishOnly=0,
OfflineSubstate_Available=1
</Enumeration>
<Enumeration>
EnabledSubstate_Stationary=0,
Expand Down
5 changes: 2 additions & 3 deletions python/lsst/ts/xml/enums/MTHexapod.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,15 @@
"ApplicationStatus",
"ControllerState",
"EnabledSubstate",
"OfflineSubstate",
"SalIndex",
"ErrorCode",
]

import enum

# MTHexapod and MTRotator have the same enum values for
# ControllerState, OfflineSubstate, and EnabledSubstate.
from .MTRotator import ControllerState, EnabledSubstate, OfflineSubstate
# ControllerState and EnabledSubstate.
from .MTRotator import ControllerState, EnabledSubstate


class ApplicationStatus(enum.IntFlag):
Expand Down
31 changes: 7 additions & 24 deletions python/lsst/ts/xml/enums/MTRotator.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

__all__ = [
"ControllerState",
"OfflineSubstate",
"EnabledSubstate",
"FaultSubstate",
"ApplicationStatus",
Expand All @@ -42,28 +41,12 @@ class ControllerState(enum.IntEnum):
"""

STANDBY = 0
DISABLED = enum.auto() # Deprecated in rotator
DISABLED = enum.auto() # Deprecated in rotator/hexapod
ENABLED = enum.auto()
OFFLINE = enum.auto() # Deprecated in rotator
OFFLINE = enum.auto() # Deprecated in rotator/hexapod
FAULT = enum.auto()


class OfflineSubstate(enum.IntEnum):
"""Controller substate for the OFFLINE state.

Value reported in ``telemetry.offline_substate``.

This is enum ``OfflineSubStates`` in Moog code.

Deprecated in the rotator.

TODO: Remove this after simplifying the state machine in hexapod, DM-39787.
"""

PUBLISH_ONLY = 0
AVAILABLE = enum.auto()


class EnabledSubstate(enum.IntEnum):
"""Controller substate for the ENABLED state.

Expand All @@ -74,11 +57,11 @@ class EnabledSubstate(enum.IntEnum):

STATIONARY = 0
MOVING_POINT_TO_POINT = enum.auto()
SLEWING_OR_TRACKING = enum.auto()
CONTROLLED_STOPPING = enum.auto()
INITIALIZING = enum.auto() # Deprecated in rotator
RELATIVE = enum.auto() # Deprecated in rotator
CONSTANT_VELOCITY = enum.auto()
SLEWING_OR_TRACKING = enum.auto() # hexapod does not have this
CONTROLLED_STOPPING = enum.auto() # hexapod does not have this
INITIALIZING = enum.auto() # Deprecated in rotator/hexapod
RELATIVE = enum.auto() # Deprecated in rotator/hexapod
CONSTANT_VELOCITY = enum.auto() # hexapod does not have this


class FaultSubstate(enum.IntEnum):
Expand Down
Loading