Skip to content

Commit

Permalink
Moving the motor disable into the disconnect function. #26
Browse files Browse the repository at this point in the history
  • Loading branch information
madhephaestus committed May 13, 2016
1 parent e3dab2f commit bce4b95
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ public GcodeDevice(NRSerialPort serial){

@Override
public void disconnectDeviceImp() {
if(serial.isConnected())
runLine("M84");// Disable motors on exit
if(ins!=null){
try {
ins.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,19 @@ public void G1() {
else {
fail("No response");
}
response = device.runLine("G0 X100 Y100 Z100 E100 F12000");
response = device.runLine("G0 X100 Y100 Z100 E100 F22000");
if (response.length() > 0)
System.out.println("Gcode line run: " + response);
else {
fail("No response");
}
response = device.runLine("G0 X0 Y0 Z0 E0 F12000");
response = device.runLine("G0 X0 Y0 Z0 E0 F22000");
if (response.length() > 0)
System.out.println("Gcode line run: " + response);
else {
fail("No response");
}
device.runLine("M84");// Disable motors on exit

}
}

Expand Down

0 comments on commit bce4b95

Please sign in to comment.