diff --git a/grbl/config.h b/grbl/config.h index 2d6cb7c..6efb761 100644 --- a/grbl/config.h +++ b/grbl/config.h @@ -156,11 +156,18 @@ // NOTE: Will eventually be added to Grbl settings in v1.0. // #define INVERT_CONTROL_PIN // Default disabled. Uncomment to enable. -// Enable input pin states feedback in status reports. The data is presented as a binary value with -// the bits in the appropriate input pin ports being 0(low) or 1(high). Useful for setting up a new -// CNC machine, but do not recommend keeping this option by default, as it will consume CPU resources -// with little to no benefit during normal operation. -// #define REPORT_INPUT_PIN_STATES // Default disabled. Uncomment to enable. +// Enable limit pin states feedback in status reports. The data is presented as 0 (low) or 1(high), +// where the order is XYZ. For example, if the Y- and Z-limit pins are active, Grbl will include the +// following string in the status report "Lim:011". This is generally useful for setting up a new +// CNC machine, but we do not recommend keeping this option enabled, as it will consume CPU resources +// with little to no benefit during normal operation and it may not be supported by most GUIs. +// #define REPORT_LIMIT_PIN_STATE // Default disabled. Uncomment to enable. + +// Enable control pin states feedback in status reports. The data is presented as simple binary of +// the control pin port (0 (low) or 1(high)), masked to show only the input pins. Non-control pins on the +// port will always show a 0 value. See cpu_map.h for the pin bitmap. As with the limit pin reporting, +// we do not recommend keeping this option enabled. Try to only use this for setting up a new CNC. +// #define REPORT_CONTROL_PIN_STATE // Default disabled. Uncomment to enable. // When Grbl powers-cycles or is hard reset with the Arduino reset button, Grbl boots up with no ALARM // by default. This is to make it as simple as possible for new users to start using Grbl. When homing diff --git a/grbl/gcode.c b/grbl/gcode.c index 37f9ff9..3893c61 100644 --- a/grbl/gcode.c +++ b/grbl/gcode.c @@ -1056,9 +1056,9 @@ uint8_t gc_execute_line(char *line) group 1 = {G81 - G89} (Motion modes: Canned cycles) group 4 = {M1} (Optional stop, ignored) group 6 = {M6} (Tool change) - group 7 = {G40, G41, G42} cutter radius compensation - group 8 = {G43} tool length offset (But G43.1/G94 IS SUPPORTED) - group 8 = {*M7} enable mist coolant + group 7 = {G41, G42} cutter radius compensation (G40 is supported) + group 8 = {G43} tool length offset (G43.1/G49 are supported) + group 8 = {*M7} enable mist coolant (* Compile-option) group 9 = {M48, M49} enable/disable feed and speed override switches group 10 = {G98, G99} return mode canned cycles group 13 = {G61, G61.1, G64} path control mode diff --git a/grbl/gcode.h b/grbl/gcode.h index 46df351..5331116 100644 --- a/grbl/gcode.h +++ b/grbl/gcode.h @@ -30,14 +30,14 @@ // and are similar/identical to other g-code interpreters by manufacturers (Haas,Fanuc,Mazak,etc). // NOTE: Modal group define values must be sequential and starting from zero. #define MODAL_GROUP_G0 0 // [G4,G10,G28,G28.1,G30,G30.1,G53,G92,G92.1] Non-modal -#define MODAL_GROUP_G1 1 // [G0,G1,G2,G3,G38.2,G80] Motion +#define MODAL_GROUP_G1 1 // [G0,G1,G2,G3,G38.2,G38.3,G38.4,G38.5,G80] Motion #define MODAL_GROUP_G2 2 // [G17,G18,G19] Plane selection #define MODAL_GROUP_G3 3 // [G90,G91] Distance mode -#define MODAL_GROUP_G4 4 // [G90.1,G91.1] Arc IJK distance mode +#define MODAL_GROUP_G4 4 // [G91.1] Arc IJK distance mode #define MODAL_GROUP_G5 5 // [G93,G94] Feed rate mode #define MODAL_GROUP_G6 6 // [G20,G21] Units #define MODAL_GROUP_G7 7 // [G40] Cutter radius compensation mode. G41/42 NOT SUPPORTED. -#define MODAL_GROUP_G8 8 // [G43,G43.1,G49] Tool length offset +#define MODAL_GROUP_G8 8 // [G43.1,G49] Tool length offset #define MODAL_GROUP_G12 9 // [G54,G55,G56,G57,G58,G59] Coordinate system selection #define MODAL_GROUP_M4 10 // [M0,M1,M2,M30] Stopping @@ -142,8 +142,9 @@ typedef struct { uint8_t feed_rate; // {G93,G94} uint8_t units; // {G20,G21} uint8_t distance; // {G90,G91} + // uint8_t distance_arc; // {G91.1} NOTE: Don't track. Only one supported. uint8_t plane_select; // {G17,G18,G19} - // uint8_t cutter_comp; // {G40} NOTE: Don't need to track since it's always disabled. + // uint8_t cutter_comp; // {G40} NOTE: Don't track. Only one supported. uint8_t tool_length; // {G43.1,G49} uint8_t coord_select; // {G54,G55,G56,G57,G58,G59} uint8_t program_flow; // {M0,M1,M2,M30} diff --git a/grbl/grbl.h b/grbl/grbl.h index 1ff036e..7b5bb1b 100644 --- a/grbl/grbl.h +++ b/grbl/grbl.h @@ -23,7 +23,7 @@ // Grbl versioning system #define GRBL_VERSION "0.9i" -#define GRBL_VERSION_BUILD "20150307" +#define GRBL_VERSION_BUILD "20150314" // Define standard libraries used by Grbl. #include diff --git a/grbl/report.c b/grbl/report.c index 9460f6a..e03bdde 100644 --- a/grbl/report.c +++ b/grbl/report.c @@ -484,9 +484,16 @@ void report_realtime_status() printFloat_RateValue(st_get_realtime_rate()); #endif - #ifdef REPORT_INPUT_PIN_STATES + #ifdef REPORT_LIMIT_PIN_STATE printPgmString(PSTR(",Lim:")); - print_uint8_base2(LIMIT_PIN & LIMIT_MASK); + uint8_t idx; + for (idx=0; idx