Followup to M91x I patch

2.0.x
Scott Lahteine 7 years ago
parent 62fa028155
commit 4685c7d59f

@ -163,26 +163,26 @@ void GcodeSuite::M912() {
switch (i) { switch (i) {
case X_AXIS: case X_AXIS:
#if X_IS_TRINAMIC #if X_IS_TRINAMIC
if (index == 0) TMC_SET_PWMTHRS(X,X); if (index < 2) TMC_SET_PWMTHRS(X,X);
#endif #endif
#if X2_IS_TRINAMIC #if X2_IS_TRINAMIC
if (index == 1) TMC_SET_PWMTHRS(X,X2); if (!(index & 1)) TMC_SET_PWMTHRS(X,X2);
#endif #endif
break; break;
case Y_AXIS: case Y_AXIS:
#if Y_IS_TRINAMIC #if Y_IS_TRINAMIC
if (index == 0) TMC_SET_PWMTHRS(Y,Y); if (index < 2) TMC_SET_PWMTHRS(Y,Y);
#endif #endif
#if Y2_IS_TRINAMIC #if Y2_IS_TRINAMIC
if (index == 1) TMC_SET_PWMTHRS(Y,Y2); if (!(index & 1)) TMC_SET_PWMTHRS(Y,Y2);
#endif #endif
break; break;
case Z_AXIS: case Z_AXIS:
#if Z_IS_TRINAMIC #if Z_IS_TRINAMIC
if (index == 0) TMC_SET_PWMTHRS(Z,Z); if (index < 2) TMC_SET_PWMTHRS(Z,Z);
#endif #endif
#if Z2_IS_TRINAMIC #if Z2_IS_TRINAMIC
if (index == 1) TMC_SET_PWMTHRS(Z,Z2); if (!(index & 1)) TMC_SET_PWMTHRS(Z,Z2);
#endif #endif
break; break;
case E_AXIS: { case E_AXIS: {

Loading…
Cancel
Save