Преглед на файлове

🐛 Fix "no T param" handling

Scott Lahteine преди 2 години
родител
ревизия
ff46d7cae2

+ 1
- 1
Marlin/src/gcode/feature/L6470/M906.cpp Целия файл

@@ -285,7 +285,7 @@ void GcodeSuite::M906() {
285 285
 
286 286
       #if E_STEPPERS
287 287
         case E_AXIS: {
288
-          const int8_t eindex = get_target_e_stepper_from_command();
288
+          const int8_t eindex = get_target_e_stepper_from_command(-2);
289 289
           #if AXIS_IS_L64XX(E0)
290 290
             if (eindex < 0 || eindex == 0) L6470_SET_KVAL_HOLD(E0);
291 291
           #endif

+ 1
- 1
Marlin/src/gcode/feature/trinamic/M569.cpp Целия файл

@@ -134,7 +134,7 @@ static void say_stealth_status() {
134 134
  */
135 135
 void GcodeSuite::M569() {
136 136
   if (parser.seen('S'))
137
-    set_stealth_status(parser.value_bool(), get_target_e_stepper_from_command());
137
+    set_stealth_status(parser.value_bool(), get_target_e_stepper_from_command(-2));
138 138
   else
139 139
     say_stealth_status();
140 140
 }

+ 1
- 1
Marlin/src/gcode/feature/trinamic/M906.cpp Целия файл

@@ -112,7 +112,7 @@ void GcodeSuite::M906() {
112 112
 
113 113
       #if E_STEPPERS
114 114
         case E_AXIS: {
115
-          const int8_t eindex = get_target_e_stepper_from_command();
115
+          const int8_t eindex = get_target_e_stepper_from_command(-2);
116 116
           #if AXIS_IS_TMC(E0)
117 117
             if (eindex < 0 || eindex == 0) TMC_SET_CURRENT(E0);
118 118
           #endif

+ 1
- 1
Marlin/src/gcode/feature/trinamic/M911-M914.cpp Целия файл

@@ -291,7 +291,7 @@
291 291
           break;
292 292
         #if E_STEPPERS
293 293
           case E_AXIS: {
294
-            const int8_t eindex = get_target_e_stepper_from_command();
294
+            const int8_t eindex = get_target_e_stepper_from_command(-2);
295 295
             TERN_(E0_HAS_STEALTHCHOP, if (eindex < 0 || eindex == 0) TMC_SET_PWMTHRS_E(0));
296 296
             TERN_(E1_HAS_STEALTHCHOP, if (eindex < 0 || eindex == 1) TMC_SET_PWMTHRS_E(1));
297 297
             TERN_(E2_HAS_STEALTHCHOP, if (eindex < 0 || eindex == 2) TMC_SET_PWMTHRS_E(2));

+ 1
- 0
Marlin/src/gcode/gcode.cpp Целия файл

@@ -148,6 +148,7 @@ int8_t GcodeSuite::get_target_extruder_from_command() {
148 148
 int8_t GcodeSuite::get_target_e_stepper_from_command(const int8_t dval/*=-1*/) {
149 149
   const int8_t e = parser.intval('T', dval);
150 150
   if (WITHIN(e, 0, E_STEPPERS - 1)) return e;
151
+  if (dval == -2) return dval;
151 152
 
152 153
   SERIAL_ECHO_START();
153 154
   SERIAL_CHAR('M'); SERIAL_ECHO(parser.codenum);

Loading…
Отказ
Запис