-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #877 from lsst-ts/tickets/DM-45062
Add ErrorCode enum to LinearStage
- Loading branch information
Showing
3 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add ErrorCode enum. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,30 @@ | ||
__all__ = ["DetailedState"] | ||
__all__ = ["DetailedState", "ErrorCode"] | ||
|
||
import enum | ||
|
||
|
||
class DetailedState(enum.IntEnum): | ||
NOTMOVINGSTATE = 1 | ||
MOVINGSTATE = 2 | ||
|
||
|
||
class ErrorCode(enum.IntEnum): | ||
"""Error codes that indicate why the CSC went to fault state.""" | ||
|
||
CONNECTION_FAILED = 1 | ||
"""Connection to the device failed.""" | ||
DISABLE_MOTOR = 2 | ||
"""Disabling the motor failed.""" | ||
ENABLE_MOTOR = 3 | ||
"""Enabling the motor failed.""" | ||
HOME = 4 | ||
"""Homing the stage failed.""" | ||
MOVE_ABSOLUTE = 5 | ||
"""The absolute move failed.""" | ||
MOVE_RELATIVE = 6 | ||
"""The relative move failed.""" | ||
POSITION = 7 | ||
"""Failed to get the position.""" | ||
TELEMETRY = 8 | ||
"""The telemetry loop failed.""" | ||
STOP = 9 |