Merge pull request #5336 from jimzim111/Path_Post_MachineCommands
Path: Grbl_post: Allow controller-specific/non-standard gcode commands
This commit is contained in:
@@ -31,6 +31,7 @@ import argparse
|
||||
import datetime
|
||||
import shlex
|
||||
import PathScripts.PathUtil as PathUtil
|
||||
import regex
|
||||
|
||||
|
||||
TOOLTIP = """
|
||||
@@ -578,6 +579,12 @@ def parse(pathobj):
|
||||
if len(outstring) >= 1:
|
||||
out += linenumber() + format_outstring(outstring) + "\n"
|
||||
|
||||
# Check for comments containing machine-specific commands to pass literally to the controller
|
||||
m = regex.match(r'^\(MC_RUN_COMMAND: ([^)]+)\)$', command)
|
||||
if m:
|
||||
raw_command = m.group(1)
|
||||
out += linenumber() + raw_command + "\n"
|
||||
|
||||
return out
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user