1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-30 23:30:16 +00:00

Move core conditionals earlier

This commit is contained in:
Scott Lahteine 2020-11-01 20:30:58 -06:00 committed by Scott Lahteine
parent 08717ef117
commit 82c1bac4e3
2 changed files with 49 additions and 47 deletions

View File

@ -26,16 +26,6 @@
* Conditionals that need to be set before Configuration_adv.h or pins.h * Conditionals that need to be set before Configuration_adv.h or pins.h
*/ */
// Kinematics
#if ENABLED(MORGAN_SCARA)
#define IS_SCARA 1
#define IS_KINEMATIC 1
#elif ENABLED(DELTA)
#define IS_KINEMATIC 1
#else
#define IS_CARTESIAN 1
#endif
// MKS_LCD12864 is a variant of MKS_MINI_12864 // MKS_LCD12864 is a variant of MKS_MINI_12864
#if ENABLED(MKS_LCD12864) #if ENABLED(MKS_LCD12864)
#define MKS_MINI_12864 #define MKS_MINI_12864
@ -888,6 +878,55 @@
#define BOOT_MARLIN_LOGO_SMALL #define BOOT_MARLIN_LOGO_SMALL
#endif #endif
/**
* CoreXY, CoreXZ, and CoreYZ - and their reverse
*/
#if EITHER(COREXY, COREYX)
#define CORE_IS_XY 1
#endif
#if EITHER(COREXZ, COREZX)
#define CORE_IS_XZ 1
#endif
#if EITHER(COREYZ, COREZY)
#define CORE_IS_YZ 1
#endif
#if CORE_IS_XY || CORE_IS_XZ || CORE_IS_YZ
#define IS_CORE 1
#endif
#if IS_CORE
#if CORE_IS_XY
#define CORE_AXIS_1 A_AXIS
#define CORE_AXIS_2 B_AXIS
#define NORMAL_AXIS Z_AXIS
#elif CORE_IS_XZ
#define CORE_AXIS_1 A_AXIS
#define NORMAL_AXIS Y_AXIS
#define CORE_AXIS_2 C_AXIS
#elif CORE_IS_YZ
#define NORMAL_AXIS X_AXIS
#define CORE_AXIS_1 B_AXIS
#define CORE_AXIS_2 C_AXIS
#endif
#define CORESIGN(n) (ANY(COREYX, COREZX, COREZY) ? (-(n)) : (n))
#elif ENABLED(MARKFORGED_XY)
// Markforged kinematics
#define CORE_AXIS_1 A_AXIS
#define CORE_AXIS_2 B_AXIS
#define NORMAL_AXIS Z_AXIS
#endif
#if ENABLED(MORGAN_SCARA)
#define IS_SCARA 1
#define IS_KINEMATIC 1
#elif ENABLED(DELTA)
#define IS_KINEMATIC 1
#else
#define IS_CARTESIAN 1
#if !IS_CORE
#define IS_FULL_CARTESIAN 1
#endif
#endif
// This flag indicates some kind of jerk storage is needed // This flag indicates some kind of jerk storage is needed
#if EITHER(CLASSIC_JERK, IS_KINEMATIC) #if EITHER(CLASSIC_JERK, IS_KINEMATIC)
#define HAS_CLASSIC_JERK 1 #define HAS_CLASSIC_JERK 1

View File

@ -120,43 +120,6 @@
#endif #endif
#endif #endif
/**
* CoreXY, CoreXZ, and CoreYZ - and their reverse
*/
#if EITHER(COREXY, COREYX)
#define CORE_IS_XY 1
#endif
#if EITHER(COREXZ, COREZX)
#define CORE_IS_XZ 1
#endif
#if EITHER(COREYZ, COREZY)
#define CORE_IS_YZ 1
#endif
#if CORE_IS_XY || CORE_IS_XZ || CORE_IS_YZ
#define IS_CORE 1
#endif
#if IS_CORE
#if CORE_IS_XY
#define CORE_AXIS_1 A_AXIS
#define CORE_AXIS_2 B_AXIS
#define NORMAL_AXIS Z_AXIS
#elif CORE_IS_XZ
#define CORE_AXIS_1 A_AXIS
#define NORMAL_AXIS Y_AXIS
#define CORE_AXIS_2 C_AXIS
#elif CORE_IS_YZ
#define NORMAL_AXIS X_AXIS
#define CORE_AXIS_1 B_AXIS
#define CORE_AXIS_2 C_AXIS
#endif
#define CORESIGN(n) (ANY(COREYX, COREZX, COREZY) ? (-(n)) : (n))
#elif ENABLED(MARKFORGED_XY)
// Markforged kinematics
#define CORE_AXIS_1 A_AXIS
#define CORE_AXIS_2 B_AXIS
#define NORMAL_AXIS Z_AXIS
#endif
// Calibration codes only for non-core axes // Calibration codes only for non-core axes
#if EITHER(BACKLASH_GCODE, CALIBRATION_GCODE) #if EITHER(BACKLASH_GCODE, CALIBRATION_GCODE)
#if EITHER(IS_CORE, MARKFORGED_XY) #if EITHER(IS_CORE, MARKFORGED_XY)