APIs, concepts, guides, and more

◆ MCodeCallbackRegister()

void MCodeCallbackRegister ( uint32_t mCode,
Cartesian::GcodeCallback * callback,
bool containsMotion = false )
pure virtual

Preferred method for handling M-codes. Executes when the specified M-code is encountered. Otherwise, falls back to the catch-all handler.

Parameters
mCodeM-code number.
callbackPointer to a GcodeCallback. nullptr unregisters.
containsMotionTrue if the callback moves the robot.