Skip to content

Commit fe94feb

Browse files
committed
Fix typo in M104M109 regex. Add support for fifth toolhead
1 parent 128f55b commit fe94feb

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/mfm/printing_classes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ def __init__(self, index=-1, replacementColorIndex=-1, humanColor=None):
148148
PrintColor(0, -1, 'Base Color'),
149149
PrintColor(1, -1, 'River Color'),
150150
PrintColor(2, -1, 'Isoline Color'),
151-
PrintColor(3, -1, 'High Elevation Color')
151+
PrintColor(3, -1, 'High Elevation Color'),
152+
PrintColor(4, -1, 'Misc Color')
152153
]
153154
"""All loaded tools (colors)"""
154155

src/mfm/printing_constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
M620 = '^M620 S(\d*)A'
6262
TOOLCHANGE_T = '^\s*T(?!255$|1000|1100$)(\d+)' # Do not match T255,T1000,T1100 which are nonstandard by Bambu. We do not change tabbed T commands. There is a bug where the file pointer will jump to the beginning. This regex needs to handle whitespace in beginning to get the initial AMS toolchange
6363
TOOL_T = 'T(?!255$|1000|1100$)(\d+)' # Tool parameter. Check if line begins with ;(comment) or (M104/M109) beforehand.
64-
M104M109 = '^M10[49].*;cooldown$' # M104 or M109 tagged as ;cooldown
64+
M104M109 = '^M10[49]' # M104 or M109 tagged as ;cooldown
6565
M104M109_COOLDOWN = '^M10[49].*;cooldown$' # M104 or M109 tagged as ;cooldown
6666
M621 = '^M621 S(\d*)A'
6767
EXTRA_PURGE_INSERTION = '; EXTRA_PURGE_INSERTION'

0 commit comments

Comments
 (0)