Updated variable spindle and new probing. Minor bug fixes.
- Minor bug fix for variable spindle PWM output. Values smaller than the minimum RPM for the spindle would overflow the PWM value. Thanks Rob! - Created an optional minimum spindle PWM low-mark value as a compile-time option. This is for special circumstances when the PWM has to be at a certain level to be read by the spindle controller. - Refactored the new probing commands (G38.3, G38.4, G38.5) code to work better with the rest of Grbl’s systems. - Refactored mc_probe() and mc_arc() to accept the mode of the command, i.e. clockwise vs counter, toward vs away, etc. This is to make these functions independent of gcode state variables. - Removed the pull off motion in the probing cycle. This is not an official operation and was added for user simplicity, but wrongly did so. So bye bye. - Created a configure probe invert mask function to handle the different probe pin setting and probing cycle modes with a single mask. - Minor bug fix with reporting motion modes via $G. G38.2 wasn’t showing up. It now does, along with the other new probing commands. - Refactored some of the new pin configurations for the future of Grbl. -
This commit is contained in:
9
gcode.h
9
gcode.h
@ -71,8 +71,11 @@
|
||||
#define MOTION_MODE_LINEAR 1 // G1
|
||||
#define MOTION_MODE_CW_ARC 2 // G2
|
||||
#define MOTION_MODE_CCW_ARC 3 // G3
|
||||
#define MOTION_MODE_PROBE 4 // G38.2, G38.3, G38.4, G38.5
|
||||
#define MOTION_MODE_NONE 5 // G80
|
||||
#define MOTION_MODE_PROBE_TOWARD 4 // G38.2
|
||||
#define MOTION_MODE_PROBE_TOWARD_NO_ERROR 5 // G38.3
|
||||
#define MOTION_MODE_PROBE_AWAY 6 // G38.4
|
||||
#define MOTION_MODE_PROBE_AWAY_NO_ERROR 7 // G38.5
|
||||
#define MOTION_MODE_NONE 8 // G80
|
||||
|
||||
// Modal Group G2: Plane select
|
||||
#define PLANE_SELECT_XY 0 // G17 (Default: Must be zero)
|
||||
@ -164,7 +167,7 @@ typedef struct {
|
||||
float spindle_speed; // RPM
|
||||
float feed_rate; // Millimeters/min
|
||||
uint8_t tool; // Tracks tool number. NOT USED.
|
||||
// int32_t line_number; // Last line number sent
|
||||
int32_t line_number; // Last line number sent
|
||||
|
||||
float position[N_AXIS]; // Where the interpreter considers the tool to be at this point in the code
|
||||
|
||||
|
Reference in New Issue
Block a user