QEI Library error "too many arguments to function call, expected single argument 'func', have 2 arguments"

Hello I am working on quadrature encoder and I am currently using QEI library from @aberk (QEI - Quadrature encoder interface library. | Mbed). I was wondering if it is only me or anyone else who is havinng issue where compiler is giving error at line 155 & 156 of QEI.cpp stating that ‘too .many arguments to function call, expected single argument ‘func’, have 2 arguments’.

Please help me with any suggestions. I am using Mbed Studio IDE with mbed-os 6.6.0.

Thanks,

1 Like

Hi,

that library is old more than 10 years without an update

try to change this

  channelA_.rise(this, &QEI::encode);

to this

  channelA_.rise(callback(this, &QEI::encode));

BR, Jan

1 Like

That worked. I am new to MbedOS and its semantics. Thanks for the help.