From 4867ccb6265c054d0110a806edecece91a16f977 Mon Sep 17 00:00:00 2001 From: Marc-Antoine Lafreniere Date: Thu, 4 Apr 2019 11:02:51 -0400 Subject: [PATCH] Add error code reviewed with @IanLalonde --- arduinosender/CommunicationMain.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arduinosender/CommunicationMain.py b/arduinosender/CommunicationMain.py index bc4622d..c66ec2f 100644 --- a/arduinosender/CommunicationMain.py +++ b/arduinosender/CommunicationMain.py @@ -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