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

Event/Action #50

Open
dexterurbane opened this issue Aug 8, 2018 · 0 comments
Open

Event/Action #50

dexterurbane opened this issue Aug 8, 2018 · 0 comments

Comments

@dexterurbane
Copy link
Contributor

We used to be able to do stuff like this:

bus->voltageUpdated().addAction([&](){
    if (abs(bus->voltage()(0)) < threshold)
    appliance->setOn(false);});

With changes that occurred some time ago, this becomes harder. For example, the action currently needs an owner, or it will go out of scope and deregister from its event.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant