Skip to content

Commit

Permalink
0.0.10
Browse files Browse the repository at this point in the history
fix cancel command, #4
  • Loading branch information
jneilliii committed Feb 12, 2024
1 parent ef969d3 commit 9eb8b0d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions octoprint_bambu_printer/virtual.py
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ def _gcode_M25(self, data: str) -> bool:

def _gcode_M524(self, data: str) -> bool:
if self._sdCardReady:
self._cancelSdPrint()
return self._cancelSdPrint()
return False

def _gcode_M26(self, data: str) -> bool:
Expand Down Expand Up @@ -699,12 +699,14 @@ def _pauseSdPrint(self):
else:
self._logger.info("print pause failed")

def _cancelSdPrint(self):
def _cancelSdPrint(self) -> bool:
if self.bambu.connected:
if self.bambu.publish(commands.STOP):
self._logger.info("print cancelled")
return True
else:
self._logger.info("print cancel failed")
return False

def _setSdPos(self, pos):
self._newSdFilePos = pos
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
plugin_name = "OctoPrint-BambuPrinter"

# The plugin's version. Can be overwritten within OctoPrint's internal data via __plugin_version__ in the plugin module
plugin_version = "0.0.9"
plugin_version = "0.0.10"

# The plugin's description. Can be overwritten within OctoPrint's internal data via __plugin_description__ in the plugin
# module
Expand Down

0 comments on commit 9eb8b0d

Please sign in to comment.