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

Figure out intrinsics for hysteresis #2

Open
Keno opened this issue Aug 1, 2024 · 1 comment
Open

Figure out intrinsics for hysteresis #2

Keno opened this issue Aug 1, 2024 · 1 comment

Comments

@Keno
Copy link
Contributor

Keno commented Aug 1, 2024

The following was proposed:

p = finite_state(Bool)
p[]::Bool
event!(cond, dir=:both) do
     transition!(p, !p[])
end
@Keno
Copy link
Contributor Author

Keno commented Aug 2, 2024

Thinking about this some more, I don't think I like the callback versions, so maybe:

p = discvar(Bool)
transition!(cond, :both, p, !p)

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

1 participant