I'm having an issue trying to use a normal non-member function of my main sketch file as a callback. I can't get the function pointer to invoke from a function other than it was saved. More info below;
typedef void (*cb)(int16_t,int16_t); class MotorEncoder ... private: cb _motor_callback;
cb encoder_cb = NULL; ... encoder_cb = function_that_accepts_2_int16 DC_Encoder_1.move(motor_pos, speed, motor_id, encoder_cb);
EDIT: I want to edit the description as to not confuse anyone. The code with the callbacks above is all correct. The issue was I was working with open-source software and another developer was setting the selected serial-port connection back to the bluetooth channel in-correctly. The callback was executed, I was connected to the ATMega2560 via serial connection to a raspberry pi and was looking for the callback to show there, not monitoring bluetooth so I didn't see any data come across. Document your code.