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

Loading…
Cancel
Save