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

falling() and rising() docs #4

Closed
hinxx opened this issue May 23, 2024 · 1 comment
Closed

falling() and rising() docs #4

hinxx opened this issue May 23, 2024 · 1 comment

Comments

@hinxx
Copy link
Contributor

hinxx commented May 23, 2024

The behavior of the fsmIO.falling() as documented is not matching what the code does:

return self._currcb == 'change' and self._pval is not None and self._value < self._pval

The fsmIO.falling() will be True as soon as the value of the PV is less than previous value, and not when value is 0 as per docs:

<dd class="field-odd"><p><code class="docutils literal notranslate"><span class="pre">True</span></code> if the input has just gone from not zero to 0. Best to use only with boolean values (binary PVs).</p>

FWIW, the comment in the code is correct.

Same applies to the docs of the fsmIO.rising().

@darcato
Copy link
Owner

darcato commented May 23, 2024

You are right, the documentation is correct only in the context of binary input or output PVs that have only 0 or 1 values. I would keep the method as-is but specify better its behaviour in the docs.

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

No branches or pull requests

2 participants