Revert "removed debugging output handling"
This reverts commit 3f61ebc29e.
This commit is contained in:
parent
29a85fec96
commit
5ecc0a1e90
1 changed files with 21 additions and 21 deletions
|
|
@ -978,32 +978,32 @@ class MachineCom(object):
|
|||
# if line.strip() is not "":
|
||||
# self._timeout = get_new_timeout("communication")
|
||||
|
||||
# ##~~ debugging output handling
|
||||
# if line.startswith("//"):
|
||||
# debugging_output = line[2:].strip()
|
||||
# if debugging_output.startswith("action:"):
|
||||
# action_command = debugging_output[len("action:"):].strip()
|
||||
#
|
||||
# if action_command == "pause":
|
||||
# self._log("Pausing on request of the printer...")
|
||||
# self.setPause(True)
|
||||
# elif action_command == "resume":
|
||||
# self._log("Resuming on request of the printer...")
|
||||
# self.setPause(False)
|
||||
# elif action_command == "disconnect":
|
||||
# self._log("Disconnecting on request of the printer...")
|
||||
# self._callback.on_comm_force_disconnect()
|
||||
# else:
|
||||
# for hook in self._printer_action_hooks:
|
||||
# self._printer_action_hooks[hook](self, line, action_command)
|
||||
# else:
|
||||
# continue
|
||||
##~~ debugging output handling
|
||||
if line.startswith("//"):
|
||||
debugging_output = line[2:].strip()
|
||||
if debugging_output.startswith("action:"):
|
||||
action_command = debugging_output[len("action:"):].strip()
|
||||
|
||||
if action_command == "pause":
|
||||
self._log("Pausing on request of the printer...")
|
||||
self.setPause(True)
|
||||
elif action_command == "resume":
|
||||
self._log("Resuming on request of the printer...")
|
||||
self.setPause(False)
|
||||
elif action_command == "disconnect":
|
||||
self._log("Disconnecting on request of the printer...")
|
||||
self._callback.on_comm_force_disconnect()
|
||||
else:
|
||||
for hook in self._printer_action_hooks:
|
||||
self._printer_action_hooks[hook](self, line, action_command)
|
||||
else:
|
||||
continue
|
||||
|
||||
##~~ Error handling
|
||||
#line = self._handleErrors(line)
|
||||
|
||||
# GRBL Position update
|
||||
if self._grbl:
|
||||
if self._grbl :
|
||||
if(self._state == self.STATE_HOMING and 'ok' in line):
|
||||
self._changeState(self.STATE_OPERATIONAL)
|
||||
self._onHomingDone();
|
||||
|
|
|
|||
Loading…
Reference in a new issue