|
@@ -268,58 +268,70 @@ void GcodeSuite::M912() {
|
268
|
268
|
const int8_t value = (int8_t)constrain(parser.value_int(), -64, 63);
|
269
|
269
|
report = false;
|
270
|
270
|
switch (i) {
|
|
271
|
+ #if X_SENSORLESS
|
|
272
|
+ case X_AXIS:
|
|
273
|
+ #if ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS)
|
|
274
|
+ if (index == 0) TMC_SET_SGT(X);
|
|
275
|
+ #endif
|
|
276
|
+ #if ENABLED(X2_IS_TMC2130)
|
|
277
|
+ if (index == 1) TMC_SET_SGT(X2);
|
|
278
|
+ #endif
|
|
279
|
+ break;
|
|
280
|
+ #endif
|
|
281
|
+ #if Y_SENSORLESS
|
|
282
|
+ case Y_AXIS:
|
|
283
|
+ #if ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS)
|
|
284
|
+ if (index == 0) TMC_SET_SGT(Y);
|
|
285
|
+ #endif
|
|
286
|
+ #if ENABLED(Y2_IS_TMC2130)
|
|
287
|
+ if (index == 1) TMC_SET_SGT(Y2);
|
|
288
|
+ #endif
|
|
289
|
+ break;
|
|
290
|
+ #endif
|
|
291
|
+ #if Z_SENSORLESS
|
|
292
|
+ case Z_AXIS:
|
|
293
|
+ #if ENABLED(Z_IS_TMC2130) || ENABLED(IS_TRAMS)
|
|
294
|
+ if (index == 0) TMC_SET_SGT(Z);
|
|
295
|
+ #endif
|
|
296
|
+ #if ENABLED(Z2_IS_TMC2130)
|
|
297
|
+ if (index == 1) TMC_SET_SGT(Z2);
|
|
298
|
+ #endif
|
|
299
|
+ break;
|
|
300
|
+ #endif
|
|
301
|
+ }
|
|
302
|
+ }
|
|
303
|
+
|
|
304
|
+ if (report) LOOP_XYZ(i) switch (i) {
|
|
305
|
+ #if X_SENSORLESS
|
271
|
306
|
case X_AXIS:
|
272
|
307
|
#if ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS)
|
273
|
|
- if (index == 0) TMC_SET_SGT(X);
|
|
308
|
+ TMC_SAY_SGT(X);
|
274
|
309
|
#endif
|
275
|
310
|
#if ENABLED(X2_IS_TMC2130)
|
276
|
|
- if (index == 1) TMC_SET_SGT(X2);
|
|
311
|
+ TMC_SAY_SGT(X2);
|
277
|
312
|
#endif
|
278
|
313
|
break;
|
|
314
|
+ #endif
|
|
315
|
+ #if Y_SENSORLESS
|
279
|
316
|
case Y_AXIS:
|
280
|
317
|
#if ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS)
|
281
|
|
- if (index == 0) TMC_SET_SGT(Y);
|
|
318
|
+ TMC_SAY_SGT(Y);
|
282
|
319
|
#endif
|
283
|
320
|
#if ENABLED(Y2_IS_TMC2130)
|
284
|
|
- if (index == 1) TMC_SET_SGT(Y2);
|
|
321
|
+ TMC_SAY_SGT(Y2);
|
285
|
322
|
#endif
|
286
|
323
|
break;
|
|
324
|
+ #endif
|
|
325
|
+ #if Z_SENSORLESS
|
287
|
326
|
case Z_AXIS:
|
288
|
327
|
#if ENABLED(Z_IS_TMC2130) || ENABLED(IS_TRAMS)
|
289
|
|
- if (index == 0) TMC_SET_SGT(Z);
|
|
328
|
+ TMC_SAY_SGT(Z);
|
290
|
329
|
#endif
|
291
|
330
|
#if ENABLED(Z2_IS_TMC2130)
|
292
|
|
- if (index == 1) TMC_SET_SGT(Z2);
|
|
331
|
+ TMC_SAY_SGT(Z2);
|
293
|
332
|
#endif
|
294
|
333
|
break;
|
295
|
|
- }
|
296
|
|
- }
|
297
|
|
-
|
298
|
|
- if (report) LOOP_XYZ(i) switch (i) {
|
299
|
|
- case X_AXIS:
|
300
|
|
- #if ENABLED(X_IS_TMC2130) || ENABLED(IS_TRAMS)
|
301
|
|
- TMC_SAY_SGT(X);
|
302
|
|
- #endif
|
303
|
|
- #if ENABLED(X2_IS_TMC2130)
|
304
|
|
- TMC_SAY_SGT(X2);
|
305
|
|
- #endif
|
306
|
|
- break;
|
307
|
|
- case Y_AXIS:
|
308
|
|
- #if ENABLED(Y_IS_TMC2130) || ENABLED(IS_TRAMS)
|
309
|
|
- TMC_SAY_SGT(Y);
|
310
|
|
- #endif
|
311
|
|
- #if ENABLED(Y2_IS_TMC2130)
|
312
|
|
- TMC_SAY_SGT(Y2);
|
313
|
|
- #endif
|
314
|
|
- break;
|
315
|
|
- case Z_AXIS:
|
316
|
|
- #if ENABLED(Z_IS_TMC2130) || ENABLED(IS_TRAMS)
|
317
|
|
- TMC_SAY_SGT(Z);
|
318
|
|
- #endif
|
319
|
|
- #if ENABLED(Z2_IS_TMC2130)
|
320
|
|
- TMC_SAY_SGT(Z2);
|
321
|
|
- #endif
|
322
|
|
- break;
|
|
334
|
+ #endif
|
323
|
335
|
}
|
324
|
336
|
}
|
325
|
337
|
#endif // SENSORLESS_HOMING
|