|
@ -268,58 +268,70 @@ void GcodeSuite::M912() { |
|
|
const int8_t value = (int8_t)constrain(parser.value_int(), -64, 63); |
|
|
const int8_t value = (int8_t)constrain(parser.value_int(), -64, 63); |
|
|
report = false; |
|
|
report = false; |
|
|
switch (i) { |
|
|
switch (i) { |
|
|
|
|
|
#if X_SENSORLESS |
|
|
|
|
|
case X_AXIS: |
|
|
|
|
|
#if ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS) |
|
|
|
|
|
if (index == 0) TMC_SET_SGT(X); |
|
|
|
|
|
#endif |
|
|
|
|
|
#if ENABLED(X2_IS_TMC2130) |
|
|
|
|
|
if (index == 1) TMC_SET_SGT(X2); |
|
|
|
|
|
#endif |
|
|
|
|
|
break; |
|
|
|
|
|
#endif |
|
|
|
|
|
#if Y_SENSORLESS |
|
|
|
|
|
case Y_AXIS: |
|
|
|
|
|
#if ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS) |
|
|
|
|
|
if (index == 0) TMC_SET_SGT(Y); |
|
|
|
|
|
#endif |
|
|
|
|
|
#if ENABLED(Y2_IS_TMC2130) |
|
|
|
|
|
if (index == 1) TMC_SET_SGT(Y2); |
|
|
|
|
|
#endif |
|
|
|
|
|
break; |
|
|
|
|
|
#endif |
|
|
|
|
|
#if Z_SENSORLESS |
|
|
|
|
|
case Z_AXIS: |
|
|
|
|
|
#if ENABLED(Z_IS_TMC2130) || ENABLED(IS_TRAMS) |
|
|
|
|
|
if (index == 0) TMC_SET_SGT(Z); |
|
|
|
|
|
#endif |
|
|
|
|
|
#if ENABLED(Z2_IS_TMC2130) |
|
|
|
|
|
if (index == 1) TMC_SET_SGT(Z2); |
|
|
|
|
|
#endif |
|
|
|
|
|
break; |
|
|
|
|
|
#endif |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (report) LOOP_XYZ(i) switch (i) { |
|
|
|
|
|
#if X_SENSORLESS |
|
|
case X_AXIS: |
|
|
case X_AXIS: |
|
|
#if ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS) |
|
|
#if ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS) |
|
|
if (index == 0) TMC_SET_SGT(X); |
|
|
TMC_SAY_SGT(X); |
|
|
#endif |
|
|
#endif |
|
|
#if ENABLED(X2_IS_TMC2130) |
|
|
#if ENABLED(X2_IS_TMC2130) |
|
|
if (index == 1) TMC_SET_SGT(X2); |
|
|
TMC_SAY_SGT(X2); |
|
|
#endif |
|
|
#endif |
|
|
break; |
|
|
break; |
|
|
|
|
|
#endif |
|
|
|
|
|
#if Y_SENSORLESS |
|
|
case Y_AXIS: |
|
|
case Y_AXIS: |
|
|
#if ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS) |
|
|
#if ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS) |
|
|
if (index == 0) TMC_SET_SGT(Y); |
|
|
TMC_SAY_SGT(Y); |
|
|
#endif |
|
|
#endif |
|
|
#if ENABLED(Y2_IS_TMC2130) |
|
|
#if ENABLED(Y2_IS_TMC2130) |
|
|
if (index == 1) TMC_SET_SGT(Y2); |
|
|
TMC_SAY_SGT(Y2); |
|
|
#endif |
|
|
#endif |
|
|
break; |
|
|
break; |
|
|
|
|
|
#endif |
|
|
|
|
|
#if Z_SENSORLESS |
|
|
case Z_AXIS: |
|
|
case Z_AXIS: |
|
|
#if ENABLED(Z_IS_TMC2130) || ENABLED(IS_TRAMS) |
|
|
#if ENABLED(Z_IS_TMC2130) || ENABLED(IS_TRAMS) |
|
|
if (index == 0) TMC_SET_SGT(Z); |
|
|
TMC_SAY_SGT(Z); |
|
|
#endif |
|
|
#endif |
|
|
#if ENABLED(Z2_IS_TMC2130) |
|
|
#if ENABLED(Z2_IS_TMC2130) |
|
|
if (index == 1) TMC_SET_SGT(Z2); |
|
|
TMC_SAY_SGT(Z2); |
|
|
#endif |
|
|
#endif |
|
|
break; |
|
|
break; |
|
|
} |
|
|
#endif |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (report) LOOP_XYZ(i) switch (i) { |
|
|
|
|
|
case X_AXIS: |
|
|
|
|
|
#if ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS) |
|
|
|
|
|
TMC_SAY_SGT(X); |
|
|
|
|
|
#endif |
|
|
|
|
|
#if ENABLED(X2_IS_TMC2130) |
|
|
|
|
|
TMC_SAY_SGT(X2); |
|
|
|
|
|
#endif |
|
|
|
|
|
break; |
|
|
|
|
|
case Y_AXIS: |
|
|
|
|
|
#if ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS) |
|
|
|
|
|
TMC_SAY_SGT(Y); |
|
|
|
|
|
#endif |
|
|
|
|
|
#if ENABLED(Y2_IS_TMC2130) |
|
|
|
|
|
TMC_SAY_SGT(Y2); |
|
|
|
|
|
#endif |
|
|
|
|
|
break; |
|
|
|
|
|
case Z_AXIS: |
|
|
|
|
|
#if ENABLED(Z_IS_TMC2130) || ENABLED(IS_TRAMS) |
|
|
|
|
|
TMC_SAY_SGT(Z); |
|
|
|
|
|
#endif |
|
|
|
|
|
#if ENABLED(Z2_IS_TMC2130) |
|
|
|
|
|
TMC_SAY_SGT(Z2); |
|
|
|
|
|
#endif |
|
|
|
|
|
break; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
#endif // SENSORLESS_HOMING
|
|
|
#endif // SENSORLESS_HOMING
|
|
|