Skip to content

Commit 93c61b1

Browse files
committed
🩹 Misc. extra axis updates
1 parent 87d7449 commit 93c61b1

File tree

2 files changed

+42
-30
lines changed

2 files changed

+42
-30
lines changed

Marlin/src/inc/Conditionals_post.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,22 +190,22 @@
190190
#define XY_CENTER { X_CENTER, Y_CENTER }
191191
#endif
192192
#if HAS_I_AXIS
193-
#define I_CENTER TERN(BED_CENTER_AT_0_0, 0, _I_HALF_BED)
193+
#define I_CENTER _I_HALF_BED
194194
#endif
195195
#if HAS_J_AXIS
196-
#define J_CENTER TERN(BED_CENTER_AT_0_0, 0, _J_HALF_BED)
196+
#define J_CENTER _J_HALF_BED
197197
#endif
198198
#if HAS_K_AXIS
199-
#define K_CENTER TERN(BED_CENTER_AT_0_0, 0, _K_HALF_BED)
199+
#define K_CENTER _K_HALF_BED
200200
#endif
201201
#if HAS_U_AXIS
202-
#define U_CENTER TERN(BED_CENTER_AT_0_0, 0, _U_HALF_BED)
202+
#define U_CENTER _U_HALF_BED
203203
#endif
204204
#if HAS_V_AXIS
205-
#define V_CENTER TERN(BED_CENTER_AT_0_0, 0, _V_HALF_BED)
205+
#define V_CENTER _V_HALF_BED
206206
#endif
207207
#if HAS_W_AXIS
208-
#define W_CENTER TERN(BED_CENTER_AT_0_0, 0, _W_HALF_BED)
208+
#define W_CENTER _W_HALF_BED
209209
#endif
210210

211211
// Get the linear boundaries of the bed

Marlin/src/inc/SanityCheck.h

Lines changed: 36 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1552,30 +1552,32 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
15521552
#endif
15531553

15541554
/**
1555-
* Features that require a min/max/specific NUM_AXES
1555+
* Features that require a min/max/specific steppers / axes to be enabled.
15561556
*/
15571557
#if HAS_LEVELING && !HAS_Z_AXIS
15581558
#error "Leveling in Marlin requires three or more axes, with Z as the vertical axis."
15591559
#elif ENABLED(CNC_WORKSPACE_PLANES) && !HAS_Z_AXIS
1560-
#error "CNC_WORKSPACE_PLANES currently requires NUM_AXES >= 3"
1560+
#error "CNC_WORKSPACE_PLANES currently requires a Z axis"
15611561
#elif ENABLED(DIRECT_STEPPING) && NUM_AXES > XYZ
1562-
#error "DIRECT_STEPPING currently requires NUM_AXES 3"
1563-
#elif ENABLED(FOAMCUTTER_XYUV) && NUM_AXES < 5
1564-
#error "FOAMCUTTER_XYUV requires NUM_AXES >= 5."
1562+
#error "DIRECT_STEPPING does not currently support more than 3 axes (i.e., XYZ)."
1563+
#elif ENABLED(FOAMCUTTER_XYUV) && !(HAS_I_AXIS && HAS_J_AXIS)
1564+
#error "FOAMCUTTER_XYUV requires I and J steppers to be enabled."
15651565
#elif ENABLED(LINEAR_ADVANCE) && HAS_I_AXIS
1566-
#error "LINEAR_ADVANCE currently requires NUM_AXES <= 3."
1566+
#error "LINEAR_ADVANCE does not currently support the inclusion of an I axis."
15671567
#endif
15681568

