From 17e5725e08c70dd05dd4db631a058aee7f567918 Mon Sep 17 00:00:00 2001 From: Amanda Ghassaei <amandaghassaei@gmail.com> Date: Wed, 25 Mar 2015 22:50:44 -0400 Subject: [PATCH] edit to feed commands --- js/cam/GCodeExporter.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/js/cam/GCodeExporter.js b/js/cam/GCodeExporter.js index 3b51438d..0b0a696c 100644 --- a/js/cam/GCodeExporter.js +++ b/js/cam/GCodeExporter.js @@ -3,7 +3,7 @@ */ function GCodeExporter() { - //keep track of speeds for G94's + //keep track of speeds for F commands this.postSpeed = null; this.animationSpeed = null; } @@ -40,7 +40,7 @@ GCodeExporter.prototype.addComment = function(comment){ }; GCodeExporter.prototype._setSpeed = function(speed){ - return "G94 "+ speed + "\n"; + return "F"+ speed + "\n"; } //GCodeExporter.prototype._rapidXYZ = function(x, y, z){ @@ -103,8 +103,8 @@ GCodeExporter.prototype.simulate = function(line, machine, wcs, callback){ machine.releaseStock(line.substr(1,line.length-2)); return callback(); } - if (line.substr(0,3) == "G94" ){//speed - this.animationSpeed = line.split(" ")[1]; + if (line[0] == "F"){//speed + this.animationSpeed = line.split("F")[1]; return callback(); } if (line == "" || line[0] == "(" || line.substr(0,3) != "G01"){ -- GitLab