Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for COREYZ. Fixes for COREXY, COREXZ #3806

Merged
merged 4 commits into from
May 27, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions Marlin/Conditionals.h
Original file line number Diff line number Diff line change
Expand Up @@ -315,11 +315,17 @@
* CoreXY and CoreXZ
*/
#if ENABLED(COREXY)
#define CORE_AXIS_1 A_AXIS // XY from A + B
#define CORE_AXIS_2 B_AXIS
#define CORE_AXIS_3 Z_AXIS
#define NORMAL_AXIS Z_AXIS
#elif ENABLED(COREXZ)
#define CORE_AXIS_1 A_AXIS // XZ from A + C
#define CORE_AXIS_2 C_AXIS
#define CORE_AXIS_3 Y_AXIS
#define NORMAL_AXIS Y_AXIS
#elif ENABLED(COREYZ)
#define CORE_AXIS_1 B_AXIS // YZ from B + C
#define CORE_AXIS_2 C_AXIS
#define NORMAL_AXIS X_AXIS
#endif

/**
Expand Down
5 changes: 2 additions & 3 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -342,11 +342,10 @@

// @section machine

// Uncomment this option to enable CoreXY kinematics
// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics
//#define COREXY

// Uncomment this option to enable CoreXZ kinematics
//#define COREXZ
//#define COREYZ

// Enable this option for Toshiba steppers
//#define CONFIG_STEPPERS_TOSHIBA
Expand Down
10 changes: 10 additions & 0 deletions Marlin/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,16 @@

#endif

/**
* Don't set more than one kinematic type
*/
#if (ENABLED(DELTA) && (ENABLED(SCARA) || ENABLED(COREXY) || ENABLED(COREXZ) || ENABLED(COREYZ))) \
|| (ENABLED(SCARA) && (ENABLED(COREXY) || ENABLED(COREXZ) || ENABLED(COREYZ))) \
|| (ENABLED(COREXY) && (ENABLED(COREXZ) || ENABLED(COREYZ))) \
|| (ENABLED(COREXZ) && ENABLED(COREYZ))
#error "Please enable only one of DELTA, SCARA, COREXY, COREXZ, or COREYZ."
#endif