15691569
/**
15701570
* Allow only extra axis codes that do not conflict with G-code parameter names
15711571
*/
15721572
#if HAS_I_AXIS
15731573
#if !defined(I_MIN_POS) || !defined(I_MAX_POS)
1574-
#error "I_MIN_POS and I_MAX_POS are required with NUM_AXES >= 4."
1574+
#error "I_MIN_POS and I_MAX_POS are required for the I axis."
15751575
#elif !defined(I_HOME_DIR)
1576-
#error "I_HOME_DIR is required with NUM_AXES >= 4."
1576+
#error "I_HOME_DIR is required for the I axis."
15771577
#elif HAS_I_ENABLE && !defined(I_ENABLE_ON)
1578-
#error "I_ENABLE_ON is required for your I driver with NUM_AXES >= 4."
1578+
#error "I_ENABLE_ON is required for the I stepper."
1579+
#elif !defined(INVERT_I_DIR)
1580+
#error "INVERT_I_DIR is required for the I stepper."
15791581
#endif
15801582
#endif
15811583
#if HAS_J_AXIS
@@ -1584,11 +1586,13 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
15841586
#elif ENABLED(AXIS5_ROTATES) && DISABLED(AXIS4_ROTATES)
15851587
#error "AXIS5_ROTATES requires AXIS4_ROTATES."
15861588
#elif !defined(J_MIN_POS) || !defined(J_MAX_POS)
1587-
#error "J_MIN_POS and J_MAX_POS are required with NUM_AXES >= 5."
1589+
#error "J_MIN_POS and J_MAX_POS are required for the J axis."
15881590
#elif !defined(J_HOME_DIR)
1589-
#error "J_HOME_DIR is required with NUM_AXES >= 5."
1591+
#error "J_HOME_DIR is required for the J axis."
15901592
#elif HAS_J_ENABLE && !defined(J_ENABLE_ON)
1591-
#error "J_ENABLE_ON is required for your J driver with NUM_AXES >= 5."
1593+
#error "J_ENABLE_ON is required for the J stepper."
1594+
#elif !defined(INVERT_J_DIR)
1595+
#error "INVERT_J_DIR is required for the J stepper."
15921596
#endif
15931597
#endif
15941598
#if HAS_K_AXIS
@@ -1597,11 +1601,13 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
15971601
#elif ENABLED(AXIS6_ROTATES) && DISABLED(AXIS5_ROTATES)
15981602
#error "AXIS6_ROTATES requires AXIS5_ROTATES."
15991603
#elif !defined(K_MIN_POS) || !defined(K_MAX_POS)
1600-
#error "K_MIN_POS and K_MAX_POS are required with NUM_AXES >= 6."
1604+
#error "K_MIN_POS and K_MAX_POS are required for the K axis."
16011605
#elif !defined(K_HOME_DIR)
1602-
#error "K_HOME_DIR is required with NUM_AXES >= 6."
1606+
#error "K_HOME_DIR is required for the K axis."
16031607
#elif HAS_K_ENABLE && !defined(K_ENABLE_ON)
1604-
#error "K_ENABLE_ON is required for your K driver with NUM_AXES >= 6."
1608+
#error "K_ENABLE_ON is required for the K stepper."
1609+
#elif !defined(INVERT_K_DIR)
1610+
#error "INVERT_K_DIR is required for the K stepper."
16051611
#endif
16061612
#endif
16071613
#if HAS_U_AXIS
@@ -1610,11 +1616,13 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
16101616
#elif ENABLED(AXIS7_ROTATES) && DISABLED(AXIS6_ROTATES)
16111617
#error "AXIS7_ROTATES requires AXIS6_ROTATES."
16121618
#elif !defined(U_MIN_POS) || !defined(U_MAX_POS)
1613-
#error "U_MIN_POS and U_MAX_POS are required with NUM_AXES >= 7."
1619+
#error "U_MIN_POS and U_MAX_POS are required for the U axis."
16141620
#elif !defined(U_HOME_DIR)
1615-
#error "U_HOME_DIR is required with NUM_AXES >= 7."
1621+
#error "U_HOME_DIR is required for the U axis."
16161622
#elif HAS_U_ENABLE && !defined(U_ENABLE_ON)
1617-
#error "U_ENABLE_ON is required for your U driver with NUM_AXES >= 7."
1623+
#error "U_ENABLE_ON is required for the U stepper."
1624+
#elif !defined(INVERT_U_DIR)
1625+
#error "INVERT_U_DIR is required for the U stepper."
16181626
#endif
16191627
#endif
16201628
#if HAS_V_AXIS
@@ -1623,11 +1631,13 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
16231631
#elif ENABLED(AXIS8_ROTATES) && DISABLED(AXIS7_ROTATES)
16241632
#error "AXIS8_ROTATES requires AXIS7_ROTATES."
16251633
#elif !defined(V_MIN_POS) || !defined(V_MAX_POS)
1626-
#error "V_MIN_POS and V_MAX_POS are required with NUM_AXES >= 8."
1634+
#error "V_MIN_POS and V_MAX_POS are required for the V axis."
16271635
#elif !defined(V_HOME_DIR)
1628-
#error "V_HOME_DIR is required with NUM_AXES >= 8."
1636+
#error "V_HOME_DIR is required for the V axis."
16291637
#elif HAS_V_ENABLE && !defined(V_ENABLE_ON)
1630-
#error "V_ENABLE_ON is required for your V driver with NUM_AXES >= 8."
1638+
#error "V_ENABLE_ON is required for the V stepper."
1639+
#elif !defined(INVERT_V_DIR)
1640+
#error "INVERT_V_DIR is required for the V stepper."
16311641
#endif
16321642
#endif
16331643
#if HAS_W_AXIS
@@ -1636,11 +1646,13 @@ static_assert(X_MAX_LENGTH >= X_BED_SIZE, "Movement bounds (X_MIN_POS, X_MAX_POS
16361646
#elif ENABLED(AXIS9_ROTATES) && DISABLED(AXIS8_ROTATES)
16371647
#error "AXIS9_ROTATES requires AXIS8_ROTATES."
16381648
#elif !defined(W_MIN_POS) || !defined(W_MAX_POS)
1639-
#error "W_MIN_POS and W_MAX_POS are required with NUM_AXES >= 9."
1649+
#error "W_MIN_POS and W_MAX_POS are required for the W axis."
16401650
#elif !defined(W_HOME_DIR)
1641-
#error "W_HOME_DIR is required with NUM_AXES >= 9."
1651+
#error "W_HOME_DIR is required for the W axis."
16421652
#elif HAS_W_ENABLE && !defined(W_ENABLE_ON)
1643-
#error "W_ENABLE_ON is required for your W driver with NUM_AXES >= 9."
1653+
#error "W_ENABLE_ON is required for the W stepper."
1654+
#elif !defined(INVERT_W_DIR)
1655+
#error "INVERT_W_DIR is required for the W stepper."
16441656
#endif
16451657
#endif
16461658

0 commit comments

Comments
 (0)