Hi all.
I'm trying to use methodCallback inside my own library, like so:
#include <AikoCallback.h>
/* SNIP */
void Clock::set_aiko_callback(unsigned int period, unsigned int delay)
{
// Ugh. Coupling.
// Create a method callback
Aiko::EventHandler* handler =
static_cast<Aiko::EventHandler*>(malloc(sizeof(Aiko::EventHandler)));
handler->callback_ = Aiko::methodCallback(this, Clock::low_tick);
handler->period_ = period;
handler->countdown_ = delay;
events->addHandler(handler);
}
I am getting the following compiler error from Arduino:
/Users/jnh/Documents/Arduino/libraries/dCouple/Clock.cpp: In member
function 'void Clock::set_aiko_callback(unsigned int, unsigned int)':
/Users/jnh/Documents/Arduino/libraries/dCouple/Clock.cpp:21: error: no
matching function for call to 'methodCallback(Clock* const,
<unresolved overloaded function type>)'
Can anyone suggest that which I am doing wrong?
Thanks.
James Harton.
Sociable Limited,
http://sociable.co.nz/