Merge pull request #12013 from TheSFReader/CNCParser

CNC GCode dialect compatibility improvements
This commit is contained in:
Scott Lahteine 2018-10-06 00:32:58 -05:00 committed by GitHub
commit 68bb75c847
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
64 changed files with 592 additions and 40 deletions

View file

@ -1594,6 +1594,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1594,6 +1594,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1601,6 +1601,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1596,6 +1596,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1595,6 +1595,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1597,6 +1597,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1598,6 +1598,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1601,6 +1601,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1606,6 +1606,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1595,6 +1595,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1595,6 +1595,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1595,6 +1595,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1595,6 +1595,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1595,6 +1595,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1595,6 +1595,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1595,6 +1595,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1595,6 +1595,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1593,6 +1593,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -1594,6 +1594,13 @@
*/ */
#define FASTER_GCODE_PARSER #define FASTER_GCODE_PARSER
/**
* CNC G-code options
* Support CNC-style G-code dialects used by laser cutters, drawing machine cams, etc.
*/
//#define PAREN_COMMENTS // Support for parentheses-delimited comments
//#define GCODE_MOTION_MODES // Remember the motion mode (G0 G1 G2 G3 G5 G38.X) and apply for X Y Z E F, etc.
/** /**
* User-defined menu items that execute custom GCode * User-defined menu items that execute custom GCode
*/ */

View file

@ -263,6 +263,10 @@ void GcodeSuite::process_parsed_command(
break; break;
#endif #endif
#if ENABLED(GCODE_MOTION_MODES)
case 80: G80(); break; // G80: Reset the current motion mode
#endif
case 90: relative_mode = false; break; // G90: Relative Mode case 90: relative_mode = false; break; // G90: Relative Mode
case 91: relative_mode = true; break; // G91: Absolute Mode case 91: relative_mode = true; break; // G91: Absolute Mode

View file

@ -65,6 +65,7 @@
* G33 - Delta Auto-Calibration (Requires DELTA_AUTO_CALIBRATION) * G33 - Delta Auto-Calibration (Requires DELTA_AUTO_CALIBRATION)
* G38 - Probe in any direction using the Z_MIN_PROBE (Requires G38_PROBE_TARGET) * G38 - Probe in any direction using the Z_MIN_PROBE (Requires G38_PROBE_TARGET)
* G42 - Coordinated move to a mesh point (Requires MESH_BED_LEVELING, AUTO_BED_LEVELING_BLINEAR, or AUTO_BED_LEVELING_UBL) * G42 - Coordinated move to a mesh point (Requires MESH_BED_LEVELING, AUTO_BED_LEVELING_BLINEAR, or AUTO_BED_LEVELING_UBL)
* G80 - Cancel current motion mode (Requires GCODE_MOTION_MODES)
* G90 - Use Absolute Coordinates * G90 - Use Absolute Coordinates
* G91 - Use Relative Coordinates * G91 - Use Relative Coordinates
* G92 - Set current position to coordinates given * G92 - Set current position to coordinates given
@ -428,6 +429,10 @@ private:
static void G59(); static void G59();
#endif #endif
#if ENABLED(GCODE_MOTION_MODES)
static void G80();
#endif
static void G92(); static void G92();
#if HAS_RESUME_CONTINUE #if HAS_RESUME_CONTINUE

View file

@ -153,5 +153,19 @@ void GcodeSuite::M115() {
#endif #endif
); );
// PAREN_COMMENTS
cap_line(PSTR("PAREN_COMMENTS")
#if ENABLED(PAREN_COMMENTS)
, true
#endif
);
// MOTION_MODES (M80-M89)
cap_line(PSTR("MOTION_MODES")
#if ENABLED(GCODE_MOTION_MODES)
, true
#endif
);
#endif // EXTENDED_CAPABILITIES_REPORT #endif // EXTENDED_CAPABILITIES_REPORT
} }

View file

@ -0,0 +1,36 @@
/**
* Marlin 3D Printer Firmware
* Copyright (C) 2016 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "../../inc/MarlinConfigPre.h"
#if ENABLED(GCODE_MOTION_MODES)
/**
* G80: Cancel current motion mode
*/
void GcodeSuite::G80() {
parser.cancel_motion_mode();
}
#endif // GCODE_MOTION_MODES

View file

