Open pfabri opened 7 years ago
For now there is no support for callback parameters. But it is in my TODO list :)
If std library can be used it would be possible. Bind()
function is your friend. I do not know it it is possible with Arduino, with esp8266 it is. Look at this code https://gist.github.com/gmag11/bd3f845c3eba2543df04d6de93f0474f
It is not exactly what you need but maybe you get what I mean.
Thanks for this really neat & useful library, one thing though I noticed it has a little typo that causes a compile time error.
typedef std::function<void(void)> tscallback_t;
should be typedef std::function<void(void*)> tscallback_t;
missing * on the param part.
@janmir thanks for notice e945e55190e3aee905cb1e8484687d1092877301 fix
In other words, must the callback function
f
be of the formf(void)
or can it have arguments?Many thanks for your help, neat library!