Browse Source

"M122 I" to reinitialize TMC (#18571)

ManuelMcLure 5 years ago
parent
commit
d884d1eda8
No account linked to committer's email address
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      Marlin/src/gcode/feature/trinamic/M122.cpp

+ 3
- 0
Marlin/src/gcode/feature/trinamic/M122.cpp View File

@@ -26,6 +26,7 @@
26 26
 
27 27
 #include "../../gcode.h"
28 28
 #include "../../../feature/tmc_util.h"
29
+#include "../../../module/stepper/indirection.h"
29 30
 
30 31
 /**
31 32
  * M122: Debug TMC drivers
@@ -37,6 +38,8 @@ void GcodeSuite::M122() {
37 38
 
38 39
   if (print_all) LOOP_XYZE(i) print_axis[i] = true;
39 40
 
41
+  if (parser.boolval('I')) restore_stepper_drivers();
42
+
40 43
   #if ENABLED(TMC_DEBUG)
41 44
     #if ENABLED(MONITOR_DRIVER_STATUS)
42 45
       uint16_t interval = MONITOR_DRIVER_STATUS_INTERVAL_MS;

Loading…
Cancel
Save