machinekit/machinekit — pull request #165 by mhaberler (2014-04-28 12:21:08+00:00)
Title: motion: add motion.current-motion pin.

This reflects the current motion type:

#define EMC_MOTION_TYPE_TRAVERSE 1
#define EMC_MOTION_TYPE_FEED 2
#define EMC_MOTION_TYPE_ARC 3
#define EMC_MOTION_TYPE_TOOLCHANGE 4
#define EMC_MOTION_TYPE_PROBING 5
#define EMC_MOTION_TYPE_INDEXROTARY 6

In a paused state or when not currently executing a motion, the pin is
set to zero.

See also the thread on https://groups.google.com/forum/#!topic/machinekit/HaBUZZyrsyE - this might be useful for extruder-type and lasercutter printers where some tool-related action can be tied to the current motion mode (eg laser off during rapids)