mirror of
https://github.com/bdring/Grbl_Esp32.git
synced 2025-09-01 18:32:37 +02:00
Cleaning up the machine defs
Removed unused #defines.
This commit is contained in:
@@ -46,31 +46,7 @@ Some features should not be changed. See notes below.
|
|||||||
// machine.h is #included below, after some definitions
|
// machine.h is #included below, after some definitions
|
||||||
// that the machine file might choose to undefine.
|
// that the machine file might choose to undefine.
|
||||||
|
|
||||||
// Define the homing cycle patterns with bitmasks. The homing cycle first performs a search mode
|
// Note: HOMING_CYCLES are now settings
|
||||||
// to quickly engage the limit switches, followed by a slower locate mode, and finished by a short
|
|
||||||
// pull-off motion to disengage the limit switches. The following HOMING_CYCLE_x defines are executed
|
|
||||||
// in order starting with suffix 0 and completes the homing routine for the specified-axes only. If
|
|
||||||
// an axis is omitted from the defines, it will not home, nor will the system update its position.
|
|
||||||
// Meaning that this allows for users with non-standard Cartesian machines, such as a lathe (x then z,
|
|
||||||
// with no y), to configure the homing cycle behavior to their needs.
|
|
||||||
// NOTE: The homing cycle is designed to allow sharing of limit pins, if the axes are not in the same
|
|
||||||
// cycle, but this requires some pin settings changes in the machine definition file. For example, the default homing
|
|
||||||
// cycle can share the Z limit pin with either X or Y limit pins, since they are on different cycles.
|
|
||||||
// By sharing a pin, this frees up a precious IO pin for other purposes. In theory, all axes limit pins
|
|
||||||
// may be reduced to one pin, if all axes are homed with separate cycles, or vice versa, all three axes
|
|
||||||
// on separate pin, but homed in one cycle. Also, it should be noted that the function of hard limits
|
|
||||||
// will not be affected by pin sharing.
|
|
||||||
|
|
||||||
// NOTE: Defaults are set for a traditional 3-axis CNC machine. Z-axis first to clear, followed by X & Y.
|
|
||||||
// These homing cycle definitions precede the machine.h file so that the machine
|
|
||||||
// definition can undefine them if necessary.
|
|
||||||
#define HOMING_CYCLE_0 bit(Z_AXIS) // TYPICALLY REQUIRED: First move Z to clear workspace.
|
|
||||||
#define HOMING_CYCLE_1 bit(X_AXIS)
|
|
||||||
#define HOMING_CYCLE_2 bit(Y_AXIS)
|
|
||||||
|
|
||||||
// NOTE: The following is for for homing X and Y at the same time
|
|
||||||
// #define HOMING_CYCLE_0 bit(Z_AXIS) // first home z by itself
|
|
||||||
// #define HOMING_CYCLE_1 (bit(X_AXIS)|bit(Y_AXIS)) // Homes both X-Y in one cycle. NOT COMPATIBLE WITH COREXY!!!
|
|
||||||
|
|
||||||
// Inverts pin logic of the control command pins based on a mask. This essentially means you can use
|
// Inverts pin logic of the control command pins based on a mask. This essentially means you can use
|
||||||
// normally-closed switches on the specified pins, rather than the default normally-open switches.
|
// normally-closed switches on the specified pins, rather than the default normally-open switches.
|
||||||
@@ -291,8 +267,6 @@ const double SAFETY_DOOR_SPINDLE_DELAY = 4.0; // Float (seconds)
|
|||||||
const double SAFETY_DOOR_COOLANT_DELAY = 1.0; // Float (seconds)
|
const double SAFETY_DOOR_COOLANT_DELAY = 1.0; // Float (seconds)
|
||||||
|
|
||||||
// Enable CoreXY kinematics. Use ONLY with CoreXY machines.
|
// Enable CoreXY kinematics. Use ONLY with CoreXY machines.
|
||||||
// IMPORTANT: If homing is enabled, you must reconfigure the homing cycle #defines above to
|
|
||||||
// #define HOMING_CYCLE_0 bit(X_AXIS) and #define HOMING_CYCLE_1 bit(Y_AXIS)
|
|
||||||
// NOTE: This configuration option alters the motion of the X and Y axes to principle of operation
|
// NOTE: This configuration option alters the motion of the X and Y axes to principle of operation
|
||||||
// defined at (http://corexy.com/theory.html). Motors are assumed to positioned and wired exactly as
|
// defined at (http://corexy.com/theory.html). Motors are assumed to positioned and wired exactly as
|
||||||
// described, if not, motions may move in strange directions. Grbl requires the CoreXY A and B motors
|
// described, if not, motions may move in strange directions. Grbl requires the CoreXY A and B motors
|
||||||
|
@@ -49,19 +49,7 @@
|
|||||||
#define Y2_LIMIT_PIN GPIO_NUM_35
|
#define Y2_LIMIT_PIN GPIO_NUM_35
|
||||||
#define Z_LIMIT_PIN GPIO_NUM_34
|
#define Z_LIMIT_PIN GPIO_NUM_34
|
||||||
|
|
||||||
#ifdef HOMING_CYCLE_0
|
// Set $Homing/Cycle0=X and $Homing/Cycle=XY
|
||||||
#undef HOMING_CYCLE_0
|
|
||||||
#endif
|
|
||||||
#define HOMING_CYCLE_0 bit(Z_AXIS) // Z first
|
|
||||||
|
|
||||||
#ifdef HOMING_CYCLE_1
|
|
||||||
#undef HOMING_CYCLE_1
|
|
||||||
#endif
|
|
||||||
#define HOMING_CYCLE_1 (bit(X_AXIS)|bit(Y_AXIS))
|
|
||||||
|
|
||||||
#ifdef HOMING_CYCLE_2
|
|
||||||
#undef HOMING_CYCLE_2
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define PROBE_PIN GPIO_NUM_14 // labeled Probe
|
#define PROBE_PIN GPIO_NUM_14 // labeled Probe
|
||||||
#define CONTROL_RESET_PIN GPIO_NUM_27 // labeled Reset
|
#define CONTROL_RESET_PIN GPIO_NUM_27 // labeled Reset
|
||||||
|
@@ -39,19 +39,6 @@
|
|||||||
#define Y_LIMIT_PIN GPIO_NUM_4
|
#define Y_LIMIT_PIN GPIO_NUM_4
|
||||||
#define Z_LIMIT_PIN GPIO_NUM_16
|
#define Z_LIMIT_PIN GPIO_NUM_16
|
||||||
|
|
||||||
#ifdef HOMING_CYCLE_0
|
|
||||||
#undef HOMING_CYCLE_0
|
|
||||||
#endif
|
|
||||||
#define HOMING_CYCLE_0 bit(Z_AXIS) // Z first
|
|
||||||
|
|
||||||
#ifdef HOMING_CYCLE_1
|
|
||||||
#undef HOMING_CYCLE_1
|
|
||||||
#endif
|
|
||||||
#define HOMING_CYCLE_1 (bit(X_AXIS)|bit(Y_AXIS))
|
|
||||||
|
|
||||||
#ifdef HOMING_CYCLE_2
|
|
||||||
#undef HOMING_CYCLE_2
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// OK to comment out to use pin for other features
|
// OK to comment out to use pin for other features
|
||||||
#define STEPPERS_DISABLE_PIN GPIO_NUM_13
|
#define STEPPERS_DISABLE_PIN GPIO_NUM_13
|
||||||
|
@@ -54,16 +54,8 @@
|
|||||||
#define SOLENOID_DIRECTION_PIN GPIO_NUM_4
|
#define SOLENOID_DIRECTION_PIN GPIO_NUM_4
|
||||||
#define SOLENOID_PEN_PIN GPIO_NUM_2
|
#define SOLENOID_PEN_PIN GPIO_NUM_2
|
||||||
|
|
||||||
#ifdef HOMING_CYCLE_0
|
// this 'bot only homes the X axis
|
||||||
#undef HOMING_CYCLE_0
|
// Set $Homing/Cycle0=0
|
||||||
#endif
|
|
||||||
#define HOMING_CYCLE_0 bit(X_AXIS) // this 'bot only homes the X axis
|
|
||||||
#ifdef HOMING_CYCLE_1
|
|
||||||
#undef HOMING_CYCLE_1
|
|
||||||
#endif
|
|
||||||
#ifdef HOMING_CYCLE_2
|
|
||||||
#undef HOMING_CYCLE_2
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define REED_SW_PIN GPIO_NUM_17
|
#define REED_SW_PIN GPIO_NUM_17
|
||||||
|
|
||||||
|
@@ -48,24 +48,8 @@
|
|||||||
#define Z_SERVO_CAL_MIN 1.0 // calibration factor for the minimum PWM duty
|
#define Z_SERVO_CAL_MIN 1.0 // calibration factor for the minimum PWM duty
|
||||||
#define Z_SERVO_CAL_MAX 1.0 // calibration factor for the maximum PWM duty
|
#define Z_SERVO_CAL_MAX 1.0 // calibration factor for the maximum PWM duty
|
||||||
|
|
||||||
// redefine some stuff from config.h
|
|
||||||
#ifdef HOMING_CYCLE_0
|
|
||||||
#undef HOMING_CYCLE_0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define HOMING_CYCLE_0 bit(Y_AXIS)
|
// Set $Homing/Cycle0=Y and $Homing/Cycle1=X
|
||||||
|
|
||||||
#ifdef HOMING_CYCLE_1
|
|
||||||
#undef HOMING_CYCLE_1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define HOMING_CYCLE_1 bit(X_AXIS)
|
|
||||||
|
|
||||||
#ifdef HOMING_CYCLE_2
|
|
||||||
#undef HOMING_CYCLE_2
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define SERVO_PEN_PIN GPIO_NUM_27
|
|
||||||
|
|
||||||
#define SPINDLE_TYPE SpindleType::NONE
|
#define SPINDLE_TYPE SpindleType::NONE
|
||||||
|
|
||||||
|
@@ -74,17 +74,9 @@
|
|||||||
#define MACRO_BUTTON_1_PIN GPIO_NUM_12
|
#define MACRO_BUTTON_1_PIN GPIO_NUM_12
|
||||||
#define MACRO_BUTTON_2_PIN GPIO_NUM_14
|
#define MACRO_BUTTON_2_PIN GPIO_NUM_14
|
||||||
|
|
||||||
// redefine some stuff from config.h
|
|
||||||
#ifdef HOMING_CYCLE_0
|
// this 'bot only homes the X axis
|
||||||
#undef HOMING_CYCLE_0
|
// Set $Homing/Cycle0=X
|
||||||
#endif
|
|
||||||
#define HOMING_CYCLE_0 bit(X_AXIS) // this 'bot only homes the X axis
|
|
||||||
#ifdef HOMING_CYCLE_1
|
|
||||||
#undef HOMING_CYCLE_1
|
|
||||||
#endif
|
|
||||||
#ifdef HOMING_CYCLE_2
|
|
||||||
#undef HOMING_CYCLE_2
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// ============= End CPU MAP ==================
|
// ============= End CPU MAP ==================
|
||||||
|
|
||||||
|
@@ -136,22 +136,7 @@
|
|||||||
// #define Z_SERVO_CAL_MIN 1.0 // calibration factor for the maximum PWM duty
|
// #define Z_SERVO_CAL_MIN 1.0 // calibration factor for the maximum PWM duty
|
||||||
|
|
||||||
// === Homing cycles
|
// === Homing cycles
|
||||||
// The default homing order is Z first (HOMING_CYCLE_0),
|
// Set them using $Homing/Cycle0= optionally up to $Homing/Cycle5=
|
||||||
// then X (HOMING_CYCLE_1), and finally Y (HOMING_CYCLE_2)
|
|
||||||
// For machines that need different homing order, you can
|
|
||||||
// undefine HOMING_CYCLE_n and redefine it accordingly.
|
|
||||||
// For example, the following would first home X and Y
|
|
||||||
// simultaneously, then A and B simultaneously, and Z
|
|
||||||
// not at all.
|
|
||||||
|
|
||||||
// #undef HOMING_CYCLE_0
|
|
||||||
// #define HOMING_CYCLE_0 (bit(X_AXIS)|bit(Y_AXIS))
|
|
||||||
|
|
||||||
// #undef HOMING_CYCLE_1
|
|
||||||
// #define HOMING_CYCLE_1 (bit(A_AXIS)|bit(B_AXIS))
|
|
||||||
|
|
||||||
// #undef HOMING_CYCLE_2
|
|
||||||
// #endif
|
|
||||||
|
|
||||||
// === Default settings
|
// === Default settings
|
||||||
// Grbl has many run-time settings that the user can changed by
|
// Grbl has many run-time settings that the user can changed by
|
||||||
|
Reference in New Issue
Block a user