mirror of
https://github.com/euphy/polargraphcontroller
synced 2025-01-09 19:55:16 +01:00
And next remove debugging code
remove debugging code
This commit is contained in:
parent
3909dee0a7
commit
3bf418fa93
@ -1349,9 +1349,6 @@ RShape loadShapeFromGCodeFile(String filename) {
|
|||||||
|
|
||||||
Float x = ins.get("X");
|
Float x = ins.get("X");
|
||||||
Float y = ins.get("Y");
|
Float y = ins.get("Y");
|
||||||
|
|
||||||
println("X: " + x + " Y: "+ y);
|
|
||||||
|
|
||||||
if (x != null && y == null) {
|
if (x != null && y == null) {
|
||||||
// move x axis only, use y of last
|
// move x axis only, use y of last
|
||||||
RPoint[][] points = parent.getPointsInPaths();
|
RPoint[][] points = parent.getPointsInPaths();
|
||||||
@ -1453,16 +1450,16 @@ Map<String, Float> unpackGCodeInstruction(String line) throws Exception {
|
|||||||
splitted[i] = splitted[i].replace(";", "");
|
splitted[i] = splitted[i].replace(";", "");
|
||||||
String axis = splitted[i].substring(0, 1);
|
String axis = splitted[i].substring(0, 1);
|
||||||
Float value = Float.parseFloat(splitted[i].substring(1));
|
Float value = Float.parseFloat(splitted[i].substring(1));
|
||||||
|
|
||||||
if ("X".equalsIgnoreCase(axis) || "Y".equalsIgnoreCase(axis) || "Z".equalsIgnoreCase(axis) || "G".equalsIgnoreCase(axis)) {
|
if ("X".equalsIgnoreCase(axis) || "Y".equalsIgnoreCase(axis) || "Z".equalsIgnoreCase(axis) || "G".equalsIgnoreCase(axis)) {
|
||||||
instruction.put(axis, value);
|
instruction.put(axis, value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
println("instruction: " + instruction);
|
// println("instruction: " + instruction);
|
||||||
if (instruction.isEmpty()) {
|
if (instruction.isEmpty()) {
|
||||||
throw new Exception();
|
throw new Exception();
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
}
|
||||||
|
catch (Exception e) {
|
||||||
throw new Exception("Exception while reading the lines from a gcode file: " + line + ", " + e.getMessage());
|
throw new Exception("Exception while reading the lines from a gcode file: " + line + ", " + e.getMessage());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user