Skip to content

Commit

Permalink
Fix extruder calculation with G2/G3 (#67)
Browse files Browse the repository at this point in the history
* Fix extruder calculation with G2/G3

* Update odometer.py
  • Loading branch information
ldursw authored Jun 4, 2021
1 parent 42a3f69 commit 4e271a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion octoprint_filamentmanager/newodometer.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def processGCodeLine(self, line):
T = self._getCodeInt(line, "T")

if G is not None:
if G == 0 or G == 1: # Move
if G >= 0 and G <= 3: # Move G0/G1/G2/G3
x = self._getCodeFloat(line, "X")
y = self._getCodeFloat(line, "Y")
z = self._getCodeFloat(line, "Z")
Expand Down
2 changes: 1 addition & 1 deletion octoprint_filamentmanager/odometer.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def parse(self, gcode, cmd):
if gcode is None:
return

if gcode == "G1" or gcode == "G0": # move
if gcode in ("G0", "G1", "G2", "G3"): # move
e = self._get_float(cmd, self.regexE)
if e is not None:
if self.relativeMode or self.relativeExtrusion:
Expand Down

0 comments on commit 4e271a3

Please sign in to comment.