Skip to content

Commit

Permalink
Grbl: Change to CRLF line ending for better compatibility
Browse files Browse the repository at this point in the history
Grbl accepts any kind of line ending.
The FludNC fork of Grbl only accepts CRLF and LF.

t-oster/VisiCut#734 (comment)
  • Loading branch information
mgmax committed Nov 13, 2024
1 parent 1de68f3 commit ebe72ea
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/main/java/de/thomas_oster/liblasercut/drivers/Grbl.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ public class Grbl extends GenericGcodeDriver
public Grbl()
{
//set some grbl-specific defaults
setLineend("CR");
// Line ending
// Grbl accepts CR, CRLF and LF.
// FluidNC accepts CRLF and LF.
// So we use CRLF for best compatibility.
setLineend("CRLF");
setIdentificationLine("Grbl");
// Grbl uses "ok" flow control
setWaitForOKafterEachLine(true);
Expand Down
77 changes: 76 additions & 1 deletion test-output/de.thomas_oster.liblasercut.drivers.Grbl.out
Original file line number Diff line number Diff line change
@@ -1 +1,76 @@
G21G90M3G0X0.508000Y0.508000S0G1X25.4Y50.8S1000F1200G1X50.8Y0G0X101.600000Y0.000000S0G1X76.2Y5.08S1000F1200G1X76.1492Y20.32G1X76.1492Y22.86G1X76.0984Y25.4G1X76.1492Y30.48G1X76.2Y45.72G1X101.6Y50.8G0X0.000000Y1.879600S0G1X0.6604Y1.8796S0F1200G1X0.762Y1.8796S1000G1X0.8636Y1.8796G1X0.9144Y1.8796G1X1.0668Y1.8796G1X1.1176Y1.8796G1X6.096Y1.8796S0G0X0.000000Y1.930400S0G1X0.6604Y1.9304S0F1200G1X0.8128Y1.9304S1000G1X0.8636Y1.9304G1X0.9652Y1.9304G1X1.0668Y1.9304G1X1.1176Y1.9304G1X6.096Y1.9304S0G0X0.000000Y1.981200S0G1X0.6604Y1.9812S0F1200G1X1.1176Y1.9812S1000G1X6.096Y1.9812S0G0X0.000000Y2.032000S0G1X0.6604Y2.032S0F1200G1X0.762Y2.032S1000G1X1.1176Y2.032G1X6.096Y2.032S0G0X0.000000Y2.082800S0G1X0.6604Y2.0828S0F1200G1X1.1176Y2.0828S1000G1X6.096Y2.0828S0G0X0.000000Y2.133600S0G1X0.6604Y2.1336S0F1200G1X0.762Y2.1336S1000G1X1.1176Y2.1336G1X6.096Y2.1336S0G0X0.000000Y3.911600S0G1X2.2352Y3.9116S0F1200G1X2.3368Y3.9116S1000G1X2.3876Y3.9116S0G1X2.54Y3.9116S1000G1X7.5184Y3.9116S0G0X0.000000Y3.962400S0G1X2.286Y3.9624S0F1200G1X2.3368Y3.9624S1000G1X2.4384Y3.9624S0G1X2.54Y3.9624S1000G1X7.5184Y3.9624S0G0X0.000000Y4.013200S0G1X2.1336Y4.0132S0F1200G1X2.1844Y4.0132S750G1X2.2352Y4.0132S0G1X2.5908Y4.0132S750G1X7.5692Y4.0132S0G0X0.000000Y4.064000S0G1X2.2352Y4.064S0F1200G1X2.5908Y4.064S500G1X7.5692Y4.064S0G0X0.000000Y4.165600S0G1X2.1336Y4.1656S0F1200G1X2.2352Y4.1656S1000G1X7.2136Y4.1656S0M5G0X0Y0
G21
G90
M3
G0X0.508000Y0.508000S0
G1X25.4Y50.8S1000F1200
G1X50.8Y0
G0X101.600000Y0.000000S0
G1X76.2Y5.08S1000F1200
G1X76.1492Y20.32
G1X76.1492Y22.86
G1X76.0984Y25.4
G1X76.1492Y30.48
G1X76.2Y45.72
G1X101.6Y50.8
G0X0.000000Y1.879600S0
G1X0.6604Y1.8796S0F1200
G1X0.762Y1.8796S1000
G1X0.8636Y1.8796
G1X0.9144Y1.8796
G1X1.0668Y1.8796
G1X1.1176Y1.8796
G1X6.096Y1.8796S0
G0X0.000000Y1.930400S0
G1X0.6604Y1.9304S0F1200
G1X0.8128Y1.9304S1000
G1X0.8636Y1.9304
G1X0.9652Y1.9304
G1X1.0668Y1.9304
G1X1.1176Y1.9304
G1X6.096Y1.9304S0
G0X0.000000Y1.981200S0
G1X0.6604Y1.9812S0F1200
G1X1.1176Y1.9812S1000
G1X6.096Y1.9812S0
G0X0.000000Y2.032000S0
G1X0.6604Y2.032S0F1200
G1X0.762Y2.032S1000
G1X1.1176Y2.032
G1X6.096Y2.032S0
G0X0.000000Y2.082800S0
G1X0.6604Y2.0828S0F1200
G1X1.1176Y2.0828S1000
G1X6.096Y2.0828S0
G0X0.000000Y2.133600S0
G1X0.6604Y2.1336S0F1200
G1X0.762Y2.1336S1000
G1X1.1176Y2.1336
G1X6.096Y2.1336S0
G0X0.000000Y3.911600S0
G1X2.2352Y3.9116S0F1200
G1X2.3368Y3.9116S1000
G1X2.3876Y3.9116S0
G1X2.54Y3.9116S1000
G1X7.5184Y3.9116S0
G0X0.000000Y3.962400S0
G1X2.286Y3.9624S0F1200
G1X2.3368Y3.9624S1000
G1X2.4384Y3.9624S0
G1X2.54Y3.9624S1000
G1X7.5184Y3.9624S0
G0X0.000000Y4.013200S0
G1X2.1336Y4.0132S0F1200
G1X2.1844Y4.0132S750
G1X2.2352Y4.0132S0
G1X2.5908Y4.0132S750
G1X7.5692Y4.0132S0
G0X0.000000Y4.064000S0
G1X2.2352Y4.064S0F1200
G1X2.5908Y4.064S500
G1X7.5692Y4.064S0
G0X0.000000Y4.165600S0
G1X2.1336Y4.1656S0F1200
G1X2.2352Y4.1656S1000
G1X7.2136Y4.1656S0
M5
G0X0Y0

0 comments on commit ebe72ea

Please sign in to comment.