1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-29 23:07:42 +00:00

No M914 or SGT set for non-sensorless axes (#11197)

This commit is contained in:
Scott Lahteine 2018-07-03 20:10:43 -05:00 committed by GitHub
parent e84341412c
commit 03a704600c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 63 additions and 51 deletions

View File

@ -11285,6 +11285,7 @@ inline void gcode_M502() {
const int8_t value = (int8_t)constrain(parser.value_int(), -64, 63);
report = false;
switch (i) {
#if X_SENSORLESS
case X_AXIS:
#if ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS)
if (index == 0) TMC_SET_SGT(X);
@ -11293,6 +11294,8 @@ inline void gcode_M502() {
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);
@ -11301,6 +11304,8 @@ inline void gcode_M502() {
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);
@ -11309,10 +11314,12 @@ inline void gcode_M502() {
if (index == 1) TMC_SET_SGT(Z2);
#endif
break;
#endif
}
}
if (report) LOOP_XYZ(i) switch (i) {
#if X_SENSORLESS
case X_AXIS:
#if ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS)
TMC_SAY_SGT(X);
@ -11321,6 +11328,8 @@ inline void gcode_M502() {
TMC_SAY_SGT(X2);
#endif
break;
#endif
#if Y_SENSORLESS
case Y_AXIS:
#if ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS)
TMC_SAY_SGT(Y);
@ -11329,6 +11338,8 @@ inline void gcode_M502() {
TMC_SAY_SGT(Y2);
#endif
break;
#endif
#if Z_SENSORLESS
case Z_AXIS:
#if ENABLED(Z_IS_TMC2130) || ENABLED(IS_TRAMS)
TMC_SAY_SGT(Z);
@ -11337,6 +11348,7 @@ inline void gcode_M502() {
TMC_SAY_SGT(Z2);
#endif
break;
#endif
}
}
#endif // SENSORLESS_HOMING

View File

@ -244,7 +244,7 @@
#if ENABLED(SENSORLESS_HOMING)
#define TMC_INIT_SGT(P,Q) stepper##Q.sgt(P##_HOMING_SENSITIVITY);
#ifdef X_HOMING_SENSITIVITY
#if X_SENSORLESS
#if ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS)
stepperX.sgt(X_HOMING_SENSITIVITY);
#endif
@ -252,7 +252,7 @@
stepperX2.sgt(X_HOMING_SENSITIVITY);
#endif
#endif
#ifdef Y_HOMING_SENSITIVITY
#if Y_SENSORLESS
#if ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS)
stepperY.sgt(Y_HOMING_SENSITIVITY);
#endif
@ -260,7 +260,7 @@
stepperY2.sgt(Y_HOMING_SENSITIVITY);
#endif
#endif
#ifdef Z_HOMING_SENSITIVITY
#if Z_SENSORLESS
#if ENABLED(Z_IS_TMC2130) || ENABLED(IS_TRAMS)
stepperZ.sgt(Z_HOMING_SENSITIVITY);
#endif