mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-01-19 08:08:25 +00:00
💥 Num Axes and Multi-Stepper based on Driver Types (#24120)
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
This commit is contained in:
parent
6237a6a6d3
commit
df40181357
33 changed files with 266 additions and 259 deletions
|
@ -155,8 +155,6 @@
|
||||||
* These settings allow Marlin to tune stepper driver timing and enable advanced options for
|
* These settings allow Marlin to tune stepper driver timing and enable advanced options for
|
||||||
* stepper drivers that support them. You may also override timing options in Configuration_adv.h.
|
* stepper drivers that support them. You may also override timing options in Configuration_adv.h.
|
||||||
*
|
*
|
||||||
* A4988 is assumed for unspecified drivers.
|
|
||||||
*
|
|
||||||
* Use TMC2208/TMC2208_STANDALONE for TMC2225 drivers and TMC2209/TMC2209_STANDALONE for TMC2226 drivers.
|
* Use TMC2208/TMC2208_STANDALONE for TMC2225 drivers and TMC2209/TMC2209_STANDALONE for TMC2226 drivers.
|
||||||
*
|
*
|
||||||
* Options: A4988, A5984, DRV8825, LV8729, L6470, L6474, POWERSTEP01,
|
* Options: A4988, A5984, DRV8825, LV8729, L6470, L6474, POWERSTEP01,
|
||||||
|
|
|
@ -713,73 +713,6 @@
|
||||||
//#define CLOSED_LOOP_MOVE_COMPLETE_PIN -1
|
//#define CLOSED_LOOP_MOVE_COMPLETE_PIN -1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**
|
|
||||||
* Dual Steppers / Dual Endstops
|
|
||||||
*
|
|
||||||
* This section will allow you to use extra E drivers to drive a second motor for X, Y, or Z axes.
|
|
||||||
*
|
|
||||||
* For example, set X_DUAL_STEPPER_DRIVERS setting to use a second motor. If the motors need to
|
|
||||||
* spin in opposite directions set INVERT_X2_VS_X_DIR. If the second motor needs its own endstop
|
|
||||||
* set X_DUAL_ENDSTOPS. This can adjust for "racking." Use X2_USE_ENDSTOP to set the endstop plug
|
|
||||||
* that should be used for the second endstop. Extra endstops will appear in the output of 'M119'.
|
|
||||||
*
|
|
||||||
* Use X_DUAL_ENDSTOP_ADJUSTMENT to adjust for mechanical imperfection. After homing both motors
|
|
||||||
* this offset is applied to the X2 motor. To find the offset home the X axis, and measure the error
|
|
||||||
* in X2. Dual endstop offsets can be set at runtime with 'M666 X<offset> Y<offset> Z<offset>'.
|
|
||||||
*/
|
|
||||||
|
|
||||||
//#define X_DUAL_STEPPER_DRIVERS
|
|
||||||
#if ENABLED(X_DUAL_STEPPER_DRIVERS)
|
|
||||||
//#define INVERT_X2_VS_X_DIR // Enable if X2 direction signal is opposite to X
|
|
||||||
//#define X_DUAL_ENDSTOPS
|
|
||||||
#if ENABLED(X_DUAL_ENDSTOPS)
|
|
||||||
#define X2_USE_ENDSTOP _XMAX_
|
|
||||||
#define X2_ENDSTOP_ADJUSTMENT 0
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//#define Y_DUAL_STEPPER_DRIVERS
|
|
||||||
#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
|
|
||||||
//#define INVERT_Y2_VS_Y_DIR // Enable if Y2 direction signal is opposite to Y
|
|
||||||
//#define Y_DUAL_ENDSTOPS
|
|
||||||
#if ENABLED(Y_DUAL_ENDSTOPS)
|
|
||||||
#define Y2_USE_ENDSTOP _YMAX_
|
|
||||||
#define Y2_ENDSTOP_ADJUSTMENT 0
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
|
||||||
// For Z set the number of stepper drivers
|
|
||||||
//
|
|
||||||
#define NUM_Z_STEPPER_DRIVERS 1 // (1-4) Z options change based on how many
|
|
||||||
|
|
||||||
#if NUM_Z_STEPPER_DRIVERS > 1
|
|
||||||
// Enable if Z motor direction signals are the opposite of Z1
|
|
||||||
//#define INVERT_Z2_VS_Z_DIR
|
|
||||||
//#define INVERT_Z3_VS_Z_DIR
|
|
||||||
//#define INVERT_Z4_VS_Z_DIR
|
|
||||||
|
|
||||||
//#define Z_MULTI_ENDSTOPS
|
|
||||||
#if ENABLED(Z_MULTI_ENDSTOPS)
|
|
||||||
#define Z2_USE_ENDSTOP _XMAX_
|
|
||||||
#define Z2_ENDSTOP_ADJUSTMENT 0
|
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 3
|
|
||||||
#define Z3_USE_ENDSTOP _YMAX_
|
|
||||||
#define Z3_ENDSTOP_ADJUSTMENT 0
|
|
||||||
#endif
|
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 4
|
|
||||||
#define Z4_USE_ENDSTOP _ZMAX_
|
|
||||||
#define Z4_ENDSTOP_ADJUSTMENT 0
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Drive the E axis with two synchronized steppers
|
|
||||||
//#define E_DUAL_STEPPER_DRIVERS
|
|
||||||
#if ENABLED(E_DUAL_STEPPER_DRIVERS)
|
|
||||||
//#define INVERT_E1_VS_E0_DIR // Enable if the E motors need opposite DIR states
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Dual X Carriage
|
* Dual X Carriage
|
||||||
*
|
*
|
||||||
|
@ -830,6 +763,77 @@
|
||||||
//#define EVENT_GCODE_IDEX_AFTER_MODECHANGE "G28X"
|
//#define EVENT_GCODE_IDEX_AFTER_MODECHANGE "G28X"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Multi-Stepper / Multi-Endstop
|
||||||
|
*
|
||||||
|
* When X2_DRIVER_TYPE is defined, this indicates that the X and X2 motors work in tandem.
|
||||||
|
* The following explanations for X also apply to Y and Z multi-stepper setups.
|
||||||
|
* Endstop offsets may be changed by 'M666 X<offset> Y<offset> Z<offset>' and stored to EEPROM.
|
||||||
|
*
|
||||||
|
* - Enable INVERT_X2_VS_X_DIR if the X2 motor requires an opposite DIR signal from X.
|
||||||
|
*
|
||||||
|
* - Enable X_DUAL_ENDSTOPS if the second motor has its own endstop, with adjustable offset.
|
||||||
|
*
|
||||||
|
* - Extra endstops are included in the output of 'M119'.
|
||||||
|
*
|
||||||
|
* - Set X_DUAL_ENDSTOP_ADJUSTMENT to the known error in the X2 endstop.
|
||||||
|
* Applied to the X2 motor on 'G28' / 'G28 X'.
|
||||||
|
* Get the offset by homing X and measuring the error.
|
||||||
|
* Also set with 'M666 X<offset>' and stored to EEPROM with 'M500'.
|
||||||
|
*
|
||||||
|
* - Use X2_USE_ENDSTOP to set the endstop plug by name. (_XMIN_, _XMAX_, _YMIN_, _YMAX_, _ZMIN_, _ZMAX_)
|
||||||
|
*/
|
||||||
|
#if HAS_X2_STEPPER && DISABLED(DUAL_X_CARRIAGE)
|
||||||
|
//#define INVERT_X2_VS_X_DIR // X2 direction signal is the opposite of X
|
||||||
|
//#define X_DUAL_ENDSTOPS // X2 has its own endstop
|
||||||
|
#if ENABLED(X_DUAL_ENDSTOPS)
|
||||||
|
#define X2_USE_ENDSTOP _XMAX_ // X2 endstop board plug. Don't forget to enable USE_*_PLUG.
|
||||||
|
#define X2_ENDSTOP_ADJUSTMENT 0 // X2 offset relative to X endstop
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if HAS_DUAL_Y_STEPPERS
|
||||||
|
//#define INVERT_Y2_VS_Y_DIR // Y2 direction signal is the opposite of Y
|
||||||
|
//#define Y_DUAL_ENDSTOPS // Y2 has its own endstop
|
||||||
|
#if ENABLED(Y_DUAL_ENDSTOPS)
|
||||||
|
#define Y2_USE_ENDSTOP _YMAX_ // Y2 endstop board plug. Don't forget to enable USE_*_PLUG.
|
||||||
|
#define Y2_ENDSTOP_ADJUSTMENT 0 // Y2 offset relative to Y endstop
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
//
|
||||||
|
// Multi-Z steppers
|
||||||
|
//
|
||||||
|
#ifdef Z2_DRIVER_TYPE
|
||||||
|
//#define INVERT_Z2_VS_Z_DIR // Z2 direction signal is the opposite of Z
|
||||||
|
|
||||||
|
//#define Z_MULTI_ENDSTOPS // Other Z axes have their own endstops
|
||||||
|
#if ENABLED(Z_MULTI_ENDSTOPS)
|
||||||
|
#define Z2_USE_ENDSTOP _XMAX_ // Z2 endstop board plug. Don't forget to enable USE_*_PLUG.
|
||||||
|
#define Z2_ENDSTOP_ADJUSTMENT 0 // Z2 offset relative to Y endstop
|
||||||
|
#endif
|
||||||
|
#ifdef Z3_DRIVER_TYPE
|
||||||
|
//#define INVERT_Z3_VS_Z_DIR // Z3 direction signal is the opposite of Z
|
||||||
|
#if ENABLED(Z_MULTI_ENDSTOPS)
|
||||||
|
#define Z3_USE_ENDSTOP _YMAX_ // Z3 endstop board plug. Don't forget to enable USE_*_PLUG.
|
||||||
|
#define Z3_ENDSTOP_ADJUSTMENT 0 // Z3 offset relative to Y endstop
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#ifdef Z4_DRIVER_TYPE
|
||||||
|
//#define INVERT_Z4_VS_Z_DIR // Z4 direction signal is the opposite of Z
|
||||||
|
#if ENABLED(Z_MULTI_ENDSTOPS)
|
||||||
|
#define Z4_USE_ENDSTOP _ZMAX_ // Z4 endstop board plug. Don't forget to enable USE_*_PLUG.
|
||||||
|
#define Z4_ENDSTOP_ADJUSTMENT 0 // Z4 offset relative to Y endstop
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// Drive the E axis with two synchronized steppers
|
||||||
|
//#define E_DUAL_STEPPER_DRIVERS
|
||||||
|
#if ENABLED(E_DUAL_STEPPER_DRIVERS)
|
||||||
|
//#define INVERT_E1_VS_E0_DIR // E direction signals are opposites
|
||||||
|
#endif
|
||||||
|
|
||||||
// Activate a solenoid on the active extruder with M380. Disable all with M381.
|
// Activate a solenoid on the active extruder with M380. Disable all with M381.
|
||||||
// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
|
// Define SOL0_PIN, SOL1_PIN, etc., for each extruder that has a solenoid.
|
||||||
//#define EXT_SOLENOID
|
//#define EXT_SOLENOID
|
||||||
|
@ -963,7 +967,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Z Stepper positions for more rapid convergence in bed alignment.
|
* Z Stepper positions for more rapid convergence in bed alignment.
|
||||||
* Requires NUM_Z_STEPPER_DRIVERS to be 3 or 4.
|
* Requires 3 or 4 Z steppers.
|
||||||
*
|
*
|
||||||
* Define Stepper XY positions for Z1, Z2, Z3... corresponding to the screw
|
* Define Stepper XY positions for Z1, Z2, Z3... corresponding to the screw
|
||||||
* positions in the bed carriage, with one position per Z stepper in stepper
|
* positions in the bed carriage, with one position per Z stepper in stepper
|
||||||
|
@ -2460,7 +2464,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extra G-code to run while executing tool-change commands. Can be used to use an additional
|
* Extra G-code to run while executing tool-change commands. Can be used to use an additional
|
||||||
* stepper motor (I axis, see option NUM_AXES in Configuration.h) to drive the tool-changer.
|
* stepper motor (e.g., I axis in Configuration.h) to drive the tool-changer.
|
||||||
*/
|
*/
|
||||||
//#define EVENT_GCODE_TOOLCHANGE_T0 "G28 A\nG1 A0" // Extra G-code to run while executing tool-change command T0
|
//#define EVENT_GCODE_TOOLCHANGE_T0 "G28 A\nG1 A0" // Extra G-code to run while executing tool-change command T0
|
||||||
//#define EVENT_GCODE_TOOLCHANGE_T1 "G1 A10" // Extra G-code to run while executing tool-change command T1
|
//#define EVENT_GCODE_TOOLCHANGE_T1 "G1 A10" // Extra G-code to run while executing tool-change command T1
|
||||||
|
|
|
@ -67,11 +67,11 @@
|
||||||
#define AXIS_DRIVER_TYPE_V(T) _AXIS_DRIVER_TYPE(V,T)
|
#define AXIS_DRIVER_TYPE_V(T) _AXIS_DRIVER_TYPE(V,T)
|
||||||
#define AXIS_DRIVER_TYPE_W(T) _AXIS_DRIVER_TYPE(W,T)
|
#define AXIS_DRIVER_TYPE_W(T) _AXIS_DRIVER_TYPE(W,T)
|
||||||
|
|
||||||
#define AXIS_DRIVER_TYPE_X2(T) (EITHER(X_DUAL_STEPPER_DRIVERS, DUAL_X_CARRIAGE) && _AXIS_DRIVER_TYPE(X2,T))
|
#define AXIS_DRIVER_TYPE_X2(T) (HAS_X2_STEPPER && _AXIS_DRIVER_TYPE(X2,T))
|
||||||
#define AXIS_DRIVER_TYPE_Y2(T) (ENABLED(Y_DUAL_STEPPER_DRIVERS) && _AXIS_DRIVER_TYPE(Y2,T))
|
#define AXIS_DRIVER_TYPE_Y2(T) (HAS_DUAL_Y_STEPPERS && _AXIS_DRIVER_TYPE(Y2,T))
|
||||||
#define AXIS_DRIVER_TYPE_Z2(T) (NUM_Z_STEPPER_DRIVERS >= 2 && _AXIS_DRIVER_TYPE(Z2,T))
|
#define AXIS_DRIVER_TYPE_Z2(T) (NUM_Z_STEPPERS >= 2 && _AXIS_DRIVER_TYPE(Z2,T))
|
||||||
#define AXIS_DRIVER_TYPE_Z3(T) (NUM_Z_STEPPER_DRIVERS >= 3 && _AXIS_DRIVER_TYPE(Z3,T))
|
#define AXIS_DRIVER_TYPE_Z3(T) (NUM_Z_STEPPERS >= 3 && _AXIS_DRIVER_TYPE(Z3,T))
|
||||||
#define AXIS_DRIVER_TYPE_Z4(T) (NUM_Z_STEPPER_DRIVERS >= 4 && _AXIS_DRIVER_TYPE(Z4,T))
|
#define AXIS_DRIVER_TYPE_Z4(T) (NUM_Z_STEPPERS >= 4 && _AXIS_DRIVER_TYPE(Z4,T))
|
||||||
|
|
||||||
#define AXIS_DRIVER_TYPE_E(N,T) (E_STEPPERS > N && _AXIS_DRIVER_TYPE(E##N,T))
|
#define AXIS_DRIVER_TYPE_E(N,T) (E_STEPPERS > N && _AXIS_DRIVER_TYPE(E##N,T))
|
||||||
#define AXIS_DRIVER_TYPE_E0(T) AXIS_DRIVER_TYPE_E(0,T)
|
#define AXIS_DRIVER_TYPE_E0(T) AXIS_DRIVER_TYPE_E(0,T)
|
||||||
|
|
|
@ -33,35 +33,35 @@
|
||||||
|
|
||||||
ZStepperAlign z_stepper_align;
|
ZStepperAlign z_stepper_align;
|
||||||
|
|
||||||
xy_pos_t ZStepperAlign::xy[NUM_Z_STEPPER_DRIVERS];
|
xy_pos_t ZStepperAlign::xy[NUM_Z_STEPPERS];
|
||||||
|
|
||||||
#if HAS_Z_STEPPER_ALIGN_STEPPER_XY
|
#if HAS_Z_STEPPER_ALIGN_STEPPER_XY
|
||||||
xy_pos_t ZStepperAlign::stepper_xy[NUM_Z_STEPPER_DRIVERS];
|
xy_pos_t ZStepperAlign::stepper_xy[NUM_Z_STEPPERS];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void ZStepperAlign::reset_to_default() {
|
void ZStepperAlign::reset_to_default() {
|
||||||
#ifdef Z_STEPPER_ALIGN_XY
|
#ifdef Z_STEPPER_ALIGN_XY
|
||||||
|
|
||||||
constexpr xy_pos_t xy_init[] = Z_STEPPER_ALIGN_XY;
|
constexpr xy_pos_t xy_init[] = Z_STEPPER_ALIGN_XY;
|
||||||
static_assert(COUNT(xy_init) == NUM_Z_STEPPER_DRIVERS,
|
static_assert(COUNT(xy_init) == NUM_Z_STEPPERS,
|
||||||
"Z_STEPPER_ALIGN_XY requires "
|
"Z_STEPPER_ALIGN_XY requires "
|
||||||
#if NUM_Z_STEPPER_DRIVERS == 4
|
#if NUM_Z_STEPPERS == 4
|
||||||
"four {X,Y} entries (Z, Z2, Z3, and Z4)."
|
"four {X,Y} entries (Z, Z2, Z3, and Z4)."
|
||||||
#elif NUM_Z_STEPPER_DRIVERS == 3
|
#elif NUM_Z_STEPPERS == 3
|
||||||
"three {X,Y} entries (Z, Z2, and Z3)."
|
"three {X,Y} entries (Z, Z2, and Z3)."
|
||||||
#else
|
#else
|
||||||
"two {X,Y} entries (Z and Z2)."
|
"two {X,Y} entries (Z and Z2)."
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
|
|
||||||
#define VALIDATE_ALIGN_POINT(N) static_assert(N >= NUM_Z_STEPPER_DRIVERS || Probe::build_time::can_reach(xy_init[N]), \
|
#define VALIDATE_ALIGN_POINT(N) static_assert(N >= NUM_Z_STEPPERS || Probe::build_time::can_reach(xy_init[N]), \
|
||||||
"Z_STEPPER_ALIGN_XY point " STRINGIFY(N) " is not reachable with the default NOZZLE_TO_PROBE offset and PROBING_MARGIN.")
|
"Z_STEPPER_ALIGN_XY point " STRINGIFY(N) " is not reachable with the default NOZZLE_TO_PROBE offset and PROBING_MARGIN.")
|
||||||
VALIDATE_ALIGN_POINT(0); VALIDATE_ALIGN_POINT(1); VALIDATE_ALIGN_POINT(2); VALIDATE_ALIGN_POINT(3);
|
VALIDATE_ALIGN_POINT(0); VALIDATE_ALIGN_POINT(1); VALIDATE_ALIGN_POINT(2); VALIDATE_ALIGN_POINT(3);
|
||||||
|
|
||||||
#else // !Z_STEPPER_ALIGN_XY
|
#else // !Z_STEPPER_ALIGN_XY
|
||||||
|
|
||||||
const xy_pos_t xy_init[] = {
|
const xy_pos_t xy_init[] = {
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 3 // First probe point...
|
#if NUM_Z_STEPPERS >= 3 // First probe point...
|
||||||
#if !Z_STEPPERS_ORIENTATION
|
#if !Z_STEPPERS_ORIENTATION
|
||||||
{ probe.min_x(), probe.min_y() }, // SW
|
{ probe.min_x(), probe.min_y() }, // SW
|
||||||
#elif Z_STEPPERS_ORIENTATION == 1
|
#elif Z_STEPPERS_ORIENTATION == 1
|
||||||
|
@ -73,7 +73,7 @@ void ZStepperAlign::reset_to_default() {
|
||||||
#else
|
#else
|
||||||
#error "Z_STEPPERS_ORIENTATION must be from 0 to 3 (first point SW, NW, NE, SE)."
|
#error "Z_STEPPERS_ORIENTATION must be from 0 to 3 (first point SW, NW, NE, SE)."
|
||||||
#endif
|
#endif
|
||||||
#if NUM_Z_STEPPER_DRIVERS == 4 // 3 more points...
|
#if NUM_Z_STEPPERS == 4 // 3 more points...
|
||||||
#if !Z_STEPPERS_ORIENTATION
|
#if !Z_STEPPERS_ORIENTATION
|
||||||
{ probe.min_x(), probe.max_y() }, { probe.max_x(), probe.max_y() }, { probe.max_x(), probe.min_y() } // SW
|
{ probe.min_x(), probe.max_y() }, { probe.max_x(), probe.max_y() }, { probe.max_x(), probe.min_y() } // SW
|
||||||
#elif Z_STEPPERS_ORIENTATION == 1
|
#elif Z_STEPPERS_ORIENTATION == 1
|
||||||
|
@ -106,11 +106,11 @@ void ZStepperAlign::reset_to_default() {
|
||||||
#if HAS_Z_STEPPER_ALIGN_STEPPER_XY
|
#if HAS_Z_STEPPER_ALIGN_STEPPER_XY
|
||||||
constexpr xy_pos_t stepper_xy_init[] = Z_STEPPER_ALIGN_STEPPER_XY;
|
constexpr xy_pos_t stepper_xy_init[] = Z_STEPPER_ALIGN_STEPPER_XY;
|
||||||
static_assert(
|
static_assert(
|
||||||
COUNT(stepper_xy_init) == NUM_Z_STEPPER_DRIVERS,
|
COUNT(stepper_xy_init) == NUM_Z_STEPPERS,
|
||||||
"Z_STEPPER_ALIGN_STEPPER_XY requires "
|
"Z_STEPPER_ALIGN_STEPPER_XY requires "
|
||||||
#if NUM_Z_STEPPER_DRIVERS == 4
|
#if NUM_Z_STEPPERS == 4
|
||||||
"four {X,Y} entries (Z, Z2, Z3, and Z4)."
|
"four {X,Y} entries (Z, Z2, Z3, and Z4)."
|
||||||
#elif NUM_Z_STEPPER_DRIVERS == 3
|
#elif NUM_Z_STEPPERS == 3
|
||||||
"three {X,Y} entries (Z, Z2, and Z3)."
|
"three {X,Y} entries (Z, Z2, and Z3)."
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
|
|
|
@ -29,10 +29,10 @@
|
||||||
|
|
||||||
class ZStepperAlign {
|
class ZStepperAlign {
|
||||||
public:
|
public:
|
||||||
static xy_pos_t xy[NUM_Z_STEPPER_DRIVERS];
|
static xy_pos_t xy[NUM_Z_STEPPERS];
|
||||||
|
|
||||||
#if HAS_Z_STEPPER_ALIGN_STEPPER_XY
|
#if HAS_Z_STEPPER_ALIGN_STEPPER_XY
|
||||||
static xy_pos_t stepper_xy[NUM_Z_STEPPER_DRIVERS];
|
static xy_pos_t stepper_xy[NUM_Z_STEPPERS];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void reset_to_default();
|
static void reset_to_default();
|
||||||
|
|
|
@ -91,7 +91,7 @@ void GcodeSuite::G34() {
|
||||||
digipot_i2c.set_current(Z_AXIS, target_current)
|
digipot_i2c.set_current(Z_AXIS, target_current)
|
||||||
#elif HAS_TRINAMIC_CONFIG
|
#elif HAS_TRINAMIC_CONFIG
|
||||||
const uint16_t target_current = parser.intval('S', GANTRY_CALIBRATION_CURRENT);
|
const uint16_t target_current = parser.intval('S', GANTRY_CALIBRATION_CURRENT);
|
||||||
static uint16_t previous_current_arr[NUM_Z_STEPPER_DRIVERS];
|
static uint16_t previous_current_arr[NUM_Z_STEPPERS];
|
||||||
#if AXIS_IS_TMC(Z)
|
#if AXIS_IS_TMC(Z)
|
||||||
previous_current_arr[0] = stepperZ.getMilliamps();
|
previous_current_arr[0] = stepperZ.getMilliamps();
|
||||||
stepperZ.rms_current(target_current);
|
stepperZ.rms_current(target_current);
|
||||||
|
|
|
@ -52,9 +52,9 @@
|
||||||
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
|
#define DEBUG_OUT ENABLED(DEBUG_LEVELING_FEATURE)
|
||||||
#include "../../core/debug_out.h"
|
#include "../../core/debug_out.h"
|
||||||
|
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 3
|
#if NUM_Z_STEPPERS >= 3
|
||||||
#define TRIPLE_Z 1
|
#define TRIPLE_Z 1
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 4
|
#if NUM_Z_STEPPERS >= 4
|
||||||
#define QUAD_Z 1
|
#define QUAD_Z 1
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -180,11 +180,11 @@ void GcodeSuite::G34() {
|
||||||
// This hack is un-done at the end of G34 - either by re-homing, or by using the probed heights of the last iteration.
|
// This hack is un-done at the end of G34 - either by re-homing, or by using the probed heights of the last iteration.
|
||||||
|
|
||||||
#if !HAS_Z_STEPPER_ALIGN_STEPPER_XY
|
#if !HAS_Z_STEPPER_ALIGN_STEPPER_XY
|
||||||
float last_z_align_move[NUM_Z_STEPPER_DRIVERS] = ARRAY_N_1(NUM_Z_STEPPER_DRIVERS, 10000.0f);
|
float last_z_align_move[NUM_Z_STEPPERS] = ARRAY_N_1(NUM_Z_STEPPERS, 10000.0f);
|
||||||
#else
|
#else
|
||||||
float last_z_align_level_indicator = 10000.0f;
|
float last_z_align_level_indicator = 10000.0f;
|
||||||
#endif
|
#endif
|
||||||
float z_measured[NUM_Z_STEPPER_DRIVERS] = { 0 },
|
float z_measured[NUM_Z_STEPPERS] = { 0 },
|
||||||
z_maxdiff = 0.0f,
|
z_maxdiff = 0.0f,
|
||||||
amplification = z_auto_align_amplification;
|
amplification = z_auto_align_amplification;
|
||||||
|
|
||||||
|
@ -217,9 +217,9 @@ void GcodeSuite::G34() {
|
||||||
float z_measured_max = -100000.0f;
|
float z_measured_max = -100000.0f;
|
||||||
|
|
||||||
// Probe all positions (one per Z-Stepper)
|
// Probe all positions (one per Z-Stepper)
|
||||||
LOOP_L_N(i, NUM_Z_STEPPER_DRIVERS) {
|
LOOP_L_N(i, NUM_Z_STEPPERS) {
|
||||||
// iteration odd/even --> downward / upward stepper sequence
|
// iteration odd/even --> downward / upward stepper sequence
|
||||||
const uint8_t iprobe = (iteration & 1) ? NUM_Z_STEPPER_DRIVERS - 1 - i : i;
|
const uint8_t iprobe = (iteration & 1) ? NUM_Z_STEPPERS - 1 - i : i;
|
||||||
|
|
||||||
// Safe clearance even on an incline
|
// Safe clearance even on an incline
|
||||||
if ((iteration == 0 || i > 0) && z_probe > current_position.z) do_blocking_move_to_z(z_probe);
|
if ((iteration == 0 || i > 0) && z_probe > current_position.z) do_blocking_move_to_z(z_probe);
|
||||||
|
@ -270,20 +270,20 @@ void GcodeSuite::G34() {
|
||||||
// This allows the actual adjustment logic to be shared by both algorithms.
|
// This allows the actual adjustment logic to be shared by both algorithms.
|
||||||
linear_fit_data lfd;
|
linear_fit_data lfd;
|
||||||
incremental_LSF_reset(&lfd);
|
incremental_LSF_reset(&lfd);
|
||||||
LOOP_L_N(i, NUM_Z_STEPPER_DRIVERS) {
|
LOOP_L_N(i, NUM_Z_STEPPERS) {
|
||||||
SERIAL_ECHOLNPGM("PROBEPT_", i, ": ", z_measured[i]);
|
SERIAL_ECHOLNPGM("PROBEPT_", i, ": ", z_measured[i]);
|
||||||
incremental_LSF(&lfd, z_stepper_align.xy[i], z_measured[i]);
|
incremental_LSF(&lfd, z_stepper_align.xy[i], z_measured[i]);
|
||||||
}
|
}
|
||||||
finish_incremental_LSF(&lfd);
|
finish_incremental_LSF(&lfd);
|
||||||
|
|
||||||
z_measured_min = 100000.0f;
|
z_measured_min = 100000.0f;
|
||||||
LOOP_L_N(i, NUM_Z_STEPPER_DRIVERS) {
|
LOOP_L_N(i, NUM_Z_STEPPERS) {
|
||||||
z_measured[i] = -(lfd.A * z_stepper_align.stepper_xy[i].x + lfd.B * z_stepper_align.stepper_xy[i].y + lfd.D);
|
z_measured[i] = -(lfd.A * z_stepper_align.stepper_xy[i].x + lfd.B * z_stepper_align.stepper_xy[i].y + lfd.D);
|
||||||
z_measured_min = _MIN(z_measured_min, z_measured[i]);
|
z_measured_min = _MIN(z_measured_min, z_measured[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
SERIAL_ECHOLNPGM(
|
SERIAL_ECHOLNPGM(
|
||||||
LIST_N(DOUBLE(NUM_Z_STEPPER_DRIVERS),
|
LIST_N(DOUBLE(NUM_Z_STEPPERS),
|
||||||
"Calculated Z1=", z_measured[0],
|
"Calculated Z1=", z_measured[0],
|
||||||
" Z2=", z_measured[1],
|
" Z2=", z_measured[1],
|
||||||
" Z3=", z_measured[2],
|
" Z3=", z_measured[2],
|
||||||
|
@ -307,7 +307,7 @@ void GcodeSuite::G34() {
|
||||||
|
|
||||||
#if HAS_STATUS_MESSAGE
|
#if HAS_STATUS_MESSAGE
|
||||||
char fstr1[10];
|
char fstr1[10];
|
||||||
char msg[6 + (6 + 5) * NUM_Z_STEPPER_DRIVERS + 1]
|
char msg[6 + (6 + 5) * NUM_Z_STEPPERS + 1]
|
||||||
#if TRIPLE_Z
|
#if TRIPLE_Z
|
||||||
, fstr2[10], fstr3[10]
|
, fstr2[10], fstr3[10]
|
||||||
#if QUAD_Z
|
#if QUAD_Z
|
||||||
|
@ -345,12 +345,12 @@ void GcodeSuite::G34() {
|
||||||
|
|
||||||
// Calculate mean value as a reference
|
// Calculate mean value as a reference
|
||||||
float z_measured_mean = 0.0f;
|
float z_measured_mean = 0.0f;
|
||||||
LOOP_L_N(zstepper, NUM_Z_STEPPER_DRIVERS) z_measured_mean += z_measured[zstepper];
|
LOOP_L_N(zstepper, NUM_Z_STEPPERS) z_measured_mean += z_measured[zstepper];
|
||||||
z_measured_mean /= NUM_Z_STEPPER_DRIVERS;
|
z_measured_mean /= NUM_Z_STEPPERS;
|
||||||
|
|
||||||
// Calculate the sum of the absolute deviations from the mean value
|
// Calculate the sum of the absolute deviations from the mean value
|
||||||
float z_align_level_indicator = 0.0f;
|
float z_align_level_indicator = 0.0f;
|
||||||
LOOP_L_N(zstepper, NUM_Z_STEPPER_DRIVERS)
|
LOOP_L_N(zstepper, NUM_Z_STEPPERS)
|
||||||
z_align_level_indicator += ABS(z_measured[zstepper] - z_measured_mean);
|
z_align_level_indicator += ABS(z_measured[zstepper] - z_measured_mean);
|
||||||
|
|
||||||
// If it's getting worse, stop and throw an error
|
// If it's getting worse, stop and throw an error
|
||||||
|
@ -365,7 +365,7 @@ void GcodeSuite::G34() {
|
||||||
|
|
||||||
bool success_break = true;
|
bool success_break = true;
|
||||||
// Correct the individual stepper offsets
|
// Correct the individual stepper offsets
|
||||||
LOOP_L_N(zstepper, NUM_Z_STEPPER_DRIVERS) {
|
LOOP_L_N(zstepper, NUM_Z_STEPPERS) {
|
||||||
// Calculate current stepper move
|
// Calculate current stepper move
|
||||||
float z_align_move = z_measured[zstepper] - z_measured_min;
|
float z_align_move = z_measured[zstepper] - z_measured_min;
|
||||||
const float z_align_abs = ABS(z_align_move);
|
const float z_align_abs = ABS(z_align_move);
|
||||||
|
@ -515,9 +515,9 @@ void GcodeSuite::M422() {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!WITHIN(position_index, 1, NUM_Z_STEPPER_DRIVERS)) {
|
if (!WITHIN(position_index, 1, NUM_Z_STEPPERS)) {
|
||||||
SERIAL_ECHOF(err_string);
|
SERIAL_ECHOF(err_string);
|
||||||
SERIAL_ECHOLNPGM(" index invalid (1.." STRINGIFY(NUM_Z_STEPPER_DRIVERS) ").");
|
SERIAL_ECHOLNPGM(" index invalid (1.." STRINGIFY(NUM_Z_STEPPERS) ").");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -544,7 +544,7 @@ void GcodeSuite::M422() {
|
||||||
|
|
||||||
void GcodeSuite::M422_report(const bool forReplay/*=true*/) {
|
void GcodeSuite::M422_report(const bool forReplay/*=true*/) {
|
||||||
report_heading(forReplay, F(STR_Z_AUTO_ALIGN));
|
report_heading(forReplay, F(STR_Z_AUTO_ALIGN));
|
||||||
LOOP_L_N(i, NUM_Z_STEPPER_DRIVERS) {
|
LOOP_L_N(i, NUM_Z_STEPPERS) {
|
||||||
report_echo_start(forReplay);
|
report_echo_start(forReplay);
|
||||||
SERIAL_ECHOLNPGM_P(
|
SERIAL_ECHOLNPGM_P(
|
||||||
PSTR(" M422 S"), i + 1,
|
PSTR(" M422 S"), i + 1,
|
||||||
|
@ -553,7 +553,7 @@ void GcodeSuite::M422_report(const bool forReplay/*=true*/) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
#if HAS_Z_STEPPER_ALIGN_STEPPER_XY
|
#if HAS_Z_STEPPER_ALIGN_STEPPER_XY
|
||||||
LOOP_L_N(i, NUM_Z_STEPPER_DRIVERS) {
|
LOOP_L_N(i, NUM_Z_STEPPERS) {
|
||||||
report_echo_start(forReplay);
|
report_echo_start(forReplay);
|
||||||
SERIAL_ECHOLNPGM_P(
|
SERIAL_ECHOLNPGM_P(
|
||||||
PSTR(" M422 W"), i + 1,
|
PSTR(" M422 W"), i + 1,
|
||||||
|
|
|
@ -93,12 +93,12 @@
|
||||||
#if ENABLED(Z_MULTI_ENDSTOPS)
|
#if ENABLED(Z_MULTI_ENDSTOPS)
|
||||||
if (parser.seenval('Z')) {
|
if (parser.seenval('Z')) {
|
||||||
const float z_adj = parser.value_linear_units();
|
const float z_adj = parser.value_linear_units();
|
||||||
#if NUM_Z_STEPPER_DRIVERS == 2
|
#if NUM_Z_STEPPERS == 2
|
||||||
endstops.z2_endstop_adj = z_adj;
|
endstops.z2_endstop_adj = z_adj;
|
||||||
#else
|
#else
|
||||||
const int ind = parser.intval('S');
|
const int ind = parser.intval('S');
|
||||||
#define _SET_ZADJ(N) if (!ind || ind == N) endstops.z##N##_endstop_adj = z_adj;
|
#define _SET_ZADJ(N) if (!ind || ind == N) endstops.z##N##_endstop_adj = z_adj;
|
||||||
REPEAT_S(2, INCREMENT(NUM_Z_STEPPER_DRIVERS), _SET_ZADJ)
|
REPEAT_S(2, INCREMENT(NUM_Z_STEPPERS), _SET_ZADJ)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -114,11 +114,11 @@
|
||||||
SERIAL_ECHOLNPGM_P(SP_Y_STR, LINEAR_UNIT(endstops.y2_endstop_adj));
|
SERIAL_ECHOLNPGM_P(SP_Y_STR, LINEAR_UNIT(endstops.y2_endstop_adj));
|
||||||
#endif
|
#endif
|
||||||
#if ENABLED(Z_MULTI_ENDSTOPS)
|
#if ENABLED(Z_MULTI_ENDSTOPS)
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 3
|
#if NUM_Z_STEPPERS >= 3
|
||||||
SERIAL_ECHOPGM(" S2 Z", LINEAR_UNIT(endstops.z3_endstop_adj));
|
SERIAL_ECHOPGM(" S2 Z", LINEAR_UNIT(endstops.z3_endstop_adj));
|
||||||
report_echo_start(forReplay);
|
report_echo_start(forReplay);
|
||||||
SERIAL_ECHOPGM(" M666 S3 Z", LINEAR_UNIT(endstops.z3_endstop_adj));
|
SERIAL_ECHOPGM(" M666 S3 Z", LINEAR_UNIT(endstops.z3_endstop_adj));
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 4
|
#if NUM_Z_STEPPERS >= 4
|
||||||
report_echo_start(forReplay);
|
report_echo_start(forReplay);
|
||||||
SERIAL_ECHOPGM(" M666 S4 Z", LINEAR_UNIT(endstops.z4_endstop_adj));
|
SERIAL_ECHOPGM(" M666 S4 Z", LINEAR_UNIT(endstops.z4_endstop_adj));
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
#include "../../../module/tool_change.h"
|
#include "../../../module/tool_change.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(HAS_PRUSA_MMU2)
|
#if HAS_PRUSA_MMU2
|
||||||
#include "../../../feature/mmu/mmu2.h"
|
#include "../../../feature/mmu/mmu2.h"
|
||||||
#if ENABLED(MMU2_MENUS)
|
#if ENABLED(MMU2_MENUS)
|
||||||
#include "../../../lcd/menu/menu_mmu2.h"
|
#include "../../../lcd/menu/menu_mmu2.h"
|
||||||
|
|
|
@ -707,6 +707,15 @@
|
||||||
#define HAS_Y_AXIS 1
|
#define HAS_Y_AXIS 1
|
||||||
#if NUM_AXES >= XYZ
|
#if NUM_AXES >= XYZ
|
||||||
#define HAS_Z_AXIS 1
|
#define HAS_Z_AXIS 1
|
||||||
|
#ifdef Z4_DRIVER_TYPE
|
||||||
|
#define NUM_Z_STEPPERS 4
|
||||||
|
#elif defined(Z3_DRIVER_TYPE)
|
||||||
|
#define NUM_Z_STEPPERS 3
|
||||||
|
#elif defined(Z2_DRIVER_TYPE)
|
||||||
|
#define NUM_Z_STEPPERS 2
|
||||||
|
#else
|
||||||
|
#define NUM_Z_STEPPERS 1
|
||||||
|
#endif
|
||||||
#if NUM_AXES >= 4
|
#if NUM_AXES >= 4
|
||||||
#define HAS_I_AXIS 1
|
#define HAS_I_AXIS 1
|
||||||
#if NUM_AXES >= 5
|
#if NUM_AXES >= 5
|
||||||
|
@ -869,6 +878,15 @@
|
||||||
#undef MANUAL_W_HOME_POS
|
#undef MANUAL_W_HOME_POS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef X2_DRIVER_TYPE
|
||||||
|
#define HAS_X2_STEPPER 1
|
||||||
|
// Dual X Carriage isn't known yet. TODO: Consider moving it to Configuration.h.
|
||||||
|
#endif
|
||||||
|
#ifdef Y2_DRIVER_TYPE
|
||||||
|
#define HAS_Y2_STEPPER 1
|
||||||
|
#define HAS_DUAL_Y_STEPPERS 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Number of Primary Linear Axes (e.g., XYZ)
|
* Number of Primary Linear Axes (e.g., XYZ)
|
||||||
* X, XY, or XYZ axes. Excluding duplicate axes (X2, Y2. Z2. Z3, Z4)
|
* X, XY, or XYZ axes. Excluding duplicate axes (X2, Y2. Z2. Z3, Z4)
|
||||||
|
|
|
@ -650,33 +650,20 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Multiple Z steppers
|
// Multiple Z steppers
|
||||||
#ifndef NUM_Z_STEPPER_DRIVERS
|
#if NUM_Z_STEPPERS < 4
|
||||||
#define NUM_Z_STEPPER_DRIVERS 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Fallback Stepper Driver types that depend on Configuration_adv.h
|
|
||||||
#if EITHER(DUAL_X_CARRIAGE, X_DUAL_STEPPER_DRIVERS)
|
|
||||||
#define HAS_X2_STEPPER 1
|
|
||||||
#else
|
|
||||||
#undef X2_DRIVER_TYPE
|
|
||||||
#endif
|
|
||||||
#if DISABLED(Y_DUAL_STEPPER_DRIVERS)
|
|
||||||
#undef Y2_DRIVER_TYPE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if NUM_Z_STEPPER_DRIVERS < 4
|
|
||||||
#undef Z4_DRIVER_TYPE
|
|
||||||
#undef INVERT_Z4_VS_Z_DIR
|
#undef INVERT_Z4_VS_Z_DIR
|
||||||
#if NUM_Z_STEPPER_DRIVERS < 3
|
#if NUM_Z_STEPPERS < 3
|
||||||
#undef Z3_DRIVER_TYPE
|
|
||||||
#undef INVERT_Z3_VS_Z_DIR
|
#undef INVERT_Z3_VS_Z_DIR
|
||||||
#if NUM_Z_STEPPER_DRIVERS < 2
|
#if NUM_Z_STEPPERS < 2
|
||||||
#undef Z2_DRIVER_TYPE
|
|
||||||
#undef INVERT_Z2_VS_Z_DIR
|
#undef INVERT_Z2_VS_Z_DIR
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(X2_DRIVER_TYPE) && DISABLED(DUAL_X_CARRIAGE)
|
||||||
|
#define HAS_DUAL_X_STEPPERS 1
|
||||||
|
#endif
|
||||||
|
|
||||||
//
|
//
|
||||||
// Spindle/Laser power display types
|
// Spindle/Laser power display types
|
||||||
// Defined here so sanity checks can use them
|
// Defined here so sanity checks can use them
|
||||||
|
@ -956,7 +943,7 @@
|
||||||
#undef HOME_Z_FIRST
|
#undef HOME_Z_FIRST
|
||||||
#undef HOMING_Z_WITH_PROBE
|
#undef HOMING_Z_WITH_PROBE
|
||||||
#undef ENABLE_LEVELING_FADE_HEIGHT
|
#undef ENABLE_LEVELING_FADE_HEIGHT
|
||||||
#undef NUM_Z_STEPPER_DRIVERS
|
#undef NUM_Z_STEPPERS
|
||||||
#undef CNC_WORKSPACE_PLANES
|
#undef CNC_WORKSPACE_PLANES
|
||||||
#if NUM_AXES < 2
|
#if NUM_AXES < 2
|
||||||
#undef STEALTHCHOP_Y
|
#undef STEALTHCHOP_Y
|
||||||
|
|
|
@ -1234,7 +1234,7 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 3
|
#if NUM_Z_STEPPERS >= 3
|
||||||
#if Z_HOME_TO_MAX
|
#if Z_HOME_TO_MAX
|
||||||
#ifndef Z3_MAX_ENDSTOP_INVERTING
|
#ifndef Z3_MAX_ENDSTOP_INVERTING
|
||||||
#if Z3_USE_ENDSTOP == _XMIN_
|
#if Z3_USE_ENDSTOP == _XMIN_
|
||||||
|
@ -1366,7 +1366,7 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 4
|
#if NUM_Z_STEPPERS >= 4
|
||||||
#if Z_HOME_TO_MAX
|
#if Z_HOME_TO_MAX
|
||||||
#ifndef Z4_MAX_ENDSTOP_INVERTING
|
#ifndef Z4_MAX_ENDSTOP_INVERTING
|
||||||
#if Z4_USE_ENDSTOP == _XMIN_
|
#if Z4_USE_ENDSTOP == _XMIN_
|
||||||
|
@ -1675,7 +1675,7 @@
|
||||||
#undef DISABLE_INACTIVE_Z
|
#undef DISABLE_INACTIVE_Z
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 2
|
#if NUM_Z_STEPPERS >= 2
|
||||||
#if PIN_EXISTS(Z2_ENABLE) || AXIS_IS_L64XX(Z2) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z2))
|
#if PIN_EXISTS(Z2_ENABLE) || AXIS_IS_L64XX(Z2) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z2))
|
||||||
#define HAS_Z2_ENABLE 1
|
#define HAS_Z2_ENABLE 1
|
||||||
#endif
|
#endif
|
||||||
|
@ -1690,7 +1690,7 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 3
|
#if NUM_Z_STEPPERS >= 3
|
||||||
#if PIN_EXISTS(Z3_ENABLE) || AXIS_IS_L64XX(Z3) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z3))
|
#if PIN_EXISTS(Z3_ENABLE) || AXIS_IS_L64XX(Z3) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z3))
|
||||||
#define HAS_Z3_ENABLE 1
|
#define HAS_Z3_ENABLE 1
|
||||||
#endif
|
#endif
|
||||||
|
@ -1705,7 +1705,7 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 4
|
#if NUM_Z_STEPPERS >= 4
|
||||||
#if PIN_EXISTS(Z4_ENABLE) || AXIS_IS_L64XX(Z4) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z4))
|
#if PIN_EXISTS(Z4_ENABLE) || AXIS_IS_L64XX(Z4) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(Z4))
|
||||||
#define HAS_Z4_ENABLE 1
|
#define HAS_Z4_ENABLE 1
|
||||||
#endif
|
#endif
|
||||||
|
@ -2080,7 +2080,7 @@
|
||||||
#ifndef Y_SLAVE_ADDRESS
|
#ifndef Y_SLAVE_ADDRESS
|
||||||
#define Y_SLAVE_ADDRESS 0
|
#define Y_SLAVE_ADDRESS 0
|
||||||
#endif
|
#endif
|
||||||
#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
|
#if HAS_DUAL_Y_STEPPERS
|
||||||
#if defined(Y2_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Y2)
|
#if defined(Y2_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Y2)
|
||||||
#define Y2_SENSORLESS 1
|
#define Y2_SENSORLESS 1
|
||||||
#endif
|
#endif
|
||||||
|
@ -2127,7 +2127,7 @@
|
||||||
#ifndef Z_SLAVE_ADDRESS
|
#ifndef Z_SLAVE_ADDRESS
|
||||||
#define Z_SLAVE_ADDRESS 0
|
#define Z_SLAVE_ADDRESS 0
|
||||||
#endif
|
#endif
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 2
|
#if NUM_Z_STEPPERS >= 2
|
||||||
#if defined(Z2_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Z2)
|
#if defined(Z2_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Z2)
|
||||||
#define Z2_SENSORLESS 1
|
#define Z2_SENSORLESS 1
|
||||||
#endif
|
#endif
|
||||||
|
@ -2144,7 +2144,7 @@
|
||||||
#define Z2_SLAVE_ADDRESS 0
|
#define Z2_SLAVE_ADDRESS 0
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 3
|
#if NUM_Z_STEPPERS >= 3
|
||||||
#if defined(Z3_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Z3)
|
#if defined(Z3_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Z3)
|
||||||
#define Z3_SENSORLESS 1
|
#define Z3_SENSORLESS 1
|
||||||
#endif
|
#endif
|
||||||
|
@ -2161,7 +2161,7 @@
|
||||||
#define Z3_SLAVE_ADDRESS 0
|
#define Z3_SLAVE_ADDRESS 0
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 4
|
#if NUM_Z_STEPPERS >= 4
|
||||||
#if defined(Z4_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Z4)
|
#if defined(Z4_STALL_SENSITIVITY) && AXIS_HAS_STALLGUARD(Z4)
|
||||||
#define Z4_SENSORLESS 1
|
#define Z4_SENSORLESS 1
|
||||||
#endif
|
#endif
|
||||||
|
@ -2542,8 +2542,8 @@
|
||||||
#define IS_X2_ENDSTOP(A,M) (ENABLED(X_DUAL_ENDSTOPS) && X2_USE_ENDSTOP == _##A##M##_)
|
#define IS_X2_ENDSTOP(A,M) (ENABLED(X_DUAL_ENDSTOPS) && X2_USE_ENDSTOP == _##A##M##_)
|
||||||
#define IS_Y2_ENDSTOP(A,M) (ENABLED(Y_DUAL_ENDSTOPS) && Y2_USE_ENDSTOP == _##A##M##_)
|
#define IS_Y2_ENDSTOP(A,M) (ENABLED(Y_DUAL_ENDSTOPS) && Y2_USE_ENDSTOP == _##A##M##_)
|
||||||
#define IS_Z2_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && Z2_USE_ENDSTOP == _##A##M##_)
|
#define IS_Z2_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && Z2_USE_ENDSTOP == _##A##M##_)
|
||||||
#define IS_Z3_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 3 && Z3_USE_ENDSTOP == _##A##M##_)
|
#define IS_Z3_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPERS >= 3 && Z3_USE_ENDSTOP == _##A##M##_)
|
||||||
#define IS_Z4_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 4 && Z4_USE_ENDSTOP == _##A##M##_)
|
#define IS_Z4_ENDSTOP(A,M) (ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPERS >= 4 && Z4_USE_ENDSTOP == _##A##M##_)
|
||||||
|
|
||||||
#define _HAS_STOP(A,M) (PIN_EXISTS(A##_##M) && !IS_PROBE_PIN(A,M) && !IS_X2_ENDSTOP(A,M) && !IS_Y2_ENDSTOP(A,M) && !IS_Z2_ENDSTOP(A,M) && !IS_Z3_ENDSTOP(A,M) && !IS_Z4_ENDSTOP(A,M))
|
#define _HAS_STOP(A,M) (PIN_EXISTS(A##_##M) && !IS_PROBE_PIN(A,M) && !IS_X2_ENDSTOP(A,M) && !IS_Y2_ENDSTOP(A,M) && !IS_Z2_ENDSTOP(A,M) && !IS_Z3_ENDSTOP(A,M) && !IS_Z4_ENDSTOP(A,M))
|
||||||
#if _HAS_STOP(X,MIN)
|
#if _HAS_STOP(X,MIN)
|
||||||
|
|
|
@ -524,11 +524,11 @@
|
||||||
#elif defined(Z_QUAD_ENDSTOPS_ADJUSTMENT2) || defined(Z_QUAD_ENDSTOPS_ADJUSTMENT3) || defined(Z_QUAD_ENDSTOPS_ADJUSTMENT4)
|
#elif defined(Z_QUAD_ENDSTOPS_ADJUSTMENT2) || defined(Z_QUAD_ENDSTOPS_ADJUSTMENT3) || defined(Z_QUAD_ENDSTOPS_ADJUSTMENT4)
|
||||||
#error "Z_QUAD_ENDSTOPS_ADJUSTMENT[234] is now Z[234]_ENDSTOP_ADJUSTMENT."
|
#error "Z_QUAD_ENDSTOPS_ADJUSTMENT[234] is now Z[234]_ENDSTOP_ADJUSTMENT."
|
||||||
#elif defined(Z_DUAL_STEPPER_DRIVERS)
|
#elif defined(Z_DUAL_STEPPER_DRIVERS)
|
||||||
#error "Z_DUAL_STEPPER_DRIVERS is now NUM_Z_STEPPER_DRIVERS with a value of 2."
|
#error "Z_DUAL_STEPPER_DRIVERS is no longer needed and should be removed."
|
||||||
#elif defined(Z_TRIPLE_STEPPER_DRIVERS)
|
#elif defined(Z_TRIPLE_STEPPER_DRIVERS)
|
||||||
#error "Z_TRIPLE_STEPPER_DRIVERS is now NUM_Z_STEPPER_DRIVERS with a value of 3."
|
#error "Z_TRIPLE_STEPPER_DRIVERS is no longer needed and should be removed."
|
||||||
#elif defined(Z_QUAD_STEPPER_DRIVERS)
|
#elif defined(Z_QUAD_STEPPER_DRIVERS)
|
||||||
#error "Z_QUAD_STEPPER_DRIVERS is now NUM_Z_STEPPER_DRIVERS with a value of 4."
|
#error "Z_QUAD_STEPPER_DRIVERS is no longer needed and should be removed."
|
||||||
#elif defined(Z_DUAL_ENDSTOPS) || defined(Z_TRIPLE_ENDSTOPS) || defined(Z_QUAD_ENDSTOPS)
|
#elif defined(Z_DUAL_ENDSTOPS) || defined(Z_TRIPLE_ENDSTOPS) || defined(Z_QUAD_ENDSTOPS)
|
||||||
#error "Z_(DUAL|TRIPLE|QUAD)_ENDSTOPS is now Z_MULTI_ENDSTOPS."
|
#error "Z_(DUAL|TRIPLE|QUAD)_ENDSTOPS is now Z_MULTI_ENDSTOPS."
|
||||||
#elif defined(DUGS_UI_MOVE_DIS_OPTION)
|
#elif defined(DUGS_UI_MOVE_DIS_OPTION)
|
||||||
|
@ -621,6 +621,12 @@
|
||||||
#error "DWIN_CREALITY_LCD_ENHANCED is now DWIN_LCD_PROUI."
|
#error "DWIN_CREALITY_LCD_ENHANCED is now DWIN_LCD_PROUI."
|
||||||
#elif defined(LINEAR_AXES)
|
#elif defined(LINEAR_AXES)
|
||||||
#error "LINEAR_AXES is now NUM_AXES (to account for rotational axes)."
|
#error "LINEAR_AXES is now NUM_AXES (to account for rotational axes)."
|
||||||
|
#elif defined(X_DUAL_STEPPER_DRIVERS)
|
||||||
|
#error "X_DUAL_STEPPER_DRIVERS is no longer needed and should be removed."
|
||||||
|
#elif defined(Y_DUAL_STEPPER_DRIVERS)
|
||||||
|
#error "Y_DUAL_STEPPER_DRIVERS is no longer needed and should be removed."
|
||||||
|
#elif defined(NUM_Z_STEPPER_DRIVERS)
|
||||||
|
#error "NUM_Z_STEPPER_DRIVERS is no longer needed and should be removed."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
constexpr float arm[] = AXIS_RELATIVE_MODES;
|
constexpr float arm[] = AXIS_RELATIVE_MODES;
|
||||||
|
@ -737,27 +743,21 @@ static_assert(COUNT(arm) == LOGICAL_AXES, "AXIS_RELATIVE_MODES must contain " _L
|
||||||
* Multiple Stepper Drivers Per Axis
|
* Multiple Stepper Drivers Per Axis
|
||||||
*/
|
*/
|
||||||
#define GOOD_AXIS_PINS(A) (HAS_##A##_ENABLE && HAS_##A##_STEP && HAS_##A##_DIR)
|
#define GOOD_AXIS_PINS(A) (HAS_##A##_ENABLE && HAS_##A##_STEP && HAS_##A##_DIR)
|
||||||
#if ENABLED(X_DUAL_STEPPER_DRIVERS)
|
#if HAS_X2_STEPPER && !GOOD_AXIS_PINS(X)
|
||||||
#if ENABLED(DUAL_X_CARRIAGE)
|
#error "If X2_DRIVER_TYPE is defined, then X2 ENABLE/STEP/DIR pins are also needed."
|
||||||
#error "DUAL_X_CARRIAGE is not compatible with X_DUAL_STEPPER_DRIVERS."
|
|
||||||
#elif !GOOD_AXIS_PINS(X)
|
|
||||||
#error "X_DUAL_STEPPER_DRIVERS requires X2 pins to be defined."
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(Y_DUAL_STEPPER_DRIVERS) && !GOOD_AXIS_PINS(Y)
|
#if HAS_DUAL_Y_STEPPERS && !GOOD_AXIS_PINS(Y)
|
||||||
#error "Y_DUAL_STEPPER_DRIVERS requires Y2 pins to be defined."
|
#error "If Y2_DRIVER_TYPE is defined, then Y2 ENABLE/STEP/DIR pins are also needed."
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_Z_AXIS
|
#if HAS_Z_AXIS
|
||||||
#if !WITHIN(NUM_Z_STEPPER_DRIVERS, 1, 4)
|
#if NUM_Z_STEPPERS >= 2 && !GOOD_AXIS_PINS(Z2)
|
||||||
#error "NUM_Z_STEPPER_DRIVERS must be an integer from 1 to 4."
|
#error "If Z2_DRIVER_TYPE is defined, then Z2 ENABLE/STEP/DIR pins are also needed."
|
||||||
#elif NUM_Z_STEPPER_DRIVERS == 2 && !GOOD_AXIS_PINS(Z2)
|
#elif NUM_Z_STEPPERS >= 3 && !GOOD_AXIS_PINS(Z3)
|
||||||
#error "If NUM_Z_STEPPER_DRIVERS is 2, you must define stepper pins for Z2."
|
#error "If Z3_DRIVER_TYPE is defined, then Z3 ENABLE/STEP/DIR pins are also needed."
|
||||||
#elif NUM_Z_STEPPER_DRIVERS == 3 && !(GOOD_AXIS_PINS(Z2) && GOOD_AXIS_PINS(Z3))
|
#elif NUM_Z_STEPPERS >= 4 && !GOOD_AXIS_PINS(Z4)
|
||||||
#error "If NUM_Z_STEPPER_DRIVERS is 3, you must define stepper pins for Z2 and Z3."
|
#error "If Z4_DRIVER_TYPE is defined, then Z4 ENABLE/STEP/DIR pins are also needed."
|
||||||
#elif NUM_Z_STEPPER_DRIVERS == 4 && !(GOOD_AXIS_PINS(Z2) && GOOD_AXIS_PINS(Z3) && GOOD_AXIS_PINS(Z4))
|
|
||||||
#error "If NUM_Z_STEPPER_DRIVERS is 4, you must define stepper pins for Z2, Z3, and Z4."
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -2637,10 +2637,10 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
|
||||||
#error "Z_MULTI_ENDSTOPS is not compatible with DELTA."
|
#error "Z_MULTI_ENDSTOPS is not compatible with DELTA."
|
||||||
#elif !Z2_USE_ENDSTOP
|
#elif !Z2_USE_ENDSTOP
|
||||||
#error "Z2_USE_ENDSTOP must be set with Z_MULTI_ENDSTOPS."
|
#error "Z2_USE_ENDSTOP must be set with Z_MULTI_ENDSTOPS."
|
||||||
#elif !Z3_USE_ENDSTOP && NUM_Z_STEPPER_DRIVERS >= 3
|
#elif !Z3_USE_ENDSTOP && NUM_Z_STEPPERS >= 3
|
||||||
#error "Z3_USE_ENDSTOP must be set with Z_MULTI_ENDSTOPS and NUM_Z_STEPPER_DRIVERS >= 3."
|
#error "Z3_USE_ENDSTOP must be set with Z_MULTI_ENDSTOPS and Z3_DRIVER_TYPE."
|
||||||
#elif !Z4_USE_ENDSTOP && NUM_Z_STEPPER_DRIVERS >= 4
|
#elif !Z4_USE_ENDSTOP && NUM_Z_STEPPERS >= 4
|
||||||
#error "Z4_USE_ENDSTOP must be set with Z_MULTI_ENDSTOPS and NUM_Z_STEPPER_DRIVERS >= 4."
|
#error "Z4_USE_ENDSTOP must be set with Z_MULTI_ENDSTOPS and Z4_DRIVER_TYPE."
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -3701,14 +3701,14 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(Z_STEPPER_AUTO_ALIGN)
|
#if ENABLED(Z_STEPPER_AUTO_ALIGN)
|
||||||
#if NUM_Z_STEPPER_DRIVERS <= 1
|
#if NUM_Z_STEPPERS <= 1
|
||||||
#error "Z_STEPPER_AUTO_ALIGN requires NUM_Z_STEPPER_DRIVERS greater than 1."
|
#error "Z_STEPPER_AUTO_ALIGN requires more than one Z stepper."
|
||||||
#elif !HAS_BED_PROBE
|
#elif !HAS_BED_PROBE
|
||||||
#error "Z_STEPPER_AUTO_ALIGN requires a Z-bed probe."
|
#error "Z_STEPPER_AUTO_ALIGN requires a Z-bed probe."
|
||||||
#elif HAS_Z_STEPPER_ALIGN_STEPPER_XY
|
#elif HAS_Z_STEPPER_ALIGN_STEPPER_XY
|
||||||
static_assert(WITHIN(Z_STEPPER_ALIGN_AMP, 0.5, 2.0), "Z_STEPPER_ALIGN_AMP must be between 0.5 and 2.0.");
|
static_assert(WITHIN(Z_STEPPER_ALIGN_AMP, 0.5, 2.0), "Z_STEPPER_ALIGN_AMP must be between 0.5 and 2.0.");
|
||||||
#if NUM_Z_STEPPER_DRIVERS < 3
|
#if NUM_Z_STEPPERS < 3
|
||||||
#error "Z_STEPPER_ALIGN_STEPPER_XY requires NUM_Z_STEPPER_DRIVERS to be 3 or 4."
|
#error "Z_STEPPER_ALIGN_STEPPER_XY requires 3 or 4 Z steppers."
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -2090,7 +2090,7 @@ void SetPID(celsius_t t, heater_id_t h) {
|
||||||
DWIN_UpdateLCD();
|
DWIN_UpdateLCD();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if ENABLED(HAS_COLOR_LEDS)
|
#if HAS_COLOR_LEDS
|
||||||
void LiveLedColorR() { leds.color.r = MenuData.Value; HMI_data.Led_Color = leds.color; leds.update(); }
|
void LiveLedColorR() { leds.color.r = MenuData.Value; HMI_data.Led_Color = leds.color; leds.update(); }
|
||||||
void SetLedColorR() { SetIntOnClick(0, 255, leds.color.r, nullptr, LiveLedColorR); }
|
void SetLedColorR() { SetIntOnClick(0, 255, leds.color.r, nullptr, LiveLedColorR); }
|
||||||
void LiveLedColorG() { leds.color.g = MenuData.Value; HMI_data.Led_Color = leds.color; leds.update(); }
|
void LiveLedColorG() { leds.color.g = MenuData.Value; HMI_data.Led_Color = leds.color; leds.update(); }
|
||||||
|
@ -3260,7 +3260,7 @@ void Draw_GetColor_Menu() {
|
||||||
#if !BOTH(CASE_LIGHT_MENU, CASE_LIGHT_USE_NEOPIXEL)
|
#if !BOTH(CASE_LIGHT_MENU, CASE_LIGHT_USE_NEOPIXEL)
|
||||||
MENU_ITEM(ICON_LedControl, GET_TEXT_F(MSG_LEDS), onDrawLedStatus, SetLedStatus);
|
MENU_ITEM(ICON_LedControl, GET_TEXT_F(MSG_LEDS), onDrawLedStatus, SetLedStatus);
|
||||||
#endif
|
#endif
|
||||||
#if (HAS_COLOR_LEDS)
|
#if HAS_COLOR_LEDS
|
||||||
EDIT_ITEM(ICON_LedControl, GET_TEXT_F(MSG_COLORS_RED), onDrawPInt8Menu, SetLedColorR, &leds.color.r);
|
EDIT_ITEM(ICON_LedControl, GET_TEXT_F(MSG_COLORS_RED), onDrawPInt8Menu, SetLedColorR, &leds.color.r);
|
||||||
EDIT_ITEM(ICON_LedControl, GET_TEXT_F(MSG_COLORS_GREEN), onDrawPInt8Menu, SetLedColorG, &leds.color.g);
|
EDIT_ITEM(ICON_LedControl, GET_TEXT_F(MSG_COLORS_GREEN), onDrawPInt8Menu, SetLedColorG, &leds.color.g);
|
||||||
EDIT_ITEM(ICON_LedControl, GET_TEXT_F(MSG_COLORS_BLUE), onDrawPInt8Menu, SetLedColorB, &leds.color.b);
|
EDIT_ITEM(ICON_LedControl, GET_TEXT_F(MSG_COLORS_BLUE), onDrawPInt8Menu, SetLedColorB, &leds.color.b);
|
||||||
|
|
|
@ -69,8 +69,8 @@ uint8_t L64XX_Marlin::dir_commands[MAX_L64XX]; // array to hold direction comma
|
||||||
#define _EN_ITEM(N) , ENABLED(INVERT_E##N##_DIR)
|
#define _EN_ITEM(N) , ENABLED(INVERT_E##N##_DIR)
|
||||||
const uint8_t L64XX_Marlin::index_to_dir[MAX_L64XX] = {
|
const uint8_t L64XX_Marlin::index_to_dir[MAX_L64XX] = {
|
||||||
NUM_AXIS_LIST(ENABLED(INVERT_X_DIR), ENABLED(INVERT_Y_DIR), ENABLED(INVERT_Z_DIR), ENABLED(INVERT_I_DIR), ENABLED(INVERT_J_DIR), ENABLED(INVERT_K_DIR), ENABLED(INVERT_U_DIR), ENABLED(INVERT_V_DIR), ENABLED(INVERT_W_DIR))
|
NUM_AXIS_LIST(ENABLED(INVERT_X_DIR), ENABLED(INVERT_Y_DIR), ENABLED(INVERT_Z_DIR), ENABLED(INVERT_I_DIR), ENABLED(INVERT_J_DIR), ENABLED(INVERT_K_DIR), ENABLED(INVERT_U_DIR), ENABLED(INVERT_V_DIR), ENABLED(INVERT_W_DIR))
|
||||||
, ENABLED(INVERT_X_DIR) ^ BOTH(X_DUAL_STEPPER_DRIVERS, INVERT_X2_VS_X_DIR) // X2
|
, ENABLED(INVERT_X_DIR) ^ BOTH(HAS_DUAL_X_STEPPERS, INVERT_X2_VS_X_DIR) // X2
|
||||||
, ENABLED(INVERT_Y_DIR) ^ BOTH(Y_DUAL_STEPPER_DRIVERS, INVERT_Y2_VS_Y_DIR) // Y2
|
, ENABLED(INVERT_Y_DIR) ^ BOTH(HAS_DUAL_Y_STEPPERS, INVERT_Y2_VS_Y_DIR) // Y2
|
||||||
, ENABLED(INVERT_Z_DIR) ^ ENABLED(INVERT_Z2_VS_Z_DIR) // Z2
|
, ENABLED(INVERT_Z_DIR) ^ ENABLED(INVERT_Z2_VS_Z_DIR) // Z2
|
||||||
, ENABLED(INVERT_Z_DIR) ^ ENABLED(INVERT_Z3_VS_Z_DIR) // Z3
|
, ENABLED(INVERT_Z_DIR) ^ ENABLED(INVERT_Z3_VS_Z_DIR) // Z3
|
||||||
, ENABLED(INVERT_Z_DIR) ^ ENABLED(INVERT_Z4_VS_Z_DIR) // Z4
|
, ENABLED(INVERT_Z_DIR) ^ ENABLED(INVERT_Z4_VS_Z_DIR) // Z4
|
||||||
|
|
|
@ -78,9 +78,9 @@ Endstops::endstop_mask_t Endstops::live_state = 0;
|
||||||
#endif
|
#endif
|
||||||
#if ENABLED(Z_MULTI_ENDSTOPS)
|
#if ENABLED(Z_MULTI_ENDSTOPS)
|
||||||
float Endstops::z2_endstop_adj;
|
float Endstops::z2_endstop_adj;
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 3
|
#if NUM_Z_STEPPERS >= 3
|
||||||
float Endstops::z3_endstop_adj;
|
float Endstops::z3_endstop_adj;
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 4
|
#if NUM_Z_STEPPERS >= 4
|
||||||
float Endstops::z4_endstop_adj;
|
float Endstops::z4_endstop_adj;
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -792,14 +792,14 @@ void Endstops::update() {
|
||||||
#else
|
#else
|
||||||
COPY_LIVE_STATE(Z_MIN, Z2_MIN);
|
COPY_LIVE_STATE(Z_MIN, Z2_MIN);
|
||||||
#endif
|
#endif
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 3
|
#if NUM_Z_STEPPERS >= 3
|
||||||
#if HAS_Z3_MIN
|
#if HAS_Z3_MIN
|
||||||
UPDATE_ENDSTOP_BIT(Z3, MIN);
|
UPDATE_ENDSTOP_BIT(Z3, MIN);
|
||||||
#else
|
#else
|
||||||
COPY_LIVE_STATE(Z_MIN, Z3_MIN);
|
COPY_LIVE_STATE(Z_MIN, Z3_MIN);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 4
|
#if NUM_Z_STEPPERS >= 4
|
||||||
#if HAS_Z4_MIN
|
#if HAS_Z4_MIN
|
||||||
UPDATE_ENDSTOP_BIT(Z4, MIN);
|
UPDATE_ENDSTOP_BIT(Z4, MIN);
|
||||||
#else
|
#else
|
||||||
|
@ -824,14 +824,14 @@ void Endstops::update() {
|
||||||
#else
|
#else
|
||||||
COPY_LIVE_STATE(Z_MAX, Z2_MAX);
|
COPY_LIVE_STATE(Z_MAX, Z2_MAX);
|
||||||
#endif
|
#endif
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 3
|
#if NUM_Z_STEPPERS >= 3
|
||||||
#if HAS_Z3_MAX
|
#if HAS_Z3_MAX
|
||||||
UPDATE_ENDSTOP_BIT(Z3, MAX);
|
UPDATE_ENDSTOP_BIT(Z3, MAX);
|
||||||
#else
|
#else
|
||||||
COPY_LIVE_STATE(Z_MAX, Z3_MAX);
|
COPY_LIVE_STATE(Z_MAX, Z3_MAX);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 4
|
#if NUM_Z_STEPPERS >= 4
|
||||||
#if HAS_Z4_MAX
|
#if HAS_Z4_MAX
|
||||||
UPDATE_ENDSTOP_BIT(Z4, MAX);
|
UPDATE_ENDSTOP_BIT(Z4, MAX);
|
||||||
#else
|
#else
|
||||||
|
@ -1090,9 +1090,9 @@ void Endstops::update() {
|
||||||
|
|
||||||
#if DISABLED(Z_MULTI_ENDSTOPS)
|
#if DISABLED(Z_MULTI_ENDSTOPS)
|
||||||
#define PROCESS_ENDSTOP_Z(MINMAX) PROCESS_ENDSTOP(Z, MINMAX)
|
#define PROCESS_ENDSTOP_Z(MINMAX) PROCESS_ENDSTOP(Z, MINMAX)
|
||||||
#elif NUM_Z_STEPPER_DRIVERS == 4
|
#elif NUM_Z_STEPPERS == 4
|
||||||
#define PROCESS_ENDSTOP_Z(MINMAX) PROCESS_QUAD_ENDSTOP(Z, MINMAX)
|
#define PROCESS_ENDSTOP_Z(MINMAX) PROCESS_QUAD_ENDSTOP(Z, MINMAX)
|
||||||
#elif NUM_Z_STEPPER_DRIVERS == 3
|
#elif NUM_Z_STEPPERS == 3
|
||||||
#define PROCESS_ENDSTOP_Z(MINMAX) PROCESS_TRIPLE_ENDSTOP(Z, MINMAX)
|
#define PROCESS_ENDSTOP_Z(MINMAX) PROCESS_TRIPLE_ENDSTOP(Z, MINMAX)
|
||||||
#else
|
#else
|
||||||
#define PROCESS_ENDSTOP_Z(MINMAX) PROCESS_DUAL_ENDSTOP(Z, MINMAX)
|
#define PROCESS_ENDSTOP_Z(MINMAX) PROCESS_DUAL_ENDSTOP(Z, MINMAX)
|
||||||
|
|
|
@ -64,11 +64,11 @@ enum EndstopEnum : char {
|
||||||
#if ENABLED(Z_MULTI_ENDSTOPS)
|
#if ENABLED(Z_MULTI_ENDSTOPS)
|
||||||
_ES_ITEM(HAS_Z_MIN, Z2_MIN)
|
_ES_ITEM(HAS_Z_MIN, Z2_MIN)
|
||||||
_ES_ITEM(HAS_Z_MAX, Z2_MAX)
|
_ES_ITEM(HAS_Z_MAX, Z2_MAX)
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 3
|
#if NUM_Z_STEPPERS >= 3
|
||||||
_ES_ITEM(HAS_Z_MIN, Z3_MIN)
|
_ES_ITEM(HAS_Z_MIN, Z3_MIN)
|
||||||
_ES_ITEM(HAS_Z_MAX, Z3_MAX)
|
_ES_ITEM(HAS_Z_MAX, Z3_MAX)
|
||||||
#endif
|
#endif
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 4
|
#if NUM_Z_STEPPERS >= 4
|
||||||
_ES_ITEM(HAS_Z_MIN, Z4_MIN)
|
_ES_ITEM(HAS_Z_MIN, Z4_MIN)
|
||||||
_ES_ITEM(HAS_Z_MAX, Z4_MAX)
|
_ES_ITEM(HAS_Z_MAX, Z4_MAX)
|
||||||
#endif
|
#endif
|
||||||
|
@ -120,10 +120,10 @@ class Endstops {
|
||||||
#if ENABLED(Z_MULTI_ENDSTOPS)
|
#if ENABLED(Z_MULTI_ENDSTOPS)
|
||||||
static float z2_endstop_adj;
|
static float z2_endstop_adj;
|
||||||
#endif
|
#endif
|
||||||
#if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 3
|
#if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPERS >= 3
|
||||||
static float z3_endstop_adj;
|
static float z3_endstop_adj;
|
||||||
#endif
|
#endif
|
||||||
#if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 4
|
#if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPERS >= 4
|
||||||
static float z4_endstop_adj;
|
static float z4_endstop_adj;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -2038,7 +2038,7 @@ void prepare_line_to_destination() {
|
||||||
#if ENABLED(Z_MULTI_ENDSTOPS)
|
#if ENABLED(Z_MULTI_ENDSTOPS)
|
||||||
if (axis == Z_AXIS) {
|
if (axis == Z_AXIS) {
|
||||||
|
|
||||||
#if NUM_Z_STEPPER_DRIVERS == 2
|
#if NUM_Z_STEPPERS == 2
|
||||||
|
|
||||||
const float adj = ABS(endstops.z2_endstop_adj);
|
const float adj = ABS(endstops.z2_endstop_adj);
|
||||||
if (adj) {
|
if (adj) {
|
||||||
|
@ -2056,13 +2056,13 @@ void prepare_line_to_destination() {
|
||||||
|
|
||||||
adjustFunc_t lock[] = {
|
adjustFunc_t lock[] = {
|
||||||
stepper.set_z1_lock, stepper.set_z2_lock, stepper.set_z3_lock
|
stepper.set_z1_lock, stepper.set_z2_lock, stepper.set_z3_lock
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 4
|
#if NUM_Z_STEPPERS >= 4
|
||||||
, stepper.set_z4_lock
|
, stepper.set_z4_lock
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
float adj[] = {
|
float adj[] = {
|
||||||
0, endstops.z2_endstop_adj, endstops.z3_endstop_adj
|
0, endstops.z2_endstop_adj, endstops.z3_endstop_adj
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 4
|
#if NUM_Z_STEPPERS >= 4
|
||||||
, endstops.z4_endstop_adj
|
, endstops.z4_endstop_adj
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
@ -2081,7 +2081,7 @@ void prepare_line_to_destination() {
|
||||||
lock[1] = lock[2], adj[1] = adj[2];
|
lock[1] = lock[2], adj[1] = adj[2];
|
||||||
lock[2] = tempLock, adj[2] = tempAdj;
|
lock[2] = tempLock, adj[2] = tempAdj;
|
||||||
}
|
}
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 4
|
#if NUM_Z_STEPPERS >= 4
|
||||||
if (adj[3] < adj[2]) {
|
if (adj[3] < adj[2]) {
|
||||||
tempLock = lock[2], tempAdj = adj[2];
|
tempLock = lock[2], tempAdj = adj[2];
|
||||||
lock[2] = lock[3], adj[2] = adj[3];
|
lock[2] = lock[3], adj[2] = adj[3];
|
||||||
|
@ -2106,14 +2106,14 @@ void prepare_line_to_destination() {
|
||||||
// lock the second stepper for the final correction
|
// lock the second stepper for the final correction
|
||||||
(*lock[1])(true);
|
(*lock[1])(true);
|
||||||
do_homing_move(axis, adj[2] - adj[1]);
|
do_homing_move(axis, adj[2] - adj[1]);
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 4
|
#if NUM_Z_STEPPERS >= 4
|
||||||
// lock the third stepper for the final correction
|
// lock the third stepper for the final correction
|
||||||
(*lock[2])(true);
|
(*lock[2])(true);
|
||||||
do_homing_move(axis, adj[3] - adj[2]);
|
do_homing_move(axis, adj[3] - adj[2]);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 4
|
#if NUM_Z_STEPPERS >= 4
|
||||||
(*lock[3])(true);
|
(*lock[3])(true);
|
||||||
do_homing_move(axis, adj[2] - adj[3]);
|
do_homing_move(axis, adj[2] - adj[3]);
|
||||||
#endif
|
#endif
|
||||||
|
@ -2126,7 +2126,7 @@ void prepare_line_to_destination() {
|
||||||
stepper.set_z1_lock(false);
|
stepper.set_z1_lock(false);
|
||||||
stepper.set_z2_lock(false);
|
stepper.set_z2_lock(false);
|
||||||
stepper.set_z3_lock(false);
|
stepper.set_z3_lock(false);
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 4
|
#if NUM_Z_STEPPERS >= 4
|
||||||
stepper.set_z4_lock(false);
|
stepper.set_z4_lock(false);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -347,9 +347,9 @@ typedef struct SettingsDataStruct {
|
||||||
// Z_STEPPER_AUTO_ALIGN, HAS_Z_STEPPER_ALIGN_STEPPER_XY
|
// Z_STEPPER_AUTO_ALIGN, HAS_Z_STEPPER_ALIGN_STEPPER_XY
|
||||||
//
|
//
|
||||||
#if ENABLED(Z_STEPPER_AUTO_ALIGN)
|
#if ENABLED(Z_STEPPER_AUTO_ALIGN)
|
||||||
xy_pos_t z_stepper_align_xy[NUM_Z_STEPPER_DRIVERS]; // M422 S X Y
|
xy_pos_t z_stepper_align_xy[NUM_Z_STEPPERS]; // M422 S X Y
|
||||||
#if HAS_Z_STEPPER_ALIGN_STEPPER_XY
|
#if HAS_Z_STEPPER_ALIGN_STEPPER_XY
|
||||||
xy_pos_t z_stepper_align_stepper_xy[NUM_Z_STEPPER_DRIVERS]; // M422 W X Y
|
xy_pos_t z_stepper_align_stepper_xy[NUM_Z_STEPPERS]; // M422 W X Y
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1017,13 +1017,13 @@ void MarlinSettings::postprocess() {
|
||||||
EEPROM_WRITE(TERN(Y_DUAL_ENDSTOPS, endstops.y2_endstop_adj, dummyf)); // 1 float
|
EEPROM_WRITE(TERN(Y_DUAL_ENDSTOPS, endstops.y2_endstop_adj, dummyf)); // 1 float
|
||||||
EEPROM_WRITE(TERN(Z_MULTI_ENDSTOPS, endstops.z2_endstop_adj, dummyf)); // 1 float
|
EEPROM_WRITE(TERN(Z_MULTI_ENDSTOPS, endstops.z2_endstop_adj, dummyf)); // 1 float
|
||||||
|
|
||||||
#if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 3
|
#if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPERS >= 3
|
||||||
EEPROM_WRITE(endstops.z3_endstop_adj); // 1 float
|
EEPROM_WRITE(endstops.z3_endstop_adj); // 1 float
|
||||||
#else
|
#else
|
||||||
EEPROM_WRITE(dummyf);
|
EEPROM_WRITE(dummyf);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 4
|
#if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPERS >= 4
|
||||||
EEPROM_WRITE(endstops.z4_endstop_adj); // 1 float
|
EEPROM_WRITE(endstops.z4_endstop_adj); // 1 float
|
||||||
#else
|
#else
|
||||||
EEPROM_WRITE(dummyf);
|
EEPROM_WRITE(dummyf);
|
||||||
|
@ -1969,12 +1969,12 @@ void MarlinSettings::postprocess() {
|
||||||
EEPROM_READ(TERN(Y_DUAL_ENDSTOPS, endstops.y2_endstop_adj, dummyf)); // 1 float
|
EEPROM_READ(TERN(Y_DUAL_ENDSTOPS, endstops.y2_endstop_adj, dummyf)); // 1 float
|
||||||
EEPROM_READ(TERN(Z_MULTI_ENDSTOPS, endstops.z2_endstop_adj, dummyf)); // 1 float
|
EEPROM_READ(TERN(Z_MULTI_ENDSTOPS, endstops.z2_endstop_adj, dummyf)); // 1 float
|
||||||
|
|
||||||
#if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 3
|
#if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPERS >= 3
|
||||||
EEPROM_READ(endstops.z3_endstop_adj); // 1 float
|
EEPROM_READ(endstops.z3_endstop_adj); // 1 float
|
||||||
#else
|
#else
|
||||||
EEPROM_READ(dummyf);
|
EEPROM_READ(dummyf);
|
||||||
#endif
|
#endif
|
||||||
#if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPER_DRIVERS >= 4
|
#if ENABLED(Z_MULTI_ENDSTOPS) && NUM_Z_STEPPERS >= 4
|
||||||
EEPROM_READ(endstops.z4_endstop_adj); // 1 float
|
EEPROM_READ(endstops.z4_endstop_adj); // 1 float
|
||||||
#else
|
#else
|
||||||
EEPROM_READ(dummyf);
|
EEPROM_READ(dummyf);
|
||||||
|
@ -3042,13 +3042,13 @@ void MarlinSettings::reset() {
|
||||||
#define Z2_ENDSTOP_ADJUSTMENT 0
|
#define Z2_ENDSTOP_ADJUSTMENT 0
|
||||||
#endif
|
#endif
|
||||||
endstops.z2_endstop_adj = Z2_ENDSTOP_ADJUSTMENT;
|
endstops.z2_endstop_adj = Z2_ENDSTOP_ADJUSTMENT;
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 3
|
#if NUM_Z_STEPPERS >= 3
|
||||||
#ifndef Z3_ENDSTOP_ADJUSTMENT
|
#ifndef Z3_ENDSTOP_ADJUSTMENT
|
||||||
#define Z3_ENDSTOP_ADJUSTMENT 0
|
#define Z3_ENDSTOP_ADJUSTMENT 0
|
||||||
#endif
|
#endif
|
||||||
endstops.z3_endstop_adj = Z3_ENDSTOP_ADJUSTMENT;
|
endstops.z3_endstop_adj = Z3_ENDSTOP_ADJUSTMENT;
|
||||||
#endif
|
#endif
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 4
|
#if NUM_Z_STEPPERS >= 4
|
||||||
#ifndef Z4_ENDSTOP_ADJUSTMENT
|
#ifndef Z4_ENDSTOP_ADJUSTMENT
|
||||||
#define Z4_ENDSTOP_ADJUSTMENT 0
|
#define Z4_ENDSTOP_ADJUSTMENT 0
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -177,9 +177,9 @@ bool Stepper::abort_current_block;
|
||||||
|
|
||||||
#if EITHER(Z_MULTI_ENDSTOPS, Z_STEPPER_AUTO_ALIGN)
|
#if EITHER(Z_MULTI_ENDSTOPS, Z_STEPPER_AUTO_ALIGN)
|
||||||
bool Stepper::locked_Z_motor = false, Stepper::locked_Z2_motor = false
|
bool Stepper::locked_Z_motor = false, Stepper::locked_Z2_motor = false
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 3
|
#if NUM_Z_STEPPERS >= 3
|
||||||
, Stepper::locked_Z3_motor = false
|
, Stepper::locked_Z3_motor = false
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 4
|
#if NUM_Z_STEPPERS >= 4
|
||||||
, Stepper::locked_Z4_motor = false
|
, Stepper::locked_Z4_motor = false
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -365,7 +365,7 @@ xyze_int8_t Stepper::count_direction{0};
|
||||||
A##4_STEP_WRITE(V); \
|
A##4_STEP_WRITE(V); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#if ENABLED(X_DUAL_STEPPER_DRIVERS)
|
#if HAS_DUAL_X_STEPPERS
|
||||||
#define X_APPLY_DIR(v,Q) do{ X_DIR_WRITE(v); X2_DIR_WRITE((v) ^ ENABLED(INVERT_X2_VS_X_DIR)); }while(0)
|
#define X_APPLY_DIR(v,Q) do{ X_DIR_WRITE(v); X2_DIR_WRITE((v) ^ ENABLED(INVERT_X2_VS_X_DIR)); }while(0)
|
||||||
#if ENABLED(X_DUAL_ENDSTOPS)
|
#if ENABLED(X_DUAL_ENDSTOPS)
|
||||||
#define X_APPLY_STEP(v,Q) DUAL_ENDSTOP_APPLY_STEP(X,v)
|
#define X_APPLY_STEP(v,Q) DUAL_ENDSTOP_APPLY_STEP(X,v)
|
||||||
|
@ -386,7 +386,7 @@ xyze_int8_t Stepper::count_direction{0};
|
||||||
#define X_APPLY_STEP(v,Q) X_STEP_WRITE(v)
|
#define X_APPLY_STEP(v,Q) X_STEP_WRITE(v)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
|
#if HAS_DUAL_Y_STEPPERS
|
||||||
#define Y_APPLY_DIR(v,Q) do{ Y_DIR_WRITE(v); Y2_DIR_WRITE((v) ^ ENABLED(INVERT_Y2_VS_Y_DIR)); }while(0)
|
#define Y_APPLY_DIR(v,Q) do{ Y_DIR_WRITE(v); Y2_DIR_WRITE((v) ^ ENABLED(INVERT_Y2_VS_Y_DIR)); }while(0)
|
||||||
#if ENABLED(Y_DUAL_ENDSTOPS)
|
#if ENABLED(Y_DUAL_ENDSTOPS)
|
||||||
#define Y_APPLY_STEP(v,Q) DUAL_ENDSTOP_APPLY_STEP(Y,v)
|
#define Y_APPLY_STEP(v,Q) DUAL_ENDSTOP_APPLY_STEP(Y,v)
|
||||||
|
@ -398,7 +398,7 @@ xyze_int8_t Stepper::count_direction{0};
|
||||||
#define Y_APPLY_STEP(v,Q) Y_STEP_WRITE(v)
|
#define Y_APPLY_STEP(v,Q) Y_STEP_WRITE(v)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if NUM_Z_STEPPER_DRIVERS == 4
|
#if NUM_Z_STEPPERS == 4
|
||||||
#define Z_APPLY_DIR(v,Q) do{ \
|
#define Z_APPLY_DIR(v,Q) do{ \
|
||||||
Z_DIR_WRITE(v); Z2_DIR_WRITE((v) ^ ENABLED(INVERT_Z2_VS_Z_DIR)); \
|
Z_DIR_WRITE(v); Z2_DIR_WRITE((v) ^ ENABLED(INVERT_Z2_VS_Z_DIR)); \
|
||||||
Z3_DIR_WRITE((v) ^ ENABLED(INVERT_Z3_VS_Z_DIR)); Z4_DIR_WRITE((v) ^ ENABLED(INVERT_Z4_VS_Z_DIR)); \
|
Z3_DIR_WRITE((v) ^ ENABLED(INVERT_Z3_VS_Z_DIR)); Z4_DIR_WRITE((v) ^ ENABLED(INVERT_Z4_VS_Z_DIR)); \
|
||||||
|
@ -410,7 +410,7 @@ xyze_int8_t Stepper::count_direction{0};
|
||||||
#else
|
#else
|
||||||
#define Z_APPLY_STEP(v,Q) do{ Z_STEP_WRITE(v); Z2_STEP_WRITE(v); Z3_STEP_WRITE(v); Z4_STEP_WRITE(v); }while(0)
|
#define Z_APPLY_STEP(v,Q) do{ Z_STEP_WRITE(v); Z2_STEP_WRITE(v); Z3_STEP_WRITE(v); Z4_STEP_WRITE(v); }while(0)
|
||||||
#endif
|
#endif
|
||||||
#elif NUM_Z_STEPPER_DRIVERS == 3
|
#elif NUM_Z_STEPPERS == 3
|
||||||
#define Z_APPLY_DIR(v,Q) do{ \
|
#define Z_APPLY_DIR(v,Q) do{ \
|
||||||
Z_DIR_WRITE(v); Z2_DIR_WRITE((v) ^ ENABLED(INVERT_Z2_VS_Z_DIR)); Z3_DIR_WRITE((v) ^ ENABLED(INVERT_Z3_VS_Z_DIR)); \
|
Z_DIR_WRITE(v); Z2_DIR_WRITE((v) ^ ENABLED(INVERT_Z2_VS_Z_DIR)); Z3_DIR_WRITE((v) ^ ENABLED(INVERT_Z3_VS_Z_DIR)); \
|
||||||
}while(0)
|
}while(0)
|
||||||
|
@ -421,7 +421,7 @@ xyze_int8_t Stepper::count_direction{0};
|
||||||
#else
|
#else
|
||||||
#define Z_APPLY_STEP(v,Q) do{ Z_STEP_WRITE(v); Z2_STEP_WRITE(v); Z3_STEP_WRITE(v); }while(0)
|
#define Z_APPLY_STEP(v,Q) do{ Z_STEP_WRITE(v); Z2_STEP_WRITE(v); Z3_STEP_WRITE(v); }while(0)
|
||||||
#endif
|
#endif
|
||||||
#elif NUM_Z_STEPPER_DRIVERS == 2
|
#elif NUM_Z_STEPPERS == 2
|
||||||
#define Z_APPLY_DIR(v,Q) do{ Z_DIR_WRITE(v); Z2_DIR_WRITE((v) ^ ENABLED(INVERT_Z2_VS_Z_DIR)); }while(0)
|
#define Z_APPLY_DIR(v,Q) do{ Z_DIR_WRITE(v); Z2_DIR_WRITE((v) ^ ENABLED(INVERT_Z2_VS_Z_DIR)); }while(0)
|
||||||
#if ENABLED(Z_MULTI_ENDSTOPS)
|
#if ENABLED(Z_MULTI_ENDSTOPS)
|
||||||
#define Z_APPLY_STEP(v,Q) DUAL_ENDSTOP_APPLY_STEP(Z,v)
|
#define Z_APPLY_STEP(v,Q) DUAL_ENDSTOP_APPLY_STEP(Z,v)
|
||||||
|
@ -2613,19 +2613,19 @@ void Stepper::init() {
|
||||||
TERN_(HAS_X2_DIR, X2_DIR_INIT());
|
TERN_(HAS_X2_DIR, X2_DIR_INIT());
|
||||||
#if HAS_Y_DIR
|
#if HAS_Y_DIR
|
||||||
Y_DIR_INIT();
|
Y_DIR_INIT();
|
||||||
#if BOTH(Y_DUAL_STEPPER_DRIVERS, HAS_Y2_DIR)
|
#if BOTH(HAS_DUAL_Y_STEPPERS, HAS_Y2_DIR)
|
||||||
Y2_DIR_INIT();
|
Y2_DIR_INIT();
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#if HAS_Z_DIR
|
#if HAS_Z_DIR
|
||||||
Z_DIR_INIT();
|
Z_DIR_INIT();
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 2 && HAS_Z2_DIR
|
#if NUM_Z_STEPPERS >= 2 && HAS_Z2_DIR
|
||||||
Z2_DIR_INIT();
|
Z2_DIR_INIT();
|
||||||
#endif
|
#endif
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 3 && HAS_Z3_DIR
|
#if NUM_Z_STEPPERS >= 3 && HAS_Z3_DIR
|
||||||
Z3_DIR_INIT();
|
Z3_DIR_INIT();
|
||||||
#endif
|
#endif
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 4 && HAS_Z4_DIR
|
#if NUM_Z_STEPPERS >= 4 && HAS_Z4_DIR
|
||||||
Z4_DIR_INIT();
|
Z4_DIR_INIT();
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -2684,7 +2684,7 @@ void Stepper::init() {
|
||||||
#if HAS_Y_ENABLE
|
#if HAS_Y_ENABLE
|
||||||
Y_ENABLE_INIT();
|
Y_ENABLE_INIT();
|
||||||
if (!Y_ENABLE_ON) Y_ENABLE_WRITE(HIGH);
|
if (!Y_ENABLE_ON) Y_ENABLE_WRITE(HIGH);
|
||||||
#if BOTH(Y_DUAL_STEPPER_DRIVERS, HAS_Y2_ENABLE)
|
#if BOTH(HAS_DUAL_Y_STEPPERS, HAS_Y2_ENABLE)
|
||||||
Y2_ENABLE_INIT();
|
Y2_ENABLE_INIT();
|
||||||
if (!Y_ENABLE_ON) Y2_ENABLE_WRITE(HIGH);
|
if (!Y_ENABLE_ON) Y2_ENABLE_WRITE(HIGH);
|
||||||
#endif
|
#endif
|
||||||
|
@ -2692,15 +2692,15 @@ void Stepper::init() {
|
||||||
#if HAS_Z_ENABLE
|
#if HAS_Z_ENABLE
|
||||||
Z_ENABLE_INIT();
|
Z_ENABLE_INIT();
|
||||||
if (!Z_ENABLE_ON) Z_ENABLE_WRITE(HIGH);
|
if (!Z_ENABLE_ON) Z_ENABLE_WRITE(HIGH);
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 2 && HAS_Z2_ENABLE
|
#if NUM_Z_STEPPERS >= 2 && HAS_Z2_ENABLE
|
||||||
Z2_ENABLE_INIT();
|
Z2_ENABLE_INIT();
|
||||||
if (!Z_ENABLE_ON) Z2_ENABLE_WRITE(HIGH);
|
if (!Z_ENABLE_ON) Z2_ENABLE_WRITE(HIGH);
|
||||||
#endif
|
#endif
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 3 && HAS_Z3_ENABLE
|
#if NUM_Z_STEPPERS >= 3 && HAS_Z3_ENABLE
|
||||||
Z3_ENABLE_INIT();
|
Z3_ENABLE_INIT();
|
||||||
if (!Z_ENABLE_ON) Z3_ENABLE_WRITE(HIGH);
|
if (!Z_ENABLE_ON) Z3_ENABLE_WRITE(HIGH);
|
||||||
#endif
|
#endif
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 4 && HAS_Z4_ENABLE
|
#if NUM_Z_STEPPERS >= 4 && HAS_Z4_ENABLE
|
||||||
Z4_ENABLE_INIT();
|
Z4_ENABLE_INIT();
|
||||||
if (!Z_ENABLE_ON) Z4_ENABLE_WRITE(HIGH);
|
if (!Z_ENABLE_ON) Z4_ENABLE_WRITE(HIGH);
|
||||||
#endif
|
#endif
|
||||||
|
@ -2775,7 +2775,7 @@ void Stepper::init() {
|
||||||
|
|
||||||
// Init Step Pins
|
// Init Step Pins
|
||||||
#if HAS_X_STEP
|
#if HAS_X_STEP
|
||||||
#if EITHER(X_DUAL_STEPPER_DRIVERS, DUAL_X_CARRIAGE)
|
#if HAS_X2_STEPPER
|
||||||
X2_STEP_INIT();
|
X2_STEP_INIT();
|
||||||
X2_STEP_WRITE(INVERT_X_STEP_PIN);
|
X2_STEP_WRITE(INVERT_X_STEP_PIN);
|
||||||
#endif
|
#endif
|
||||||
|
@ -2783,7 +2783,7 @@ void Stepper::init() {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_Y_STEP
|
#if HAS_Y_STEP
|
||||||
#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
|
#if HAS_DUAL_Y_STEPPERS
|
||||||
Y2_STEP_INIT();
|
Y2_STEP_INIT();
|
||||||
Y2_STEP_WRITE(INVERT_Y_STEP_PIN);
|
Y2_STEP_WRITE(INVERT_Y_STEP_PIN);
|
||||||
#endif
|
#endif
|
||||||
|
@ -2791,15 +2791,15 @@ void Stepper::init() {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAS_Z_STEP
|
#if HAS_Z_STEP
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 2
|
#if NUM_Z_STEPPERS >= 2
|
||||||
Z2_STEP_INIT();
|
Z2_STEP_INIT();
|
||||||
Z2_STEP_WRITE(INVERT_Z_STEP_PIN);
|
Z2_STEP_WRITE(INVERT_Z_STEP_PIN);
|
||||||
#endif
|
#endif
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 3
|
#if NUM_Z_STEPPERS >= 3
|
||||||
Z3_STEP_INIT();
|
Z3_STEP_INIT();
|
||||||
Z3_STEP_WRITE(INVERT_Z_STEP_PIN);
|
Z3_STEP_WRITE(INVERT_Z_STEP_PIN);
|
||||||
#endif
|
#endif
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 4
|
#if NUM_Z_STEPPERS >= 4
|
||||||
Z4_STEP_INIT();
|
Z4_STEP_INIT();
|
||||||
Z4_STEP_WRITE(INVERT_Z_STEP_PIN);
|
Z4_STEP_WRITE(INVERT_Z_STEP_PIN);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -366,9 +366,9 @@ class Stepper {
|
||||||
#endif
|
#endif
|
||||||
#if EITHER(Z_MULTI_ENDSTOPS, Z_STEPPER_AUTO_ALIGN)
|
#if EITHER(Z_MULTI_ENDSTOPS, Z_STEPPER_AUTO_ALIGN)
|
||||||
static bool locked_Z_motor, locked_Z2_motor
|
static bool locked_Z_motor, locked_Z2_motor
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 3
|
#if NUM_Z_STEPPERS >= 3
|
||||||
, locked_Z3_motor
|
, locked_Z3_motor
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 4
|
#if NUM_Z_STEPPERS >= 4
|
||||||
, locked_Z4_motor
|
, locked_Z4_motor
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -570,18 +570,18 @@ class Stepper {
|
||||||
#if EITHER(Z_MULTI_ENDSTOPS, Z_STEPPER_AUTO_ALIGN)
|
#if EITHER(Z_MULTI_ENDSTOPS, Z_STEPPER_AUTO_ALIGN)
|
||||||
FORCE_INLINE static void set_z1_lock(const bool state) { locked_Z_motor = state; }
|
FORCE_INLINE static void set_z1_lock(const bool state) { locked_Z_motor = state; }
|
||||||
FORCE_INLINE static void set_z2_lock(const bool state) { locked_Z2_motor = state; }
|
FORCE_INLINE static void set_z2_lock(const bool state) { locked_Z2_motor = state; }
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 3
|
#if NUM_Z_STEPPERS >= 3
|
||||||
FORCE_INLINE static void set_z3_lock(const bool state) { locked_Z3_motor = state; }
|
FORCE_INLINE static void set_z3_lock(const bool state) { locked_Z3_motor = state; }
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 4
|
#if NUM_Z_STEPPERS >= 4
|
||||||
FORCE_INLINE static void set_z4_lock(const bool state) { locked_Z4_motor = state; }
|
FORCE_INLINE static void set_z4_lock(const bool state) { locked_Z4_motor = state; }
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
static void set_all_z_lock(const bool lock, const int8_t except=-1) {
|
static void set_all_z_lock(const bool lock, const int8_t except=-1) {
|
||||||
set_z1_lock(lock ^ (except == 0));
|
set_z1_lock(lock ^ (except == 0));
|
||||||
set_z2_lock(lock ^ (except == 1));
|
set_z2_lock(lock ^ (except == 1));
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 3
|
#if NUM_Z_STEPPERS >= 3
|
||||||
set_z3_lock(lock ^ (except == 2));
|
set_z3_lock(lock ^ (except == 2));
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 4
|
#if NUM_Z_STEPPERS >= 4
|
||||||
set_z4_lock(lock ^ (except == 3));
|
set_z4_lock(lock ^ (except == 3));
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -486,10 +486,10 @@
|
||||||
#ifndef Z2_USE_ENDSTOP
|
#ifndef Z2_USE_ENDSTOP
|
||||||
#define Z2_USE_ENDSTOP _ZSTOP_
|
#define Z2_USE_ENDSTOP _ZSTOP_
|
||||||
#endif
|
#endif
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 3 && !defined(Z3_USE_ENDSTOP)
|
#if NUM_Z_STEPPERS >= 3 && !defined(Z3_USE_ENDSTOP)
|
||||||
#define Z3_USE_ENDSTOP _ZSTOP_
|
#define Z3_USE_ENDSTOP _ZSTOP_
|
||||||
#endif
|
#endif
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 4 && !defined(Z4_USE_ENDSTOP)
|
#if NUM_Z_STEPPERS >= 4 && !defined(Z4_USE_ENDSTOP)
|
||||||
#define Z4_USE_ENDSTOP _ZSTOP_
|
#define Z4_USE_ENDSTOP _ZSTOP_
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@ -775,14 +775,14 @@
|
||||||
#define X2_MS3_PIN -1
|
#define X2_MS3_PIN -1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(Y_DUAL_STEPPER_DRIVERS) && !defined(Y2_DIAG_PIN) && !defined(Y2_STEP_PIN) && !PIN_EXISTS(Y2_CS_PIN)
|
#if HAS_DUAL_Y_STEPPERS && !defined(Y2_DIAG_PIN) && !defined(Y2_STEP_PIN) && !PIN_EXISTS(Y2_CS_PIN)
|
||||||
#define Z2_E_INDEX INCREMENT(Y2_E_INDEX)
|
#define Z2_E_INDEX INCREMENT(Y2_E_INDEX)
|
||||||
#else
|
#else
|
||||||
#define Z2_E_INDEX Y2_E_INDEX
|
#define Z2_E_INDEX Y2_E_INDEX
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// The Y2 axis, if any, should be the next open extruder port
|
// The Y2 axis, if any, should be the next open extruder port
|
||||||
#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
|
#if HAS_DUAL_Y_STEPPERS
|
||||||
#ifndef Y2_STEP_PIN
|
#ifndef Y2_STEP_PIN
|
||||||
#define Y2_STEP_PIN _EPIN(Y2_E_INDEX, STEP)
|
#define Y2_STEP_PIN _EPIN(Y2_E_INDEX, STEP)
|
||||||
#define Y2_DIR_PIN _EPIN(Y2_E_INDEX, DIR)
|
#define Y2_DIR_PIN _EPIN(Y2_E_INDEX, DIR)
|
||||||
|
@ -861,14 +861,14 @@
|
||||||
#define Y2_MS3_PIN -1
|
#define Y2_MS3_PIN -1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 2 && !defined(Z2_DIAG_PIN) && !defined(Z2_STEP_PIN) && !PIN_EXISTS(Z2_CS_PIN)
|
#if NUM_Z_STEPPERS >= 2 && !defined(Z2_DIAG_PIN) && !defined(Z2_STEP_PIN) && !PIN_EXISTS(Z2_CS_PIN)
|
||||||
#define Z3_E_INDEX INCREMENT(Z2_E_INDEX)
|
#define Z3_E_INDEX INCREMENT(Z2_E_INDEX)
|
||||||
#else
|
#else
|
||||||
#define Z3_E_INDEX Z2_E_INDEX
|
#define Z3_E_INDEX Z2_E_INDEX
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// The Z2 axis, if any, should be the next open extruder port
|
// The Z2 axis, if any, should be the next open extruder port
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 2
|
#if NUM_Z_STEPPERS >= 2
|
||||||
#ifndef Z2_STEP_PIN
|
#ifndef Z2_STEP_PIN
|
||||||
#define Z2_STEP_PIN _EPIN(Z2_E_INDEX, STEP)
|
#define Z2_STEP_PIN _EPIN(Z2_E_INDEX, STEP)
|
||||||
#define Z2_DIR_PIN _EPIN(Z2_E_INDEX, DIR)
|
#define Z2_DIR_PIN _EPIN(Z2_E_INDEX, DIR)
|
||||||
|
@ -947,14 +947,14 @@
|
||||||
#define Z2_MS3_PIN -1
|
#define Z2_MS3_PIN -1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 3 && !defined(Z3_DIAG_PIN) && !defined(Z3_STEP_PIN) && !PIN_EXISTS(Z3_CS_PIN)
|
#if NUM_Z_STEPPERS >= 3 && !defined(Z3_DIAG_PIN) && !defined(Z3_STEP_PIN) && !PIN_EXISTS(Z3_CS_PIN)
|
||||||
#define Z4_E_INDEX INCREMENT(Z3_E_INDEX)
|
#define Z4_E_INDEX INCREMENT(Z3_E_INDEX)
|
||||||
#else
|
#else
|
||||||
#define Z4_E_INDEX Z3_E_INDEX
|
#define Z4_E_INDEX Z3_E_INDEX
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// The Z3 axis, if any, should be the next open extruder port
|
// The Z3 axis, if any, should be the next open extruder port
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 3
|
#if NUM_Z_STEPPERS >= 3
|
||||||
#ifndef Z3_STEP_PIN
|
#ifndef Z3_STEP_PIN
|
||||||
#define Z3_STEP_PIN _EPIN(Z3_E_INDEX, STEP)
|
#define Z3_STEP_PIN _EPIN(Z3_E_INDEX, STEP)
|
||||||
#define Z3_DIR_PIN _EPIN(Z3_E_INDEX, DIR)
|
#define Z3_DIR_PIN _EPIN(Z3_E_INDEX, DIR)
|
||||||
|
@ -1033,14 +1033,14 @@
|
||||||
#define Z3_MS3_PIN -1
|
#define Z3_MS3_PIN -1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 4 && !defined(Z4_DIAG_PIN) && !defined(Z4_STEP_PIN) && !PIN_EXISTS(Z4_CS_PIN)
|
#if NUM_Z_STEPPERS >= 4 && !defined(Z4_DIAG_PIN) && !defined(Z4_STEP_PIN) && !PIN_EXISTS(Z4_CS_PIN)
|
||||||
#define I_E_INDEX INCREMENT(Z4_E_INDEX)
|
#define I_E_INDEX INCREMENT(Z4_E_INDEX)
|
||||||
#else
|
#else
|
||||||
#define I_E_INDEX Z4_E_INDEX
|
#define I_E_INDEX Z4_E_INDEX
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// The Z4 axis, if any, should be the next open extruder port
|
// The Z4 axis, if any, should be the next open extruder port
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 4
|
#if NUM_Z_STEPPERS >= 4
|
||||||
#ifndef Z4_STEP_PIN
|
#ifndef Z4_STEP_PIN
|
||||||
#define Z4_STEP_PIN _EPIN(Z4_E_INDEX, STEP)
|
#define Z4_STEP_PIN _EPIN(Z4_E_INDEX, STEP)
|
||||||
#define Z4_DIR_PIN _EPIN(Z4_E_INDEX, DIR)
|
#define Z4_DIR_PIN _EPIN(Z4_E_INDEX, DIR)
|
||||||
|
@ -1747,16 +1747,16 @@
|
||||||
#if DISABLED(Z_MULTI_ENDSTOPS) || Z_HOME_TO_MIN
|
#if DISABLED(Z_MULTI_ENDSTOPS) || Z_HOME_TO_MIN
|
||||||
#undef Z2_MAX_PIN
|
#undef Z2_MAX_PIN
|
||||||
#endif
|
#endif
|
||||||
#if DISABLED(Z_MULTI_ENDSTOPS) || NUM_Z_STEPPER_DRIVERS < 3 || Z_HOME_TO_MAX
|
#if DISABLED(Z_MULTI_ENDSTOPS) || NUM_Z_STEPPERS < 3 || Z_HOME_TO_MAX
|
||||||
#undef Z3_MIN_PIN
|
#undef Z3_MIN_PIN
|
||||||
#endif
|
#endif
|
||||||
#if DISABLED(Z_MULTI_ENDSTOPS) || NUM_Z_STEPPER_DRIVERS < 3 || Z_HOME_TO_MIN
|
#if DISABLED(Z_MULTI_ENDSTOPS) || NUM_Z_STEPPERS < 3 || Z_HOME_TO_MIN
|
||||||
#undef Z3_MAX_PIN
|
#undef Z3_MAX_PIN
|
||||||
#endif
|
#endif
|
||||||
#if DISABLED(Z_MULTI_ENDSTOPS) || NUM_Z_STEPPER_DRIVERS < 4 || Z_HOME_TO_MAX
|
#if DISABLED(Z_MULTI_ENDSTOPS) || NUM_Z_STEPPERS < 4 || Z_HOME_TO_MAX
|
||||||
#undef Z4_MIN_PIN
|
#undef Z4_MIN_PIN
|
||||||
#endif
|
#endif
|
||||||
#if DISABLED(Z_MULTI_ENDSTOPS) || NUM_Z_STEPPER_DRIVERS < 4 || Z_HOME_TO_MIN
|
#if DISABLED(Z_MULTI_ENDSTOPS) || NUM_Z_STEPPERS < 4 || Z_HOME_TO_MIN
|
||||||
#undef Z4_MAX_PIN
|
#undef Z4_MAX_PIN
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -31,8 +31,8 @@
|
||||||
|
|
||||||
#if HOTENDS > 2 || E_STEPPERS > 2
|
#if HOTENDS > 2 || E_STEPPERS > 2
|
||||||
#error "RL200v1 supports up to 2 hotends / E-steppers. Comment out this line to continue."
|
#error "RL200v1 supports up to 2 hotends / E-steppers. Comment out this line to continue."
|
||||||
#elif NUM_Z_STEPPER_DRIVERS != 2
|
#elif NUM_Z_STEPPERS != 2
|
||||||
#error "RL200 uses dual Z stepper motors. Set NUM_Z_STEPPER_DRIVERS to 2 or comment out this line to continue."
|
#error "RL200 uses dual Z stepper motors. Set NUM_Z_STEPPERS to 2 or comment out this line to continue."
|
||||||
#elif !(AXIS_DRIVER_TYPE_X(DRV8825) && AXIS_DRIVER_TYPE_Y(DRV8825) && AXIS_DRIVER_TYPE_Z(DRV8825) && AXIS_DRIVER_TYPE_Z2(DRV8825) && AXIS_DRIVER_TYPE_E0(DRV8825))
|
#elif !(AXIS_DRIVER_TYPE_X(DRV8825) && AXIS_DRIVER_TYPE_Y(DRV8825) && AXIS_DRIVER_TYPE_Z(DRV8825) && AXIS_DRIVER_TYPE_Z2(DRV8825) && AXIS_DRIVER_TYPE_E0(DRV8825))
|
||||||
#error "You must set ([XYZ]|Z2|E0)_DRIVER_TYPE to DRV8825 in Configuration.h for RL200."
|
#error "You must set ([XYZ]|Z2|E0)_DRIVER_TYPE to DRV8825 in Configuration.h for RL200."
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -118,7 +118,7 @@
|
||||||
#define Z_DIR_PIN 48
|
#define Z_DIR_PIN 48
|
||||||
#define Z_ENABLE_PIN 62
|
#define Z_ENABLE_PIN 62
|
||||||
|
|
||||||
#if NUM_Z_STEPPER_DRIVERS == 2
|
#if NUM_Z_STEPPERS == 2
|
||||||
#define Z2_STEP_PIN 26 // E0 connector
|
#define Z2_STEP_PIN 26 // E0 connector
|
||||||
#define Z2_DIR_PIN 28
|
#define Z2_DIR_PIN 28
|
||||||
#define Z2_ENABLE_PIN 24
|
#define Z2_ENABLE_PIN 24
|
||||||
|
|
|
@ -110,7 +110,7 @@
|
||||||
// This board have the option to use an extra TMC2209 stepper, one of the use could be as a second extruder.
|
// This board have the option to use an extra TMC2209 stepper, one of the use could be as a second extruder.
|
||||||
#if EXTRUDERS < 2
|
#if EXTRUDERS < 2
|
||||||
// TODO: Corregir aquí que cuando tenemos dos extrusores o lo que sea, utiliza los endstop que le sobran, osea los max, no hay Z2_endstop
|
// TODO: Corregir aquí que cuando tenemos dos extrusores o lo que sea, utiliza los endstop que le sobran, osea los max, no hay Z2_endstop
|
||||||
#if NUM_Z_STEPPER_DRIVERS > 1
|
#if NUM_Z_STEPPERS > 1
|
||||||
#define Z2_STOP_PIN 14
|
#define Z2_STOP_PIN 14
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -778,7 +778,7 @@
|
||||||
#define _X2_PINS
|
#define _X2_PINS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(Y_DUAL_STEPPER_DRIVERS)
|
#if HAS_DUAL_Y_STEPPERS
|
||||||
#if PIN_EXISTS(Y2_CS) && AXIS_HAS_SPI(Y2)
|
#if PIN_EXISTS(Y2_CS) && AXIS_HAS_SPI(Y2)
|
||||||
#define _Y2_CS Y2_CS_PIN,
|
#define _Y2_CS Y2_CS_PIN,
|
||||||
#else
|
#else
|
||||||
|
@ -804,7 +804,7 @@
|
||||||
#define _Y2_PINS
|
#define _Y2_PINS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 2
|
#if NUM_Z_STEPPERS >= 2
|
||||||
#if PIN_EXISTS(Z2_CS) && AXIS_HAS_SPI(Z2)
|
#if PIN_EXISTS(Z2_CS) && AXIS_HAS_SPI(Z2)
|
||||||
#define _Z2_CS Z2_CS_PIN,
|
#define _Z2_CS Z2_CS_PIN,
|
||||||
#else
|
#else
|
||||||
|
@ -830,7 +830,7 @@
|
||||||
#define _Z2_PINS
|
#define _Z2_PINS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 3
|
#if NUM_Z_STEPPERS >= 3
|
||||||
#if PIN_EXISTS(Z3_CS) && AXIS_HAS_SPI(Z3)
|
#if PIN_EXISTS(Z3_CS) && AXIS_HAS_SPI(Z3)
|
||||||
#define _Z3_CS Z3_CS_PIN,
|
#define _Z3_CS Z3_CS_PIN,
|
||||||
#else
|
#else
|
||||||
|
@ -856,7 +856,7 @@
|
||||||
#define _Z3_PINS
|
#define _Z3_PINS
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if NUM_Z_STEPPER_DRIVERS >= 4
|
#if NUM_Z_STEPPERS >= 4
|
||||||
#if PIN_EXISTS(Z4_CS) && AXIS_HAS_SPI(Z4)
|
#if PIN_EXISTS(Z4_CS) && AXIS_HAS_SPI(Z4)
|
||||||
#define _Z4_CS Z4_CS_PIN,
|
#define _Z4_CS Z4_CS_PIN,
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -22,7 +22,7 @@ exec_test $1 $2 "BigTreeTech GTR | 8 Extruders | Auto-Fan | Mixed TMC Drivers |
|
||||||
restore_configs
|
restore_configs
|
||||||
opt_set MOTHERBOARD BOARD_BTT_GTR_V1_0 SERIAL_PORT -1 \
|
opt_set MOTHERBOARD BOARD_BTT_GTR_V1_0 SERIAL_PORT -1 \
|
||||||
EXTRUDERS 5 TEMP_SENSOR_1 1 TEMP_SENSOR_2 1 TEMP_SENSOR_3 1 TEMP_SENSOR_4 1 \
|
EXTRUDERS 5 TEMP_SENSOR_1 1 TEMP_SENSOR_2 1 TEMP_SENSOR_3 1 TEMP_SENSOR_4 1 \
|
||||||
NUM_Z_STEPPER_DRIVERS 4 \
|
Z_DRIVER_TYPE A4988 Z2_DRIVER_TYPE A4988 Z3_DRIVER_TYPE A4988 Z4_DRIVER_TYPE A4988 \
|
||||||
DEFAULT_Kp_LIST '{ 22.2, 20.0, 21.0, 19.0, 18.0 }' DEFAULT_Ki_LIST '{ 1.08 }' DEFAULT_Kd_LIST '{ 114.0, 112.0, 110.0, 108.0 }'
|
DEFAULT_Kp_LIST '{ 22.2, 20.0, 21.0, 19.0, 18.0 }' DEFAULT_Ki_LIST '{ 1.08 }' DEFAULT_Kd_LIST '{ 114.0, 112.0, 110.0, 108.0 }'
|
||||||
opt_enable TOOLCHANGE_FILAMENT_SWAP TOOLCHANGE_MIGRATION_FEATURE TOOLCHANGE_FS_SLOW_FIRST_PRIME TOOLCHANGE_FS_PRIME_FIRST_USED \
|
opt_enable TOOLCHANGE_FILAMENT_SWAP TOOLCHANGE_MIGRATION_FEATURE TOOLCHANGE_FS_SLOW_FIRST_PRIME TOOLCHANGE_FS_PRIME_FIRST_USED \
|
||||||
PID_PARAMS_PER_HOTEND Z_MULTI_ENDSTOPS
|
PID_PARAMS_PER_HOTEND Z_MULTI_ENDSTOPS
|
||||||
|
|
|
@ -35,7 +35,7 @@ exec_test $1 $2 "RAMPS4DUE_EFB with ABL (Bilinear), ExtUI, S-Curve, many options
|
||||||
# RADDS with BLTouch, ABL(B), 3 x Z auto-align
|
# RADDS with BLTouch, ABL(B), 3 x Z auto-align
|
||||||
#
|
#
|
||||||
restore_configs
|
restore_configs
|
||||||
opt_set MOTHERBOARD BOARD_RADDS NUM_Z_STEPPER_DRIVERS 3
|
opt_set MOTHERBOARD BOARD_RADDS Z_DRIVER_TYPE A4988 Z2_DRIVER_TYPE A4988 Z3_DRIVER_TYPE A4988
|
||||||
opt_enable USE_XMAX_PLUG USE_YMAX_PLUG ENDSTOPPULLUPS BLTOUCH AUTO_BED_LEVELING_BILINEAR \
|
opt_enable USE_XMAX_PLUG USE_YMAX_PLUG ENDSTOPPULLUPS BLTOUCH AUTO_BED_LEVELING_BILINEAR \
|
||||||
Z_STEPPER_AUTO_ALIGN Z_STEPPER_ALIGN_STEPPER_XY Z_SAFE_HOMING
|
Z_STEPPER_AUTO_ALIGN Z_STEPPER_ALIGN_STEPPER_XY Z_SAFE_HOMING
|
||||||
pins_set ramps/RAMPS X_MAX_PIN -1
|
pins_set ramps/RAMPS X_MAX_PIN -1
|
||||||
|
|
|
@ -16,7 +16,6 @@ opt_set MOTHERBOARD BOARD_AGCM4_RAMPS_144 SERIAL_PORT -1 \
|
||||||
RESTORE_LEVELING_AFTER_G28 false \
|
RESTORE_LEVELING_AFTER_G28 false \
|
||||||
LCD_LANGUAGE it \
|
LCD_LANGUAGE it \
|
||||||
SDCARD_CONNECTION LCD \
|
SDCARD_CONNECTION LCD \
|
||||||
NUM_Z_STEPPER_DRIVERS 2 \
|
|
||||||
HOMING_BUMP_MM '{ 0, 0, 0 }'
|
HOMING_BUMP_MM '{ 0, 0, 0 }'
|
||||||
opt_enable ENDSTOP_INTERRUPTS_FEATURE S_CURVE_ACCELERATION BLTOUCH Z_MIN_PROBE_REPEATABILITY_TEST \
|
opt_enable ENDSTOP_INTERRUPTS_FEATURE S_CURVE_ACCELERATION BLTOUCH Z_MIN_PROBE_REPEATABILITY_TEST \
|
||||||
FILAMENT_RUNOUT_SENSOR G26_MESH_VALIDATION MESH_EDIT_GFX_OVERLAY Z_SAFE_HOMING \
|
FILAMENT_RUNOUT_SENSOR G26_MESH_VALIDATION MESH_EDIT_GFX_OVERLAY Z_SAFE_HOMING \
|
||||||
|
|
|
@ -39,7 +39,7 @@ exec_test $1 $2 "(No PWM)" "$3"
|
||||||
restore_configs
|
restore_configs
|
||||||
opt_set MOTHERBOARD BOARD_ZRIB_V52 \
|
opt_set MOTHERBOARD BOARD_ZRIB_V52 \
|
||||||
LCD_LANGUAGE pt REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 \
|
LCD_LANGUAGE pt REPRAPWORLD_KEYPAD_MOVE_STEP 10.0 \
|
||||||
EXTRUDERS 2 TEMP_SENSOR_1 1
|
EXTRUDERS 2 TEMP_SENSOR_1 1 X2_DRIVER_TYPE A4988
|
||||||
opt_enable USE_XMAX_PLUG DUAL_X_CARRIAGE REPRAPWORLD_KEYPAD
|
opt_enable USE_XMAX_PLUG DUAL_X_CARRIAGE REPRAPWORLD_KEYPAD
|
||||||
exec_test $1 $2 "ZRIB_V52 | DUAL_X_CARRIAGE" "$3"
|
exec_test $1 $2 "ZRIB_V52 | DUAL_X_CARRIAGE" "$3"
|
||||||
|
|
||||||
|
|
|
@ -51,10 +51,11 @@ opt_set MOTHERBOARD BOARD_RAMBO \
|
||||||
DEFAULT_MAX_ACCELERATION '{ 3000, 3000, 100 }' \
|
DEFAULT_MAX_ACCELERATION '{ 3000, 3000, 100 }' \
|
||||||
MANUAL_FEEDRATE '{ 50*60, 50*60, 4*60 }' \
|
MANUAL_FEEDRATE '{ 50*60, 50*60, 4*60 }' \
|
||||||
AXIS_RELATIVE_MODES '{ false, false, false }' \
|
AXIS_RELATIVE_MODES '{ false, false, false }' \
|
||||||
LEVEL_CORNERS_LEVELING_ORDER '{ LF, RF }'
|
LEVEL_CORNERS_LEVELING_ORDER '{ LF, RF }' \
|
||||||
|
X2_DRIVER_TYPE A4988 Y2_DRIVER_TYPE A4988
|
||||||
opt_enable USE_XMAX_PLUG USE_YMAX_PLUG USE_ZMAX_PLUG \
|
opt_enable USE_XMAX_PLUG USE_YMAX_PLUG USE_ZMAX_PLUG \
|
||||||
REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER REVERSE_ENCODER_DIRECTION SDSUPPORT EEPROM_SETTINGS \
|
REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER REVERSE_ENCODER_DIRECTION SDSUPPORT EEPROM_SETTINGS \
|
||||||
S_CURVE_ACCELERATION X_DUAL_STEPPER_DRIVERS X_DUAL_ENDSTOPS Y_DUAL_STEPPER_DRIVERS Y_DUAL_ENDSTOPS \
|
S_CURVE_ACCELERATION X_DUAL_ENDSTOPS Y_DUAL_ENDSTOPS \
|
||||||
ADAPTIVE_STEP_SMOOTHING CNC_COORDINATE_SYSTEMS GCODE_MOTION_MODES \
|
ADAPTIVE_STEP_SMOOTHING CNC_COORDINATE_SYSTEMS GCODE_MOTION_MODES \
|
||||||
LEVEL_BED_CORNERS LEVEL_CENTER_TOO
|
LEVEL_BED_CORNERS LEVEL_CENTER_TOO
|
||||||
opt_disable MIN_SOFTWARE_ENDSTOP_Z MAX_SOFTWARE_ENDSTOPS
|
opt_disable MIN_SOFTWARE_ENDSTOP_Z MAX_SOFTWARE_ENDSTOPS
|
||||||
|
|
|
@ -101,7 +101,7 @@ exec_test $1 $2 "Teensy 3.5/3.6 COREXZ | BACKLASH" "$3"
|
||||||
# Enable Dual Z with Dual Z endstops
|
# Enable Dual Z with Dual Z endstops
|
||||||
#
|
#
|
||||||
restore_configs
|
restore_configs
|
||||||
opt_set MOTHERBOARD BOARD_TEENSY35_36 NUM_Z_STEPPER_DRIVERS 2 Z2_MIN_PIN 2
|
opt_set MOTHERBOARD BOARD_TEENSY35_36 Z_DRIVER_TYPE A4988 Z2_DRIVER_TYPE A4988 Z2_MIN_PIN 2
|
||||||
opt_enable Z_MULTI_ENDSTOPS USE_XMAX_PLUG
|
opt_enable Z_MULTI_ENDSTOPS USE_XMAX_PLUG
|
||||||
pins_set ramps/RAMPS X_MAX_PIN -1
|
pins_set ramps/RAMPS X_MAX_PIN -1
|
||||||
exec_test $1 $2 "Dual Z with Dual Z endstops" "$3"
|
exec_test $1 $2 "Dual Z with Dual Z endstops" "$3"
|
||||||
|
|
|
@ -105,7 +105,7 @@ exec_test $1 $2 "Teensy 4.0/4.1 COREXZ" "$3"
|
||||||
# Enable Dual Z with Dual Z endstops
|
# Enable Dual Z with Dual Z endstops
|
||||||
#
|
#
|
||||||
restore_configs
|
restore_configs
|
||||||
opt_set MOTHERBOARD BOARD_TEENSY41 NUM_Z_STEPPER_DRIVERS 2 Z2_MIN_PIN 2
|
opt_set MOTHERBOARD BOARD_TEENSY41 Z_DRIVER_TYPE A4988 Z2_DRIVER_TYPE A4988 Z2_MIN_PIN 2
|
||||||
opt_enable Z_MULTI_ENDSTOPS USE_XMAX_PLUG
|
opt_enable Z_MULTI_ENDSTOPS USE_XMAX_PLUG
|
||||||
pins_set ramps/RAMPS X_MAX_PIN -1
|
pins_set ramps/RAMPS X_MAX_PIN -1
|
||||||
exec_test $1 $2 "Dual Z with Dual Z endstops" "$3"
|
exec_test $1 $2 "Dual Z with Dual Z endstops" "$3"
|
||||||
|
|
Loading…
Reference in a new issue