mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-04 11:14:21 +08:00
Process M82 and M83 command for Marlin flavoured GCode too
This commit is contained in:
parent
e3287a1c16
commit
3136dfc0ec
@ -298,8 +298,14 @@ class FlavorParser:
|
|||||||
position.e.extend([0] * (self._extruder_number - len(position.e) + 1))
|
position.e.extend([0] * (self._extruder_number - len(position.e) + 1))
|
||||||
return position
|
return position
|
||||||
|
|
||||||
def processMCode(self, M: int, line: str, position: Position, path: List[List[Union[float, int]]]) -> Position:
|
def processMCode(self, M: int, line: str, position: Position, path: List[List[Union[float, int]]]) -> None:
|
||||||
pass
|
# 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:"
|
_type_keyword = ";TYPE:"
|
||||||
_layer_keyword = ";LAYER:"
|
_layer_keyword = ";LAYER:"
|
||||||
|
@ -11,14 +11,6 @@ class RepRapFlavorParser(FlavorParser.FlavorParser):
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
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):
|
def _gCode90(self, position, params, path):
|
||||||
"""Set the absolute positioning
|
"""Set the absolute positioning
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user