Skip to content

Commit

Permalink
Add "cancel" command in order to cancel print on Prusa Printers
Browse files Browse the repository at this point in the history
  • Loading branch information
bkerler committed Feb 17, 2024
1 parent 2b8f174 commit 33beca6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion printrun/pronsole.py
Original file line number Diff line number Diff line change
Expand Up @@ -1316,7 +1316,7 @@ def recvcb_actions(self, l):
command = command.split(":")
if len(command) == 2 and command[0] == "action":
command = command[1]
if command == "pause":
if command in ["pause", "cancel"]:
self.do_pause(None)
sys.stdout.write(self.promptf())
sys.stdout.flush()
Expand Down
2 changes: 1 addition & 1 deletion printrun/pronterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -2055,7 +2055,7 @@ def recvcb_actions(self, l):
if len(command) == 2 and command[0] == "action":
command = command[1]
self.log(_("Received command %s") % command)
if command == "pause":
if command in ["pause", "cancel"]:
if not self.paused:
wx.CallAfter(self.pause)
return True
Expand Down

0 comments on commit 33beca6

Please sign in to comment.