Browse Source

🚨 Fix M906 warning

Scott Lahteine 3 years ago
parent
commit
91909163ee
1 changed files with 15 additions and 13 deletions
  1. 15
    13
      Marlin/src/gcode/feature/L6470/M906.cpp

+ 15
- 13
Marlin/src/gcode/feature/L6470/M906.cpp View File

246
     }
246
     }
247
 
247
 
248
     switch (i) {
248
     switch (i) {
249
-      case X_AXIS:
250
-        #if AXIS_IS_L64XX(X)
251
-          if (index < 0 || index == 0) L6470_SET_KVAL_HOLD(X);
252
-        #endif
253
-        #if AXIS_IS_L64XX(X2)
254
-          if (index < 0 || index == 1) L6470_SET_KVAL_HOLD(X2);
255
-        #endif
256
-        break;
257
-
258
-      #if HAS_Y_AXIS
249
+      #if AXIS_IS_L64XX(X) || AXIS_IS_L64XX(X2)
250
+        case X_AXIS:
251
+          #if AXIS_IS_L64XX(X)
252
+            if (index < 0 || index == 0) L6470_SET_KVAL_HOLD(X);
253
+          #endif
254
+          #if AXIS_IS_L64XX(X2)
255
+            if (index < 0 || index == 1) L6470_SET_KVAL_HOLD(X2);
256
+          #endif
257
+          break;
258
+      #endif
259
+
260
+      #if AXIS_IS_L64XX(Y) || AXIS_IS_L64XX(Y2)
259
         case Y_AXIS:
261
         case Y_AXIS:
260
           #if AXIS_IS_L64XX(Y)
262
           #if AXIS_IS_L64XX(Y)
261
             if (index < 0 || index == 0) L6470_SET_KVAL_HOLD(Y);
263
             if (index < 0 || index == 0) L6470_SET_KVAL_HOLD(Y);
266
           break;
268
           break;
267
       #endif
269
       #endif
268
 
270
 
269
-      #if HAS_Z_AXIS
271
+      #if AXIS_IS_L64XX(Z) || AXIS_IS_L64XX(Z2) || AXIS_IS_L64XX(Z3) || AXIS_IS_L64XX(Z4)
270
         case Z_AXIS:
272
         case Z_AXIS:
271
           #if AXIS_IS_L64XX(Z)
273
           #if AXIS_IS_L64XX(Z)
272
             if (index < 0 || index == 0) L6470_SET_KVAL_HOLD(Z);
274
             if (index < 0 || index == 0) L6470_SET_KVAL_HOLD(Z);
277
           #if AXIS_IS_L64XX(Z3)
279
           #if AXIS_IS_L64XX(Z3)
278
             if (index < 0 || index == 2) L6470_SET_KVAL_HOLD(Z3);
280
             if (index < 0 || index == 2) L6470_SET_KVAL_HOLD(Z3);
279
           #endif
281
           #endif
280
-          #if AXIS_DRIVER_TYPE_Z4(L6470)
282
+          #if AXIS_IS_L64XX(Z4)
281
             if (index < 0 || index == 3) L6470_SET_KVAL_HOLD(Z4);
283
             if (index < 0 || index == 3) L6470_SET_KVAL_HOLD(Z4);
282
           #endif
284
           #endif
283
           break;
285
           break;
284
       #endif
286
       #endif
285
 
287
 
286
-      #if E_STEPPERS
288
+      #if AXIS_IS_L64XX(E0) || AXIS_IS_L64XX(E1) || AXIS_IS_L64XX(E2) || AXIS_IS_L64XX(E3) || AXIS_IS_L64XX(E4) || AXIS_IS_L64XX(E5) || AXIS_IS_L64XX(E6) || AXIS_IS_L64XX(E7)
287
         case E_AXIS: {
289
         case E_AXIS: {
288
           const int8_t eindex = get_target_e_stepper_from_command(-2);
290
           const int8_t eindex = get_target_e_stepper_from_command(-2);
289
           #if AXIS_IS_L64XX(E0)
291
           #if AXIS_IS_L64XX(E0)

Loading…
Cancel
Save