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

Conversation

marcus-oscarsson
Copy link
Member

@marcus-oscarsson marcus-oscarsson commented Aug 27, 2024

The Device object defines three methods in addition to those defined on HardwareObject.

  • is_ready - Also defined on HardwareObject
  • set_is_ready - Only defined on Device
  • userName - Previously refactored to name() (there are no reference to userName() in the code base)

Some objects that inherited Device where using the method called set_is_ready taking a boolean with the "ready state". set_is_ready was moved to HardwareObject, with a deprecation warning. The logic of set_is_ready was translated to internally work with the states defined in HardwareObjectState (still taking a boolean argument)
The semantics of is_ready and set_is_ready should thus be compatible with that originally defined on Device.

I will leave it up to each site to replace set_is_ready with the corresponding call to self.update_state(HardwareObjectState.READY) and then depending on the situation self.update_state(HardwareObjectState.BUSY|OFF). The set_is_ready method defined on HardwareObject uses HardwareObjectState.OFF.

Closes #1372

@marcus-oscarsson marcus-oscarsson merged commit 8e17c4b into develop Aug 27, 2024
9 checks passed
@marcus-oscarsson marcus-oscarsson deleted the mo-fix-set-is-ready branch August 27, 2024 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants