CAM: Multiline POSTAMBLE and PREAMBLE arguments in old postprocessors (#20715)

* CAM Multiline POSTAMBLE and PREAMBLE in old postprocessors

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* CAM: Fix preamble and postamble help text

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
tarman3
2025-04-10 13:05:48 +03:00
committed by GitHub
parent f869bace95
commit b91c5ef2af
15 changed files with 50 additions and 50 deletions

View File

@@ -56,11 +56,11 @@ parser.add_argument(
parser.add_argument("--precision", default="3", help="number of digits of precision, default=3")
parser.add_argument(
"--preamble",
help='set commands to be issued before the first command, default="G17\nG90"',
help='set commands to be issued before the first command, default="G17 G54 G40 G49 G80 G90"',
)
parser.add_argument(
"--postamble",
help='set commands to be issued after the last command, default="M05\nG17 G90\nM2"',
help='set commands to be issued after the last command, default="M05\\nG17 G54 G90 G80 G40\\nM2"',
)
parser.add_argument(
"--inches", action="store_true", help="Convert output for US imperial mode (G20)"
@@ -148,9 +148,9 @@ def processArguments(argstring):
print("Show editor = %d" % SHOW_EDITOR)
PRECISION = args.precision
if args.preamble is not None:
PREAMBLE = args.preamble
PREAMBLE = args.preamble.replace("\\n", "\n")
if args.postamble is not None:
POSTAMBLE = args.postamble
POSTAMBLE = args.postamble.replace("\\n", "\n")
if args.inches:
UNITS = "G20"
UNIT_SPEED_FORMAT = "in/min"