|
@@ -1050,13 +1050,16 @@ inline float get_homing_bump_feedrate(const AxisEnum axis) {
|
1050
|
1050
|
* Set sensorless homing if the axis has it, accounting for Core Kinematics.
|
1051
|
1051
|
*/
|
1052
|
1052
|
sensorless_t start_sensorless_homing_per_axis(const AxisEnum axis) {
|
1053
|
|
- sensorless_t stealth_states { false, false, false };
|
|
1053
|
+ sensorless_t stealth_states { false, false, false, false, false, false, false };
|
1054
|
1054
|
|
1055
|
1055
|
switch (axis) {
|
1056
|
1056
|
default: break;
|
1057
|
1057
|
#if X_SENSORLESS
|
1058
|
1058
|
case X_AXIS:
|
1059
|
1059
|
stealth_states.x = tmc_enable_stallguard(stepperX);
|
|
1060
|
+ #if AXIS_HAS_STALLGUARD(X2)
|
|
1061
|
+ stealth_states.x2 = tmc_enable_stallguard(stepperX2);
|
|
1062
|
+ #endif
|
1060
|
1063
|
#if CORE_IS_XY && Y_SENSORLESS
|
1061
|
1064
|
stealth_states.y = tmc_enable_stallguard(stepperY);
|
1062
|
1065
|
#elif CORE_IS_XZ && Z_SENSORLESS
|
|
@@ -1067,6 +1070,9 @@ inline float get_homing_bump_feedrate(const AxisEnum axis) {
|
1067
|
1070
|
#if Y_SENSORLESS
|
1068
|
1071
|
case Y_AXIS:
|
1069
|
1072
|
stealth_states.y = tmc_enable_stallguard(stepperY);
|
|
1073
|
+ #if AXIS_HAS_STALLGUARD(Y2)
|
|
1074
|
+ stealth_states.y2 = tmc_enable_stallguard(stepperY2);
|
|
1075
|
+ #endif
|
1070
|
1076
|
#if CORE_IS_XY && X_SENSORLESS
|
1071
|
1077
|
stealth_states.x = tmc_enable_stallguard(stepperX);
|
1072
|
1078
|
#elif CORE_IS_YZ && Z_SENSORLESS
|
|
@@ -1077,6 +1083,12 @@ inline float get_homing_bump_feedrate(const AxisEnum axis) {
|
1077
|
1083
|
#if Z_SENSORLESS
|
1078
|
1084
|
case Z_AXIS:
|
1079
|
1085
|
stealth_states.z = tmc_enable_stallguard(stepperZ);
|
|
1086
|
+ #if AXIS_HAS_STALLGUARD(Z2)
|
|
1087
|
+ stealth_states.z2 = tmc_enable_stallguard(stepperZ2);
|
|
1088
|
+ #endif
|
|
1089
|
+ #if AXIS_HAS_STALLGUARD(Z3)
|
|
1090
|
+ stealth_states.z3 = tmc_enable_stallguard(stepperZ3);
|
|
1091
|
+ #endif
|
1080
|
1092
|
#if CORE_IS_XZ && X_SENSORLESS
|
1081
|
1093
|
stealth_states.x = tmc_enable_stallguard(stepperX);
|
1082
|
1094
|
#elif CORE_IS_YZ && Y_SENSORLESS
|
|
@@ -1094,6 +1106,9 @@ inline float get_homing_bump_feedrate(const AxisEnum axis) {
|
1094
|
1106
|
#if X_SENSORLESS
|
1095
|
1107
|
case X_AXIS:
|
1096
|
1108
|
tmc_disable_stallguard(stepperX, enable_stealth.x);
|
|
1109
|
+ #if AXIS_HAS_STALLGUARD(X2)
|
|
1110
|
+ tmc_disable_stallguard(stepperX2, enable_stealth.x2);
|
|
1111
|
+ #endif
|
1097
|
1112
|
#if CORE_IS_XY && Y_SENSORLESS
|
1098
|
1113
|
tmc_disable_stallguard(stepperY, enable_stealth.y);
|
1099
|
1114
|
#elif CORE_IS_XZ && Z_SENSORLESS
|
|
@@ -1104,6 +1119,9 @@ inline float get_homing_bump_feedrate(const AxisEnum axis) {
|
1104
|
1119
|
#if Y_SENSORLESS
|
1105
|
1120
|
case Y_AXIS:
|
1106
|
1121
|
tmc_disable_stallguard(stepperY, enable_stealth.y);
|
|
1122
|
+ #if AXIS_HAS_STALLGUARD(Y2)
|
|
1123
|
+ tmc_disable_stallguard(stepperY2, enable_stealth.y2);
|
|
1124
|
+ #endif
|
1107
|
1125
|
#if CORE_IS_XY && X_SENSORLESS
|
1108
|
1126
|
tmc_disable_stallguard(stepperX, enable_stealth.x);
|
1109
|
1127
|
#elif CORE_IS_YZ && Z_SENSORLESS
|
|
@@ -1114,6 +1132,12 @@ inline float get_homing_bump_feedrate(const AxisEnum axis) {
|
1114
|
1132
|
#if Z_SENSORLESS
|
1115
|
1133
|
case Z_AXIS:
|
1116
|
1134
|
tmc_disable_stallguard(stepperZ, enable_stealth.z);
|
|
1135
|
+ #if AXIS_HAS_STALLGUARD(Z2)
|
|
1136
|
+ tmc_disable_stallguard(stepperZ2, enable_stealth.z2);
|
|
1137
|
+ #endif
|
|
1138
|
+ #if AXIS_HAS_STALLGUARD(Z3)
|
|
1139
|
+ tmc_disable_stallguard(stepperZ3, enable_stealth.z3);
|
|
1140
|
+ #endif
|
1117
|
1141
|
#if CORE_IS_XZ && X_SENSORLESS
|
1118
|
1142
|
tmc_disable_stallguard(stepperX, enable_stealth.x);
|
1119
|
1143
|
#elif CORE_IS_YZ && Y_SENSORLESS
|