Skip to content

Commit

Permalink
Merge pull request #19515 from EmJay276/PR_GCodeReader_relative_extru…
Browse files Browse the repository at this point in the history
…sion

PlugIn GCodeReader - Process M82 and M83 command for Marlin flavoured GCode
  • Loading branch information
HellAholic authored Dec 17, 2024
2 parents 0efa90a + 3136dfc commit e11d0db
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
10 changes: 8 additions & 2 deletions plugins/GCodeReader/FlavorParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,8 +298,14 @@ def processTCode(self, global_stack, T: int, line: str, position: Position, path
position.e.extend([0] * (self._extruder_number - len(position.e) + 1))
return position

def processMCode(self, M: int, line: str, position: Position, path: List[List[Union[float, int]]]) -> Position:
pass
def processMCode(self, M: int, line: str, position: Position, path: List[List[Union[float, int]]]) -> None:
# Set extrusion mode
if M == 82:
# Set absolute extrusion mode
self._is_absolute_extrusion = True
elif M == 83:
# Set relative extrusion mode
self._is_absolute_extrusion = False

_type_keyword = ";TYPE:"
_layer_keyword = ";LAYER:"
Expand Down
8 changes: 0 additions & 8 deletions plugins/GCodeReader/RepRapFlavorParser.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@ class RepRapFlavorParser(FlavorParser.FlavorParser):
def __init__(self):
super().__init__()

def processMCode(self, M, line, position, path):
if M == 82:
# Set absolute extrusion mode
self._is_absolute_extrusion = True
elif M == 83:
# Set relative extrusion mode
self._is_absolute_extrusion = False

def _gCode90(self, position, params, path):
"""Set the absolute positioning
Expand Down

0 comments on commit e11d0db

Please sign in to comment.