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.
We used to be able to do stuff like this:
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.