State saved/restored when a macro runs
-
Does anyone know if the details of what state (if any) is saved and restored when a macro is executed is documented anywhere? I've had a quick look but couldn't find anything.
-
@gloomyandy it's these variables from GCodeMachineState:
float feedRate; uint32_t selectedPlane : 2, drivesRelative : 1, axesRelative : 1, volumetricExtrusion : 1, g53Active : 1, // true if seen G53 on this line of GCode usingInches : 1, // true if units are inches not mm macroRestartable : 1, // true if the current macro has used M98 R1 to say that it can be interrupted and restarted ; Compatibility compatibility; // which firmware we are emulating uint8_t commandedQueueNumber; // the queue number that was most recently commanded on this channel
-
@dc42 Thanks David, do any of the "special" macros (like tool change, filament etc.) save/restore anything extra?
-
@gloomyandy no, the only special thing about system macros (apart form being invoked automatically) is that they ignore workplace coordinate offsets.