Skip to content

Commit

Permalink
Merge pull request #1 from Azelphur/master
Browse files Browse the repository at this point in the history
Rewrite M18/M84 as they cause the printer to crash too.
  • Loading branch information
foosel authored Apr 15, 2020
2 parents 74bb47e + 3398eac commit 4b0f318
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions octoprint_fixcbdfirmware/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ def rewrite_sending(self, comm_instance, phase, cmd, cmd_type, gcode, subcode=No
# firmware chokes on N parameters with M110, fix that
self._log_replacement(cmd, "M110")
return "M110"
elif gcode == "G28":
# firmware chokes on X, Y & probably Z parameter on G28, rewrite to X0, Y0, Z0
elif gcode in ["G28", "M18", "M84"]:
# firmware chokes on X, Y & probably Z parameter, rewrite to X0, Y0, Z0
rewritten = self.REGEX_XYZ0.sub("\g<axis>0 ", cmd).strip()
self._log_replacement(cmd, rewritten)
return rewritten
Expand Down

0 comments on commit 4b0f318

Please sign in to comment.