From 5fa30e4145a804174052120a848a052c2163f373 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Sun, 10 May 2015 00:36:09 +0200 Subject: [PATCH] Ignore feed rates of 0, those don't make sense anyhow Fixes #887 --- src/octoprint/util/gcodeInterpreter.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/octoprint/util/gcodeInterpreter.py b/src/octoprint/util/gcodeInterpreter.py index 45f41c7a..4261abef 100644 --- a/src/octoprint/util/gcodeInterpreter.py +++ b/src/octoprint/util/gcodeInterpreter.py @@ -55,6 +55,9 @@ class gcode(object): scale = 1.0 posAbs = True feedRateXY = min(printer_profile["axes"]["x"]["speed"], printer_profile["axes"]["y"]["speed"]) + if feedRateXY == 0: + # some somewhat sane default if axes speeds are insane... + feedRateXY = 2000 offsets = printer_profile["extruder"]["offsets"] for line in gcodeFile: @@ -128,7 +131,7 @@ class gcode(object): pos[1] += y * scale if z is not None: pos[2] += z * scale - if f is not None: + if f is not None and f != 0: feedRateXY = f moveType = 'move'