chiark / gitweb /
Added G4 to GCode reader. Fixes #132
authorDaid <daid303@gmail.com>
Tue, 19 Jun 2012 19:57:16 +0000 (21:57 +0200)
committerDaid <daid303@gmail.com>
Tue, 19 Jun 2012 19:57:16 +0000 (21:57 +0200)
.gitignore
Cura/util/gcodeInterpreter.py

index 78b5a66955860da6d6fb681cac67a22902d7b405..2bd3ae3e634cefb57ad5c97a218751baa22c4d2a 100644 (file)
@@ -14,7 +14,6 @@ Cura/preferences.ini
 cura.sh
 pypy
 python
-drivers
 printrun.bat
 cura.bat
 object-mirror.png
index b71505058a484c402657329815665ddda3e3bbaa..2d92e9fc7f06da6c5573a6077bf40c570fa9d294 100644 (file)
@@ -158,6 +158,13 @@ class gcode(object):
                                        newPos = pos.copy()
                                        newPos.e = totalExtrusion
                                        currentPath.list.append(newPos)
+                               elif G == 4:    #Delay
+                                       S = self.getCodeFloat(line, 'S')
+                                       if S is not None:
+                                               totalMoveTimeMinute += S / 60
+                                       P = self.getCodeFloat(line, 'P')
+                                       if P is not None:
+                                               totalMoveTimeMinute += P / 60 / 1000
                                elif G == 20:   #Units are inches
                                        scale = 25.4
                                elif G == 21:   #Units are mm