Add error code

reviewed with @IanLalonde
This commit is contained in:
Marc-Antoine Lafreniere
2019-04-04 11:02:51 -04:00
parent 8ddd03d847
commit 4867ccb626

View File

@@ -68,6 +68,8 @@ def sendWithAck(gcodeCommand, timeoutCom):
raise RuntimeError('Command not executed')
if received.startswith('-1'):
raise RuntimeError('Command error')
if received.startswith('-2'):
raise RuntimeError('Device error, please reset the device')
else:
break