removed debugging output handling

This commit is contained in:
make-ing 2015-10-01 11:53:20 +02:00
parent 9f1c277777
commit 3f61ebc29e

View file

@ -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();