ieatacid / OctoPrint-TerminalCommands

Lets you add custom command buttons to the terminal tab
12 stars 5 forks source link

Allow mixing of Python and GCode in macros #8

Closed jackbradach closed 6 years ago

jackbradach commented 6 years ago

Terminal macros are awesome; I've made buttons for most of my jankity-ass printer's preflight steps making a reset much quicker. I had a couple more areas I could automate with them, but I need variables to do so. For example, I have a couple "Nudge Z" buttons that I use to fine tune the offset between my extruder and BLTouch. I'd like to have a "Store Z Offset," but that'd require something like:

$z_offset = M92; M851 Z $z_offset

...which of course wouldn't work with pure GCode. Have you considered adding the ability to call a Python function? That'd also provide some interesting use cases, like reacting to feedback from the printer during a macro.

ieatacid commented 6 years ago

Have you looked at Custom Control Editor? It supports Parameterized GCODE Script.

jackbradach commented 6 years ago

I have not, but that looks pretty snazzy. Thanks!