Skip to content

Commit

Permalink
Improve gcode handling e.g. add G29 to long running list
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathias Dietz committed Feb 23, 2016
1 parent c910389 commit d14a7e3
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 2 additions & 2 deletions GCodeInfo/src/de/dietzm/gcodes/GCodeAbstract.java
Expand Up @@ -181,7 +181,7 @@ protected String toStringRaw() {
@Override
public boolean isBuffered() {
//if(gcode==null) return false;
if (Constants.GCDEF.G0.equals(gcode) || Constants.GCDEF.G1.equals(gcode) || Constants.GCDEF.G2.equals(gcode) || Constants.GCDEF.M106.equals(gcode) || Constants.GCDEF.M107.equals(gcode) ||Constants.GCDEF.G29.equals(gcode) || Constants.GCDEF.G30.equals(gcode) || Constants.GCDEF.G31.equals(gcode) || Constants.GCDEF.G32.equals(gcode)){
if (Constants.GCDEF.G0.equals(gcode) || Constants.GCDEF.G1.equals(gcode) || Constants.GCDEF.G2.equals(gcode) || Constants.GCDEF.M106.equals(gcode) || Constants.GCDEF.M107.equals(gcode) || Constants.GCDEF.G30.equals(gcode) || Constants.GCDEF.G31.equals(gcode) || Constants.GCDEF.G32.equals(gcode)){
return true;
}
return false;
Expand All @@ -192,7 +192,7 @@ public boolean isBuffered() {
*/
@Override
public boolean isLongRunning() {
if (Constants.GCDEF.M190.equals(gcode) || Constants.GCDEF.M109.equals(gcode) || Constants.GCDEF.G28.equals(gcode) || Constants.GCDEF.M29.equals(gcode) ){
if (Constants.GCDEF.M190.equals(gcode) || Constants.GCDEF.M109.equals(gcode) || Constants.GCDEF.G28.equals(gcode) || Constants.GCDEF.G29.equals(gcode) || Constants.GCDEF.M29.equals(gcode) ){
return true;
}
return false;
Expand Down
5 changes: 5 additions & 0 deletions GCodeInfo/src/de/dietzm/gcodes/GCodeFactory.java
Expand Up @@ -237,15 +237,20 @@ public GCode parseGcode(String arg0,int linenr) {

switch (tmpgcode) {
case G0:
case G00:
case G1:
case G01:
gcd=fillGcodeFields(segments, codelinevar,linenr,tmpgcode);
break;
case G2:
case G3:
case G02:
case G03:
gcd=fillGcodeFields(segments, codelinevar,linenr,tmpgcode);
System.err.println("Experimental support of Gcode G2/G3.");
break;
case G4: //Dwell
case G04: //Dwell
//TODO add to duration
gcd=createDefaultGCode(codelinevar, linenr, tmpgcode);
break;
Expand Down
4 changes: 3 additions & 1 deletion GCodeInfo/src/de/dietzm/gcodes/GCodeMemSave.java
Expand Up @@ -174,7 +174,9 @@ public float getX() {
}
@Override
public float getIx() {
if(ext==null) return 0;
if(ext==null){
return 0;
}
return ext.ix;
}

Expand Down

0 comments on commit d14a7e3

Please sign in to comment.