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

fixed incorrect formatting of enum values on soft signal set #417

Merged
merged 1 commit into from
Jun 26, 2024

Conversation

evalott100
Copy link
Contributor

@evalott100 evalott100 commented Jun 26, 2024

Currently the code incorrectly formats enum put values into their string version on SoftSignalBackend leading to the following bug:

    soft_signal = SoftSignalBackend(MyEnum)
    await soft_signal.connect()
    assert (await soft_signal.get_value()) is MyEnum.a
    await soft_signal.put(MyEnum.b)
    # fails, the value is now the string form
    assert (await soft_signal.get_value()) is MyEnum.b
    

@DiamondJoseph This was the cause of the error in the tetramm tests DiamondLightSource/dodal#649

@evalott100 evalott100 merged commit ce3b85d into main Jun 26, 2024
22 checks passed
@evalott100 evalott100 deleted the fix-enum-conversion-bug-in-soft-signal-backend branch June 26, 2024 14:42
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.

Tetramm TriggerMode enum broken by ophyd-async update
2 participants