From 0419c071718a6ed0a8a99b73631de903cde66698 Mon Sep 17 00:00:00 2001 From: Youness Alaoui Date: Tue, 10 Feb 2015 15:41:25 -0500 Subject: [PATCH] Add support for G29 and M203/M204/M400 gcodes in interpreter This prevents seeing "Unknown M code" error in stdout when switching to layers view. Fixes issue #85 --- Cura/util/gcodeInterpreter.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Cura/util/gcodeInterpreter.py b/Cura/util/gcodeInterpreter.py index 95b42d75..4e51ef33 100644 --- a/Cura/util/gcodeInterpreter.py +++ b/Cura/util/gcodeInterpreter.py @@ -210,6 +210,8 @@ class gcode(object): pos[1] = center[1] if z is not None: pos[2] = center[2] + elif G == 29: #Probe Z + pos[2] = 0.0 elif G == 90: #Absolute position posAbs = True elif G == 91: #Relative position @@ -276,6 +278,12 @@ class gcode(object): pass elif M == 190: #Set bed temperature & wait pass + elif M == 203: #Set maximum feedrate + pass + elif M == 204: #Set default acceleration + pass + elif M == 400: #Wait for current moves to finish + pass elif M == 221: #Extrude amount multiplier s = getCodeFloat(line, 'S') if s is not None: -- 2.30.2