@ -50,10 +50,18 @@ char *GCodeParser::command_ptr,
*GCodeParser::value_ptr; *GCodeParser::value_ptr;
char GCodeParser::command_letter; char GCodeParser::command_letter;
int GCodeParser::codenum; int GCodeParser::codenum;
#if USE_GCODE_SUBCODES #if USE_GCODE_SUBCODES
uint8_t GCodeParser::subcode; uint8_t GCodeParser::subcode;
#endif #endif
#if ENABLED(GCODE_MOTION_MODES)
int16_t GCodeParser::motion_mode_codenum = -1;
#if USE_GCODE_SUBCODES
uint8_t GCodeParser::motion_mode_subcode;
#endif
#endif
#if ENABLED(FASTER_GCODE_PARSER) #if ENABLED(FASTER_GCODE_PARSER)
// Optimized Parameters // Optimized Parameters
uint32_t GCodeParser::codebits; // found bits uint32_t GCodeParser::codebits; // found bits
@ -117,8 +125,19 @@ void GCodeParser::parse(char *p) {
starpos[1] = '\0'; starpos[1] = '\0';
} }
#if ENABLED(GCODE_MOTION_MODES)
#if ENABLED(ARC_SUPPORT)
#define GTOP 3
#else
#define GTOP 1
#endif
#endif
// Bail if the letter is not G, M, or T // Bail if the letter is not G, M, or T
switch (letter) { case 'G': case 'M': case 'T': break; default: return; } // (or a valid parameter for the current motion mode)
switch (letter) {
case 'G': case 'M': case 'T':
// Skip spaces to get the numeric part // Skip spaces to get the numeric part
while (*p == ' ') p++; while (*p == ' ') p++;
@ -132,9 +151,7 @@ void GCodeParser::parse(char *p) {
// Get the code number - integer digits only // Get the code number - integer digits only
codenum = 0; codenum = 0;
do { do { codenum *= 10, codenum += *p++ - '0'; } while (NUMERIC(*p));
codenum *= 10, codenum += *p++ - '0';
} while (NUMERIC(*p));
// Allow for decimal point in command // Allow for decimal point in command
#if USE_GCODE_SUBCODES #if USE_GCODE_SUBCODES
@ -148,6 +165,43 @@ void GCodeParser::parse(char *p) {
// Skip all spaces to get to the first argument, or nul // Skip all spaces to get to the first argument, or nul
while (*p == ' ') p++; while (*p == ' ') p++;
#if ENABLED(GCODE_MOTION_MODES)
if (letter == 'G' && (codenum <= GTOP || codenum == 5
#if ENABLED(G38_PROBE_TARGET)
|| codenum == 38
#endif
)
) {
motion_mode_codenum = codenum;
#if USE_GCODE_SUBCODES
motion_mode_subcode = subcode;
#endif
}
#endif
break;
#if ENABLED(GCODE_MOTION_MODES)
#if ENABLED(ARC_SUPPORT)
case 'I': case 'J': case 'R':
if (motion_mode_codenum != 2 && motion_mode_codenum != 3) return;
#endif
case 'P': case 'Q':
if (motion_mode_codenum != 5) return;
case 'X': case 'Y': case 'Z': case 'E': case 'F':
if (motion_mode_codenum < 0) return;
command_letter = 'G';
codenum = motion_mode_codenum;
#if USE_GCODE_SUBCODES
subcode = motion_mode_subcode;
#endif
p--; // Back up one character to use the current parameter
break;
#endif // GCODE_MOTION_MODES
default: return;
}
// The command parameters (if any) start here, for sure! // The command parameters (if any) start here, for sure!
#if DISABLED(FASTER_GCODE_PARSER) #if DISABLED(FASTER_GCODE_PARSER)

View file

@ -76,14 +76,21 @@ public:
// Command line state // Command line state
static char *command_ptr, // The command, so it can be echoed static char *command_ptr, // The command, so it can be echoed
*string_arg; // string of command line *string_arg, // string of command line
command_letter; // G, M, or T
static char command_letter; // G, M, or T
static int codenum; // 123 static int codenum; // 123
#if USE_GCODE_SUBCODES #if USE_GCODE_SUBCODES
static uint8_t subcode; // .1 static uint8_t subcode; // .1
#endif #endif
#if ENABLED(GCODE_MOTION_MODES)
static int16_t motion_mode_codenum;
#if USE_GCODE_SUBCODES
static uint8_t motion_mode_subcode;
#endif
FORCE_INLINE static void cancel_motion_mode() { motion_mode_codenum = -1; }
#endif
#if ENABLED(DEBUG_GCODE_PARSER) #if ENABLED(DEBUG_GCODE_PARSER)
static void debug(); static void debug();
#endif #endif

View file

@ -282,7 +282,11 @@ static int read_serial(const int index) {
*/ */
inline void get_serial_commands() { inline void get_serial_commands() {
static char serial_line_buffer[NUM_SERIAL][MAX_CMD_SIZE]; static char serial_line_buffer[NUM_SERIAL][MAX_CMD_SIZE];
static bool serial_comment_mode[NUM_SERIAL] = { false }; static bool serial_comment_mode[NUM_SERIAL] = { false }
#if ENABLED(PAREN_COMMENTS)
, serial_comment_paren_mode[NUM_SERIAL] = { false }
#endif
;
// If the command buffer is empty for too long, // If the command buffer is empty for too long,
// send "wait" to indicate Marlin is still waiting. // send "wait" to indicate Marlin is still waiting.
@ -310,7 +314,11 @@ inline void get_serial_commands() {
*/ */
if (serial_char == '\n' || serial_char == '\r') { if (serial_char == '\n' || serial_char == '\r') {
serial_comment_mode[i] = false; // end of line == end of comment // Start with comment mode off
serial_comment_mode[i] = false;
#if ENABLED(PAREN_COMMENTS)
serial_comment_paren_mode[i] = false;
#endif
// Skip empty lines and comments // Skip empty lines and comments
if (!serial_count[i]) { thermalManager.manage_heater(); continue; } if (!serial_count[i]) { thermalManager.manage_heater(); continue; }
@ -404,12 +412,24 @@ inline void get_serial_commands() {
} }
else if (serial_char == '\\') { // Handle escapes else if (serial_char == '\\') { // Handle escapes
// if we have one more character, copy it over // if we have one more character, copy it over
if ((c = read_serial(i)) >= 0 && !serial_comment_mode[i]) if ((c = read_serial(i)) >= 0 && !serial_comment_mode[i]
#if ENABLED(PAREN_COMMENTS)
&& !serial_comment_paren_mode[i]
#endif
)
serial_line_buffer[i][serial_count[i]++] = (char)c; serial_line_buffer[i][serial_count[i]++] = (char)c;
} }
else { // it's not a newline, carriage return or escape char else { // it's not a newline, carriage return or escape char
if (serial_char == ';') serial_comment_mode[i] = true; if (serial_char == ';') serial_comment_mode[i] = true;
if (!serial_comment_mode[i]) serial_line_buffer[i][serial_count[i]++] = serial_char; #if ENABLED(PAREN_COMMENTS)
else if (serial_char == '(') serial_comment_paren_mode[i] = true;
else if (serial_char == ')') serial_comment_paren_mode[i] = false;
#endif
else if (!serial_comment_mode[i]
#if ENABLED(PAREN_COMMENTS)
&& ! serial_comment_paren_mode[i]
#endif
) serial_line_buffer[i][serial_count[i]++] = serial_char;
} }
} // for NUM_SERIAL } // for NUM_SERIAL
} // queue has space, serial has data } // queue has space, serial has data
@ -424,7 +444,11 @@ inline void get_serial_commands() {
*/ */
inline void get_sdcard_commands() { inline void get_sdcard_commands() {
static bool stop_buffering = false, static bool stop_buffering = false,
sd_comment_mode = false; sd_comment_mode = false
#if ENABLED(PAREN_COMMENTS)
, sd_comment_paren_mode = false
#endif
;
if (!IS_SD_PRINTING) return; if (!IS_SD_PRINTING) return;
@ -445,7 +469,11 @@ inline void get_serial_commands() {
card_eof = card.eof(); card_eof = card.eof();
if (card_eof || n == -1 if (card_eof || n == -1
|| sd_char == '\n' || sd_char == '\r' || sd_char == '\n' || sd_char == '\r'
|| ((sd_char == '#' || sd_char == ':') && !sd_comment_mode) || ((sd_char == '#' || sd_char == ':') && !sd_comment_mode
#if ENABLED(PAREN_COMMENTS)
&& !sd_comment_paren_mode
#endif
)
) { ) {
if (card_eof) { if (card_eof) {
@ -481,6 +509,9 @@ inline void get_serial_commands() {
if (sd_char == '#') stop_buffering = true; if (sd_char == '#') stop_buffering = true;
sd_comment_mode = false; // for new command sd_comment_mode = false; // for new command
#if ENABLED(PAREN_COMMENTS)
sd_comment_paren_mode = false;
#endif
// Skip empty lines and comments // Skip empty lines and comments
if (!sd_count) { thermalManager.manage_heater(); continue; } if (!sd_count) { thermalManager.manage_heater(); continue; }
@ -498,7 +529,15 @@ inline void get_serial_commands() {
} }
else { else {
if (sd_char == ';') sd_comment_mode = true; if (sd_char == ';') sd_comment_mode = true;
if (!sd_comment_mode) command_queue[cmd_queue_index_w][sd_count++] = sd_char; #if ENABLED(PAREN_COMMENTS)
else if (sd_char == '(') sd_comment_paren_mode = true;
else if (sd_char == ')') sd_comment_paren_mode = false;
#endif
else if (!sd_comment_mode
#if ENABLED(PAREN_COMMENTS)
&& ! sd_comment_paren_mode
#endif
) command_queue[cmd_queue_index_w][sd_count++] = sd_char;
} }
} }
} }

View file

@ -5,8 +5,9 @@ set -e
restore_configs restore_configs
opt_set MOTHERBOARD BOARD_STM32F1R opt_set MOTHERBOARD BOARD_STM32F1R
opt_enable EEPROM_SETTINGS EEPROM_CHITCHAT REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT opt_enable EEPROM_SETTINGS EEPROM_CHITCHAT REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT \
exec_test $1 $2 "STM32F1R EEPROM_SETTINGS EEPROM_CHITCHAT REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT" PAREN_COMMENTS GCODE_MOTION_MODES
exec_test $1 $2 "STM32F1R EEPROM_SETTINGS EEPROM_CHITCHAT REPRAP_DISCOUNT_SMART_CONTROLLER SDSUPPORT PAREN_COMMENTS GCODE_MOTION_MODES"
opt_enable SPINDLE_LASER_ENABLE opt_enable SPINDLE_LASER_ENABLE
exec_test $1 $2 "STM32F1R SPINDLE_LASER_ENABLE" exec_test $1 $2 "STM32F1R SPINDLE_LASER_ENABLE"