CAM: Enabled coolant in the refactored_grbl post, with test

This commit is contained in:
Lawrence Woestman
2025-03-26 14:50:36 -07:00
committed by Benjamin Nauck
parent 4631e11230
commit 1dddbb2aa5
2 changed files with 20 additions and 0 deletions

View File

@@ -332,3 +332,22 @@ M2
result = gcode.splitlines()[15]
expected = "(comment)"
self.assertEqual(result, expected)
def test100(self):
"""
Test if coolant is enabled.
"""
nl = "\n"
c = Path.Command("M7")
c1 = Path.Command("M8")
c2 = Path.Command("M9")
self.profile_op.Path = Path.Path([c, c1, c2])
self.job.PostProcessorArgs = "--no-header --no-show-editor"
gcode = self.post.export()[0][1]
# print(f"--------{nl}{gcode}--------{nl}")
self.assertEqual(gcode.splitlines()[15], "M7")
self.assertEqual(gcode.splitlines()[16], "M8")
self.assertEqual(gcode.splitlines()[17], "M9")

View File

@@ -75,6 +75,7 @@ class Refactored_Grbl(PostProcessor):
# Set any values here that need to override the default values set
# in the parent routine.
#
values["ENABLE_COOLANT"] = True
#
# If this is set to True, then commands that are placed in
# comments that look like (MC_RUN_COMMAND: blah) will be output.