Skip to content
Snippets Groups Projects
Commit 17e5725e authored by Amanda Ghassaei's avatar Amanda Ghassaei
Browse files

edit to feed commands

parent d44b6b83
No related branches found
No related tags found
No related merge requests found
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
*/ */
function GCodeExporter() { function GCodeExporter() {
//keep track of speeds for G94's //keep track of speeds for F commands
this.postSpeed = null; this.postSpeed = null;
this.animationSpeed = null; this.animationSpeed = null;
} }
...@@ -40,7 +40,7 @@ GCodeExporter.prototype.addComment = function(comment){ ...@@ -40,7 +40,7 @@ GCodeExporter.prototype.addComment = function(comment){
}; };
GCodeExporter.prototype._setSpeed = function(speed){ GCodeExporter.prototype._setSpeed = function(speed){
return "G94 "+ speed + "\n"; return "F"+ speed + "\n";
} }
//GCodeExporter.prototype._rapidXYZ = function(x, y, z){ //GCodeExporter.prototype._rapidXYZ = function(x, y, z){
...@@ -103,8 +103,8 @@ GCodeExporter.prototype.simulate = function(line, machine, wcs, callback){ ...@@ -103,8 +103,8 @@ GCodeExporter.prototype.simulate = function(line, machine, wcs, callback){
machine.releaseStock(line.substr(1,line.length-2)); machine.releaseStock(line.substr(1,line.length-2));
return callback(); return callback();
} }
if (line.substr(0,3) == "G94" ){//speed if (line[0] == "F"){//speed
this.animationSpeed = line.split(" ")[1]; this.animationSpeed = line.split("F")[1];
return callback(); return callback();
} }
if (line == "" || line[0] == "(" || line.substr(0,3) != "G01"){ if (line == "" || line[0] == "(" || line.substr(0,3) != "G01"){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment