Added gcode in/out logging possibility
This commit is contained in:
parent
cfe89d7c63
commit
b07cfbeede
|
@ -411,6 +411,7 @@ class GCodeIO:
|
|||
# Read input, separate by newline, and add to pending_commands
|
||||
try:
|
||||
data = str(os.read(self.fd, 4096).decode())
|
||||
#logging.info("KLP:in: '"+data+"'")
|
||||
except (os.error, UnicodeDecodeError):
|
||||
logging.exception("Read g-code")
|
||||
return
|
||||
|
@ -455,6 +456,7 @@ class GCodeIO:
|
|||
self._process_data)
|
||||
def _respond_raw(self, msg):
|
||||
if self.pipe_is_active:
|
||||
#logging.info("KLP:out: '"+msg+"\n"+"'")
|
||||
try:
|
||||
os.write(self.fd, (msg+"\n").encode())
|
||||
except os.error:
|
||||
|
|
Loading…
Reference in New Issue