/**
* Allen Key Z probe requires Auto Bed Leveling grid and Delta
*/
Expand Down
22 changes: 11 additions & 11 deletions Marlin/endstops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,8 @@ void Endstops::update() {

#if ENABLED(COREXY) || ENABLED(COREXZ)
// Head direction in -X axis for CoreXY and CoreXZ bots.
// If Delta1 == -Delta2, the movement is only in Y or Z axis
if ((stepper.current_block->steps[A_AXIS] != stepper.current_block->steps[CORE_AXIS_2]) || (stepper.motor_direction(A_AXIS) == stepper.motor_direction(CORE_AXIS_2))) {
// If DeltaA == -DeltaB, the movement is only in Y or Z axis
if ((stepper.current_block->steps[CORE_AXIS_1] != stepper.current_block->steps[CORE_AXIS_2]) || (stepper.motor_direction(CORE_AXIS_1) == stepper.motor_direction(CORE_AXIS_2))) {
if (stepper.motor_direction(X_HEAD))
#else
if (stepper.motor_direction(X_AXIS)) // stepping along -X axis (regular Cartesian bot)
Expand Down Expand Up @@ -271,10 +271,10 @@ void Endstops::update() {
}
#endif

#if ENABLED(COREXY)
// Head direction in -Y axis for CoreXY bots.
// If DeltaX == DeltaY, the movement is only in X axis
if ((stepper.current_block->steps[A_AXIS] != stepper.current_block->steps[B_AXIS]) || (stepper.motor_direction(A_AXIS) != stepper.motor_direction(B_AXIS))) {
#if ENABLED(COREXY) || ENABLED(COREYZ)
// Head direction in -Y axis for CoreXY / CoreYZ bots.
// If DeltaA == DeltaB, the movement is only in X or Y axis
if ((stepper.current_block->steps[CORE_AXIS_1] != stepper.current_block->steps[CORE_AXIS_2]) || (stepper.motor_direction(CORE_AXIS_1) != stepper.motor_direction(CORE_AXIS_2))) {
if (stepper.motor_direction(Y_HEAD))
#else
if (stepper.motor_direction(Y_AXIS)) // -direction
Expand All @@ -289,14 +289,14 @@ void Endstops::update() {
UPDATE_ENDSTOP(Y, MAX);
#endif
}
#if ENABLED(COREXY)
#if ENABLED(COREXY) || ENABLED(COREYZ)
}
#endif

#if ENABLED(COREXZ)
// Head direction in -Z axis for CoreXZ bots.
// If DeltaX == DeltaZ, the movement is only in X axis
if ((stepper.current_block->steps[A_AXIS] != stepper.current_block->steps[C_AXIS]) || (stepper.motor_direction(A_AXIS) != stepper.motor_direction(C_AXIS))) {
#if ENABLED(COREXZ) || ENABLED(COREYZ)
// Head direction in -Z axis for CoreXZ or CoreYZ bots.
// If DeltaA == DeltaB, the movement is only in X or Y axis
if ((stepper.current_block->steps[CORE_AXIS_1] != stepper.current_block->steps[CORE_AXIS_2]) || (stepper.motor_direction(CORE_AXIS_1) != stepper.motor_direction(CORE_AXIS_2))) {
if (stepper.motor_direction(Z_HEAD))
#else
if (stepper.motor_direction(Z_AXIS))
Expand Down
5 changes: 2 additions & 3 deletions Marlin/example_configurations/Felix/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -324,11 +324,10 @@

// @section machine

// Uncomment this option to enable CoreXY kinematics
// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics
//#define COREXY

// Uncomment this option to enable CoreXZ kinematics
//#define COREXZ
//#define COREYZ

// Enable this option for Toshiba steppers
//#define CONFIG_STEPPERS_TOSHIBA
Expand Down
5 changes: 2 additions & 3 deletions Marlin/example_configurations/Felix/DUAL/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -322,11 +322,10 @@

// @section machine

// Uncomment this option to enable CoreXY kinematics
// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics
//#define COREXY

// Uncomment this option to enable CoreXZ kinematics
//#define COREXZ
//#define COREYZ

// Enable this option for Toshiba steppers
//#define CONFIG_STEPPERS_TOSHIBA
Expand Down
5 changes: 2 additions & 3 deletions Marlin/example_configurations/Hephestos/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -334,11 +334,10 @@

// @section machine

// Uncomment this option to enable CoreXY kinematics
// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics
//#define COREXY

// Uncomment this option to enable CoreXZ kinematics
//#define COREXZ
//#define COREYZ

// Enable this option for Toshiba steppers
//#define CONFIG_STEPPERS_TOSHIBA
Expand Down
5 changes: 2 additions & 3 deletions Marlin/example_configurations/Hephestos_2/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,10 @@

// @section machine

// Uncomment this option to enable CoreXY kinematics
// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics
//#define COREXY

// Uncomment this option to enable CoreXZ kinematics
//#define COREXZ
//#define COREYZ

// Enable this option for Toshiba steppers
//#define CONFIG_STEPPERS_TOSHIBA
Expand Down
5 changes: 2 additions & 3 deletions Marlin/example_configurations/K8200/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -359,11 +359,10 @@

// @section machine

// Uncomment this option to enable CoreXY kinematics
// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics
//#define COREXY

// Uncomment this option to enable CoreXZ kinematics
//#define COREXZ
//#define COREYZ

// Enable this option for Toshiba steppers
//#define CONFIG_STEPPERS_TOSHIBA
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,11 +342,10 @@

// @section machine

// Uncomment this option to enable CoreXY kinematics
// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics
//#define COREXY

// Uncomment this option to enable CoreXZ kinematics
//#define COREXZ
//#define COREYZ

// Enable this option for Toshiba steppers
//#define CONFIG_STEPPERS_TOSHIBA
Expand Down
5 changes: 2 additions & 3 deletions Marlin/example_configurations/RigidBot/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,10 @@

// @section machine

// Uncomment this option to enable CoreXY kinematics
// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics
//#define COREXY

// Uncomment this option to enable CoreXZ kinematics
//#define COREXZ
//#define COREYZ

// Enable this option for Toshiba steppers
//#define CONFIG_STEPPERS_TOSHIBA
Expand Down
5 changes: 2 additions & 3 deletions Marlin/example_configurations/SCARA/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -350,11 +350,10 @@

// @section machine

// Uncomment this option to enable CoreXY kinematics
// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics
//#define COREXY

// Uncomment this option to enable CoreXZ kinematics
//#define COREXZ
//#define COREYZ

// Enable this option for Toshiba steppers
//#define CONFIG_STEPPERS_TOSHIBA
Expand Down
5 changes: 2 additions & 3 deletions Marlin/example_configurations/TAZ4/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -363,11 +363,10 @@

// @section machine

// Uncomment this option to enable CoreXY kinematics
// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics
//#define COREXY

// Uncomment this option to enable CoreXZ kinematics
//#define COREXZ
//#define COREYZ

// Enable this option for Toshiba steppers
//#define CONFIG_STEPPERS_TOSHIBA
Expand Down
5 changes: 2 additions & 3 deletions Marlin/example_configurations/WITBOX/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -334,11 +334,10 @@

// @section machine

// Uncomment this option to enable CoreXY kinematics
// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics
//#define COREXY

// Uncomment this option to enable CoreXZ kinematics
//#define COREXZ
//#define COREYZ

// Enable this option for Toshiba steppers
//#define CONFIG_STEPPERS_TOSHIBA
Expand Down
5 changes: 2 additions & 3 deletions Marlin/example_configurations/adafruit/ST7565/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -342,11 +342,10 @@

// @section machine

// Uncomment this option to enable CoreXY kinematics
// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics
//#define COREXY

// Uncomment this option to enable CoreXZ kinematics
//#define COREXZ
//#define COREYZ

// Enable this option for Toshiba steppers
//#define CONFIG_STEPPERS_TOSHIBA
Expand Down
5 changes: 2 additions & 3 deletions Marlin/example_configurations/delta/biv2.5/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -342,11 +342,10 @@

// @section machine

// Uncomment this option to enable CoreXY kinematics
// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics
//#define COREXY

// Uncomment this option to enable CoreXZ kinematics
//#define COREXZ
//#define COREYZ

//===========================================================================
//============================== Delta Settings =============================
Expand Down
5 changes: 2 additions & 3 deletions Marlin/example_configurations/delta/generic/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -342,11 +342,10 @@

// @section machine

// Uncomment this option to enable CoreXY kinematics
// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics
//#define COREXY

// Uncomment this option to enable CoreXZ kinematics
//#define COREXZ
//#define COREYZ

//===========================================================================
//============================== Delta Settings =============================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -342,11 +342,10 @@

// @section machine

// Uncomment this option to enable CoreXY kinematics
// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics
//#define COREXY

// Uncomment this option to enable CoreXZ kinematics
//#define COREXZ
//#define COREYZ

//===========================================================================
//============================== Delta Settings =============================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,11 +331,10 @@

// @section machine

// Uncomment this option to enable CoreXY kinematics
// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics
//#define COREXY

// Uncomment this option to enable CoreXZ kinematics
//#define COREXZ
//#define COREYZ

//===========================================================================
//============================== Delta Settings =============================
Expand Down
5 changes: 2 additions & 3 deletions Marlin/example_configurations/delta/kossel_xl/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -340,11 +340,10 @@

// @section machine

// Uncomment this option to enable CoreXY kinematics
// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics
//#define COREXY

// Uncomment this option to enable CoreXZ kinematics
//#define COREXZ
//#define COREYZ

//===========================================================================
//============================== Delta Settings =============================
Expand Down
5 changes: 2 additions & 3 deletions Marlin/example_configurations/makibox/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -345,11 +345,10 @@

// @section machine

// Uncomment this option to enable CoreXY kinematics
// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics
//#define COREXY

// Uncomment this option to enable CoreXZ kinematics
//#define COREXZ
//#define COREYZ

// Enable this option for Toshiba steppers
//#define CONFIG_STEPPERS_TOSHIBA
Expand Down
5 changes: 2 additions & 3 deletions Marlin/example_configurations/tvrrug/Round2/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -332,11 +332,10 @@

// @section machine

// Uncomment this option to enable CoreXY kinematics
// Uncomment one of these options to enable CoreXY, CoreXZ, or CoreYZ kinematics
//#define COREXY

// Uncomment this option to enable CoreXZ kinematics
//#define COREXZ
//#define COREYZ

// Enable this option for Toshiba steppers
#define CONFIG_STEPPERS_TOSHIBA
Expand Down
Loading