diff --git a/plugins/GCodeReader/FlavorParser.py b/plugins/GCodeReader/FlavorParser.py index 372ee831356..74dbeadec09 100644 --- a/plugins/GCodeReader/FlavorParser.py +++ b/plugins/GCodeReader/FlavorParser.py @@ -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:" diff --git a/plugins/GCodeReader/RepRapFlavorParser.py b/plugins/GCodeReader/RepRapFlavorParser.py index 10b7b785876..1a80412238e 100644 --- a/plugins/GCodeReader/RepRapFlavorParser.py +++ b/plugins/GCodeReader/RepRapFlavorParser.py @@ -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