Jonathan Gilbert
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
7 additions and
18 deletions
-
Marlin/src/module/motion.cpp
|
@ -1534,24 +1534,13 @@ void homeaxis(const AxisEnum axis) { |
|
|
// Only Z homing (with probe) is permitted
|
|
|
// Only Z homing (with probe) is permitted
|
|
|
if (axis != Z_AXIS) { BUZZ(100, 880); return; } |
|
|
if (axis != Z_AXIS) { BUZZ(100, 880); return; } |
|
|
#else |
|
|
#else |
|
|
#define _CAN_HOME(A) \ |
|
|
#define _CAN_HOME(A) (axis == _AXIS(A) && ( \ |
|
|
(axis == _AXIS(A) && ((A##_MIN_PIN > -1 && A##_HOME_DIR < 0) || (A##_MAX_PIN > -1 && A##_HOME_DIR > 0))) |
|
|
ENABLED(A##_SPI_SENSORLESS) \ |
|
|
#if X_SPI_SENSORLESS |
|
|
|| (_AXIS(A) == Z_AXIS && ENABLED(HOMING_Z_WITH_PROBE)) \ |
|
|
#define CAN_HOME_X true |
|
|
|| (A##_MIN_PIN > 0 && A##_HOME_DIR < 0) \ |
|
|
#else |
|
|
|| (A##_MAX_PIN > 0 && A##_HOME_DIR > 0) \ |
|
|
#define CAN_HOME_X _CAN_HOME(X) |
|
|
)) |
|
|
#endif |
|
|
if (!_CAN_HOME(X) && !_CAN_HOME(Y) && !_CAN_HOME(Z)) return; |
|
|
#if Y_SPI_SENSORLESS |
|
|
|
|
|
#define CAN_HOME_Y true |
|
|
|
|
|
#else |
|
|
|
|
|
#define CAN_HOME_Y _CAN_HOME(Y) |
|
|
|
|
|
#endif |
|
|
|
|
|
#if Z_SPI_SENSORLESS |
|
|
|
|
|
#define CAN_HOME_Z true |
|
|
|
|
|
#else |
|
|
|
|
|
#define CAN_HOME_Z _CAN_HOME(Z) |
|
|
|
|
|
#endif |
|
|
|
|
|
if (!CAN_HOME_X && !CAN_HOME_Y && !CAN_HOME_Z) return; |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR(">>> homeaxis(", axis_codes[axis], ")"); |
|
|
if (DEBUGGING(LEVELING)) DEBUG_ECHOLNPAIR(">>> homeaxis(", axis_codes[axis], ")"); |
|
|