chiark / gitweb /
Add support for G29 and M203/M204/M400 gcodes in interpreter
authorYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Tue, 10 Feb 2015 20:41:25 +0000 (15:41 -0500)
committerYouness Alaoui <kakaroto@kakaroto.homelinux.net>
Tue, 10 Feb 2015 20:41:28 +0000 (15:41 -0500)
This prevents seeing "Unknown M code" error in stdout when switching
to layers view.
Fixes issue #85

Cura/util/gcodeInterpreter.py

index 95b42d751732fd9c6f450fe79e10499a94c59ca3..4e51ef33cd0254f108a941633f839ca869c08d85 100644 (file)
@@ -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: