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

Moved set_is_ready with deprecation warning to HardwareObject. #1000

Merged
merged 1 commit into from
Aug 27, 2024
Merged
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
10 changes: 10 additions & 0 deletions mxcubecore/BaseHardwareObjects.py
Original file line number Diff line number Diff line change
Expand Up @@ -778,6 +778,16 @@ def is_ready(self) -> bool:
"""
return self._ready_event.is_set()

def set_is_ready(self, value: bool):
warnings.warn(
"set_is_ready method ported from Device is Deprecated and will be removed",
DeprecationWarning,
)
if value:
self.update_state(HardwareObjectState.READY)
else:
self.update_state(HardwareObjectState.OFF)

def update_state(self, state: Optional[HardwareObjectState] = None) -> None:
"""Update self._state, and emit signal stateChanged if the state has changed.

Expand Down
Loading