Sfoglia il codice sorgente

🧑‍💻 Apply axis conditionals

Scott Lahteine 2 anni fa
parent
commit
e65c12cf96

+ 3
- 3
Marlin/src/core/language.h Vedi File

@@ -369,7 +369,7 @@
369 369
 #define LCD_STR_E STR_E
370 370
 
371 371
 // Extra Axis and Endstop Names
372
-#if LINEAR_AXES >= 4
372
+#if HAS_I_AXIS
373 373
   #if AXIS4_NAME == 'A'
374 374
     #define AXIS4_STR "A"
375 375
     #define STR_I_MIN "a_min"
@@ -403,7 +403,7 @@
403 403
   #define AXIS4_STR   ""
404 404
 #endif
405 405
 
406
-#if LINEAR_AXES >= 5
406
+#if HAS_J_AXIS
407 407
   #if AXIS5_NAME == 'A'
408 408
     #define AXIS5_STR "A"
409 409
     #define STR_J_MIN "a_min"
@@ -437,7 +437,7 @@
437 437
   #define AXIS5_STR   ""
438 438
 #endif
439 439
 
440
-#if LINEAR_AXES >= 6
440
+#if HAS_K_AXIS
441 441
   #if AXIS6_NAME == 'A'
442 442
     #define AXIS6_STR "A"
443 443
     #define STR_K_MIN "a_min"

+ 8
- 8
Marlin/src/core/types.h Vedi File

@@ -98,10 +98,10 @@ enum AxisEnum : uint8_t {
98 98
 
99 99
   // A, B, and C are for DELTA, SCARA, etc.
100 100
   , A_AXIS = X_AXIS
101
-  #if LINEAR_AXES >= 2
101
+  #if HAS_Y_AXIS
102 102
     , B_AXIS = Y_AXIS
103 103
   #endif
104
-  #if LINEAR_AXES >= 3
104
+  #if HAS_Z_AXIS
105 105
     , C_AXIS = Z_AXIS
106 106
   #endif
107 107
 
@@ -408,13 +408,13 @@ struct XYZval {
408 408
       FI void set(const T (&arr)[DISTINCT_AXES])       { LINEAR_AXIS_CODE(x = arr[0], y = arr[1], z = arr[2], i = arr[3], j = arr[4], k = arr[5]); }
409 409
     #endif
410 410
   #endif
411
-  #if LINEAR_AXES >= 4
411
+  #if HAS_I_AXIS
412 412
     FI void set(const T px, const T py, const T pz)                         { x = px; y = py; z = pz; }
413 413
   #endif
414
-  #if LINEAR_AXES >= 5
414
+  #if HAS_J_AXIS
415 415
     FI void set(const T px, const T py, const T pz, const T pi)             { x = px; y = py; z = pz; i = pi; }
416 416
   #endif
417
-  #if LINEAR_AXES >= 6
417
+  #if HAS_K_AXIS
418 418
     FI void set(const T px, const T py, const T pz, const T pi, const T pj) { x = px; y = py; z = pz; i = pi; j = pj; }
419 419
   #endif
420 420
 
@@ -549,13 +549,13 @@ struct XYZEval {
549 549
     FI void set(const XYZval<T> pxyz, const T pe)  { set(pxyz); e = pe; }
550 550
     FI void set(LOGICAL_AXIS_ARGS(const T))        { LOGICAL_AXIS_CODE(_e = e, a = x, b = y, c = z, u = i, v = j, w = k); }
551 551
   #endif
552
-  #if LINEAR_AXES >= 4
552
+  #if HAS_I_AXIS
553 553
     FI void set(const T px, const T py, const T pz)                         { x = px; y = py; z = pz; }
554 554
   #endif
555
-  #if LINEAR_AXES >= 5
555
+  #if HAS_J_AXIS
556 556
     FI void set(const T px, const T py, const T pz, const T pi)             { x = px; y = py; z = pz; i = pi; }
557 557
   #endif
558
-  #if LINEAR_AXES >= 6
558
+  #if HAS_K_AXIS
559 559
     FI void set(const T px, const T py, const T pz, const T pi, const T pj) { x = px; y = py; z = pz; i = pi; j = pj; }
560 560
   #endif
561 561
 

+ 3
- 9
Marlin/src/gcode/calibrate/G28.cpp Vedi File

@@ -441,15 +441,9 @@ void GcodeSuite::G28() {
441 441
       }
442 442
     #endif
443 443
 
444
-    #if LINEAR_AXES >= 4
445
-      if (doI) homeaxis(I_AXIS);
446
-    #endif
447
-    #if LINEAR_AXES >= 5
448
-      if (doJ) homeaxis(J_AXIS);
449
-    #endif
450
-    #if LINEAR_AXES >= 6
451
-      if (doK) homeaxis(K_AXIS);
452
-    #endif
444
+    TERN_(HAS_I_AXIS, if (doI) homeaxis(I_AXIS));
445
+    TERN_(HAS_J_AXIS, if (doJ) homeaxis(J_AXIS));
446
+    TERN_(HAS_K_AXIS, if (doK) homeaxis(K_AXIS));
453 447
 
454 448
     sync_plan_position();
455 449
 

+ 14
- 14
Marlin/src/gcode/calibrate/G425.cpp Vedi File

@@ -73,16 +73,16 @@
73 73
 #if BOTH(CALIBRATION_MEASURE_LEFT, CALIBRATION_MEASURE_RIGHT)
74 74
   #define HAS_X_CENTER 1
75 75
 #endif
76
-#if HAS_Y_AXIS && BOTH(CALIBRATION_MEASURE_FRONT, CALIBRATION_MEASURE_BACK)
76
+#if ALL(HAS_Y_AXIS, CALIBRATION_MEASURE_FRONT, CALIBRATION_MEASURE_BACK)
77 77
   #define HAS_Y_CENTER 1
78 78
 #endif
79
-#if LINEAR_AXES >= 4 && BOTH(CALIBRATION_MEASURE_IMIN, CALIBRATION_MEASURE_IMAX)
79
+#if ALL(HAS_I_AXIS, CALIBRATION_MEASURE_IMIN, CALIBRATION_MEASURE_IMAX)
80 80
   #define HAS_I_CENTER 1
81 81
 #endif
82
-#if LINEAR_AXES >= 5 && BOTH(CALIBRATION_MEASURE_JMIN, CALIBRATION_MEASURE_JMAX)
82
+#if ALL(HAS_J_AXIS, CALIBRATION_MEASURE_JMIN, CALIBRATION_MEASURE_JMAX)
83 83
   #define HAS_J_CENTER 1
84 84
 #endif
85
-#if LINEAR_AXES >= 6 && BOTH(CALIBRATION_MEASURE_KMIN, CALIBRATION_MEASURE_KMAX)
85
+#if ALL(HAS_K_AXIS, CALIBRATION_MEASURE_KMIN, CALIBRATION_MEASURE_KMAX)
86 86
   #define HAS_K_CENTER 1
87 87
 #endif
88 88
 
@@ -246,7 +246,7 @@ inline void probe_side(measurements_t &m, const float uncertainty, const side_t
246 246
       case RIGHT: dir = -1;
247 247
       case LEFT:  axis = X_AXIS; break;
248 248
     #endif
249
-    #if LINEAR_AXES >= 2 && AXIS_CAN_CALIBRATE(Y)
249
+    #if HAS_Y_AXIS && AXIS_CAN_CALIBRATE(Y)
250 250
       case BACK:  dir = -1;
251 251
       case FRONT: axis = Y_AXIS; break;
252 252
     #endif
@@ -258,15 +258,15 @@ inline void probe_side(measurements_t &m, const float uncertainty, const side_t
258 258
         return;
259 259
       }
260 260
     #endif
261
-    #if LINEAR_AXES >= 4 && AXIS_CAN_CALIBRATE(I)
261
+    #if HAS_I_AXIS && AXIS_CAN_CALIBRATE(I)
262 262
       case IMINIMUM: dir = -1;
263 263
       case IMAXIMUM: axis = I_AXIS; break;
264 264
     #endif
265
-    #if LINEAR_AXES >= 5 && AXIS_CAN_CALIBRATE(J)
265
+    #if HAS_J_AXIS && AXIS_CAN_CALIBRATE(J)
266 266
       case JMINIMUM: dir = -1;
267 267
       case JMAXIMUM: axis = J_AXIS; break;
268 268
     #endif
269
-    #if LINEAR_AXES >= 6 && AXIS_CAN_CALIBRATE(K)
269
+    #if HAS_K_AXIS && AXIS_CAN_CALIBRATE(K)
270 270
       case KMINIMUM: dir = -1;
271 271
       case KMAXIMUM: axis = K_AXIS; break;
272 272
     #endif
@@ -370,7 +370,7 @@ inline void probe_sides(measurements_t &m, const float uncertainty) {
370 370
         SERIAL_ECHOLNPGM("  Back: ", m.obj_side[BACK]);
371 371
       #endif
372 372
     #endif
373
-    #if LINEAR_AXES >= 4
373
+    #if HAS_I_AXIS
374 374
       #if ENABLED(CALIBRATION_MEASURE_IMIN)
375 375
         SERIAL_ECHOLNPGM("  " STR_I_MIN ": ", m.obj_side[IMINIMUM]);
376 376
       #endif
@@ -378,7 +378,7 @@ inline void probe_sides(measurements_t &m, const float uncertainty) {
378 378
         SERIAL_ECHOLNPGM("  " STR_I_MAX ": ", m.obj_side[IMAXIMUM]);
379 379
       #endif
380 380
     #endif
381
-    #if LINEAR_AXES >= 5
381
+    #if HAS_J_AXIS
382 382
       #if ENABLED(CALIBRATION_MEASURE_JMIN)
383 383
         SERIAL_ECHOLNPGM("  " STR_J_MIN ": ", m.obj_side[JMINIMUM]);
384 384
       #endif
@@ -386,7 +386,7 @@ inline void probe_sides(measurements_t &m, const float uncertainty) {
386 386
         SERIAL_ECHOLNPGM("  " STR_J_MAX ": ", m.obj_side[JMAXIMUM]);
387 387
       #endif
388 388
     #endif
389
-    #if LINEAR_AXES >= 6
389
+    #if HAS_K_AXIS
390 390
       #if ENABLED(CALIBRATION_MEASURE_KMIN)
391 391
         SERIAL_ECHOLNPGM("  " STR_K_MIN ": ", m.obj_side[KMINIMUM]);
392 392
       #endif
@@ -439,7 +439,7 @@ inline void probe_sides(measurements_t &m, const float uncertainty) {
439 439
     #if HAS_Z_AXIS && AXIS_CAN_CALIBRATE(Z)
440 440
       SERIAL_ECHOLNPGM("  Top: ", m.backlash[TOP]);
441 441
     #endif
442
-    #if LINEAR_AXES >= 4 && AXIS_CAN_CALIBRATE(I)
442
+    #if HAS_I_AXIS && AXIS_CAN_CALIBRATE(I)
443 443
       #if ENABLED(CALIBRATION_MEASURE_IMIN)
444 444
         SERIAL_ECHOLNPGM("  " STR_I_MIN ": ", m.backlash[IMINIMUM]);
445 445
       #endif
@@ -447,7 +447,7 @@ inline void probe_sides(measurements_t &m, const float uncertainty) {
447 447
         SERIAL_ECHOLNPGM("  " STR_I_MAX ": ", m.backlash[IMAXIMUM]);
448 448
       #endif
449 449
     #endif
450
-    #if LINEAR_AXES >= 5 && AXIS_CAN_CALIBRATE(J)
450
+    #if HAS_J_AXIS && AXIS_CAN_CALIBRATE(J)
451 451
       #if ENABLED(CALIBRATION_MEASURE_JMIN)
452 452
         SERIAL_ECHOLNPGM("  " STR_J_MIN ": ", m.backlash[JMINIMUM]);
453 453
       #endif
@@ -455,7 +455,7 @@ inline void probe_sides(measurements_t &m, const float uncertainty) {
455 455
         SERIAL_ECHOLNPGM("  " STR_J_MAX ": ", m.backlash[JMAXIMUM]);
456 456
       #endif
457 457
     #endif
458
-    #if LINEAR_AXES >= 6 && AXIS_CAN_CALIBRATE(K)
458
+    #if HAS_K_AXIS && AXIS_CAN_CALIBRATE(K)
459 459
       #if ENABLED(CALIBRATION_MEASURE_KMIN)
460 460
         SERIAL_ECHOLNPGM("  " STR_K_MIN ": ", m.backlash[KMINIMUM]);
461 461
       #endif

+ 4
- 4
Marlin/src/gcode/feature/trinamic/M911-M914.cpp Vedi File

@@ -38,19 +38,19 @@
38 38
   #if M91x_USE(X) || M91x_USE(X2)
39 39
     #define M91x_SOME_X 1
40 40
   #endif
41
-  #if LINEAR_AXES >= 2 && (M91x_USE(Y) || M91x_USE(Y2))
41
+  #if HAS_Y_AXIS && (M91x_USE(Y) || M91x_USE(Y2))
42 42
     #define M91x_SOME_Y 1
43 43
   #endif
44 44
   #if HAS_Z_AXIS && (M91x_USE(Z) || M91x_USE(Z2) || M91x_USE(Z3) || M91x_USE(Z4))
45 45
     #define M91x_SOME_Z 1
46 46
   #endif
47
-  #if LINEAR_AXES >= 4 && M91x_USE(I)
47
+  #if HAS_I_AXIS && M91x_USE(I)
48 48
     #define M91x_USE_I 1
49 49
   #endif
50
-  #if LINEAR_AXES >= 5 && M91x_USE(J)
50
+  #if HAS_J_AXIS && M91x_USE(J)
51 51
     #define M91x_USE_J 1
52 52
   #endif
53
-  #if LINEAR_AXES >= 6 && M91x_USE(K)
53
+  #if HAS_K_AXIS && M91x_USE(K)
54 54
     #define M91x_USE_K 1
55 55
   #endif
56 56
 

+ 18
- 4
Marlin/src/inc/Conditionals_LCD.h Vedi File

@@ -693,6 +693,15 @@
693 693
   #define HAS_Y_AXIS 1
694 694
   #if LINEAR_AXES >= XYZ
695 695
     #define HAS_Z_AXIS 1
696
+    #if LINEAR_AXES >= 4
697
+      #define HAS_I_AXIS 1
698
+      #if LINEAR_AXES >= 5
699
+        #define HAS_J_AXIS 1
700
+        #if LINEAR_AXES >= 6
701
+          #define HAS_K_AXIS 1
702
+        #endif
703
+      #endif
704
+    #endif
696 705
   #endif
697 706
 #endif
698 707
 
@@ -926,6 +935,11 @@
926 935
 #elif X_HOME_DIR < 0
927 936
   #define X_HOME_TO_MIN 1
928 937
 #endif
938
+#if X2_HOME_DIR > 0
939
+  #define X2_HOME_TO_MAX 1
940
+#elif X2_HOME_DIR < 0
941
+  #define X2_HOME_TO_MIN 1
942
+#endif
929 943
 #if Y_HOME_DIR > 0
930 944
   #define Y_HOME_TO_MAX 1
931 945
 #elif Y_HOME_DIR < 0
@@ -1215,13 +1229,13 @@
1215 1229
 #if HAS_Z_AXIS && !defined(INVERT_Z_DIR)
1216 1230
   #define INVERT_Z_DIR false
1217 1231
 #endif
1218
-#if LINEAR_AXES >= 4 && !defined(INVERT_I_DIR)
1232
+#if HAS_I_AXIS && !defined(INVERT_I_DIR)
1219 1233
   #define INVERT_I_DIR false
1220 1234
 #endif
1221
-#if LINEAR_AXES >= 5 && !defined(INVERT_J_DIR)
1235
+#if HAS_J_AXIS && !defined(INVERT_J_DIR)
1222 1236
   #define INVERT_J_DIR false
1223 1237
 #endif
1224
-#if LINEAR_AXES >= 6 && !defined(INVERT_K_DIR)
1238
+#if HAS_K_AXIS && !defined(INVERT_K_DIR)
1225 1239
   #define INVERT_K_DIR false
1226 1240
 #endif
1227 1241
 #if HAS_EXTRUDERS && !defined(INVERT_E_DIR)
@@ -1411,7 +1425,7 @@
1411 1425
   #endif
1412 1426
 #endif
1413 1427
 
1414
-#if ANY(USE_XMIN_PLUG, USE_YMIN_PLUG, USE_ZMIN_PLUG, USE_XMAX_PLUG, USE_YMAX_PLUG, USE_ZMAX_PLUG)
1428
+#if X_HOME_DIR || (HAS_Y_AXIS && Y_HOME_DIR) || (HAS_Z_AXIS && Z_HOME_DIR) || (HAS_I_AXIS && I_HOME_DIR) || (HAS_J_AXIS && J_HOME_DIR) || (HAS_K_AXIS && K_HOME_DIR)
1415 1429
   #define HAS_ENDSTOPS 1
1416 1430
   #define COORDINATE_OKAY(N,L,H) WITHIN(N,L,H)
1417 1431
 #else

+ 0
- 6
Marlin/src/inc/Conditionals_adv.h Vedi File

@@ -823,12 +823,6 @@
823 823
   #define POLL_JOG
824 824
 #endif
825 825
 
826
-#if X2_HOME_DIR > 0
827
-  #define X2_HOME_TO_MAX 1
828
-#elif X2_HOME_DIR < 0
829
-  #define X2_HOME_TO_MIN 1
830
-#endif
831
-
832 826
 #ifndef HOMING_BUMP_MM
833 827
   #define HOMING_BUMP_MM { 0, 0, 0 }
834 828
 #endif

+ 22
- 22
Marlin/src/inc/Conditionals_post.h Vedi File

@@ -97,13 +97,13 @@
97 97
 #else
98 98
   #undef CONTROLLER_FAN_USE_Z_ONLY
99 99
 #endif
100
-#if LINEAR_AXES >= 4
100
+#if HAS_I_AXIS
101 101
   #define I_MAX_LENGTH (I_MAX_POS - (I_MIN_POS))
102 102
 #endif
103
-#if LINEAR_AXES >= 5
103
+#if HAS_J_AXIS
104 104
   #define J_MAX_LENGTH (J_MAX_POS - (J_MIN_POS))
105 105
 #endif
106
-#if LINEAR_AXES >= 6
106
+#if HAS_K_AXIS
107 107
   #define K_MAX_LENGTH (K_MAX_POS - (K_MIN_POS))
108 108
 #endif
109 109
 
@@ -114,13 +114,13 @@
114 114
 #if HAS_Y_AXIS && !defined(Y_BED_SIZE)
115 115
   #define Y_BED_SIZE Y_MAX_LENGTH
116 116
 #endif
117
-#if LINEAR_AXES >= 4 && !defined(I_BED_SIZE)
117
+#if HAS_I_AXIS && !defined(I_BED_SIZE)
118 118
   #define I_BED_SIZE I_MAX_LENGTH
119 119
 #endif
120
-#if LINEAR_AXES >= 5 && !defined(J_BED_SIZE)
120
+#if HAS_J_AXIS && !defined(J_BED_SIZE)
121 121
   #define J_BED_SIZE J_MAX_LENGTH
122 122
 #endif
123
-#if LINEAR_AXES >= 6 && !defined(K_BED_SIZE)
123
+#if HAS_K_AXIS && !defined(K_BED_SIZE)
124 124
   #define K_BED_SIZE K_MAX_LENGTH
125 125
 #endif
126 126
 
@@ -134,13 +134,13 @@
134 134
 #if HAS_Y_AXIS
135 135
   #define _Y_HALF_BED ((Y_BED_SIZE) / 2)
136 136
 #endif
137
-#if LINEAR_AXES >= 4
137
+#if HAS_I_AXIS
138 138
   #define _I_HALF_IMAX ((I_BED_SIZE) / 2)
139 139
 #endif
140
-#if LINEAR_AXES >= 5
140
+#if HAS_J_AXIS
141 141
   #define _J_HALF_JMAX ((J_BED_SIZE) / 2)
142 142
 #endif
143
-#if LINEAR_AXES >= 6
143
+#if HAS_K_AXIS
144 144
   #define _K_HALF_KMAX ((K_BED_SIZE) / 2)
145 145
 #endif
146 146
 
@@ -149,13 +149,13 @@
149 149
   #define Y_CENTER TERN(BED_CENTER_AT_0_0, 0, _Y_HALF_BED)
150 150
   #define XY_CENTER { X_CENTER, Y_CENTER }
151 151
 #endif
152
-#if LINEAR_AXES >= 4
152
+#if HAS_I_AXIS
153 153
   #define I_CENTER TERN(BED_CENTER_AT_0_0, 0, _I_HALF_BED)
154 154
 #endif
155
-#if LINEAR_AXES >= 5
155
+#if HAS_J_AXIS
156 156
   #define J_CENTER TERN(BED_CENTER_AT_0_0, 0, _J_HALF_BED)
157 157
 #endif
158
-#if LINEAR_AXES >= 6
158
+#if HAS_K_AXIS
159 159
   #define K_CENTER TERN(BED_CENTER_AT_0_0, 0, _K_HALF_BED)
160 160
 #endif
161 161
 
@@ -166,15 +166,15 @@
166 166
   #define Y_MIN_BED (Y_CENTER - _Y_HALF_BED)
167 167
   #define Y_MAX_BED (Y_MIN_BED + Y_BED_SIZE)
168 168
 #endif
169
-#if LINEAR_AXES >= 4
169
+#if HAS_I_AXIS
170 170
   #define I_MINIM (I_CENTER - _I_HALF_BED_SIZE)
171 171
   #define I_MAXIM (I_MINIM + I_BED_SIZE)
172 172
 #endif
173
-#if LINEAR_AXES >= 5
173
+#if HAS_J_AXIS
174 174
   #define J_MINIM (J_CENTER - _J_HALF_BED_SIZE)
175 175
   #define J_MAXIM (J_MINIM + J_BED_SIZE)
176 176
 #endif
177
-#if LINEAR_AXES >= 6
177
+#if HAS_K_AXIS
178 178
   #define K_MINIM (K_CENTER - _K_HALF_BED_SIZE)
179 179
   #define K_MAXIM (K_MINIM + K_BED_SIZE)
180 180
 #endif
@@ -253,21 +253,21 @@
253 253
   #define Z_HOME_POS TERN(Z_HOME_TO_MIN, Z_MIN_POS, Z_MAX_POS)
254 254
 #endif
255 255
 
256
-#if LINEAR_AXES >= 4
256
+#if HAS_I_AXIS
257 257
   #ifdef MANUAL_I_HOME_POS
258 258
     #define I_HOME_POS MANUAL_I_HOME_POS
259 259
   #else
260 260
     #define I_HOME_POS TERN(I_HOME_TO_MIN, I_MIN_POS, I_MAX_POS)
261 261
   #endif
262 262
 #endif
263
-#if LINEAR_AXES >= 5
263
+#if HAS_J_AXIS
264 264
   #ifdef MANUAL_J_HOME_POS
265 265
     #define J_HOME_POS MANUAL_J_HOME_POS
266 266
   #else
267 267
     #define J_HOME_POS TERN(J_HOME_TO_MIN, J_MIN_POS, J_MAX_POS)
268 268
   #endif
269 269
 #endif
270
-#if LINEAR_AXES >= 6
270
+#if HAS_K_AXIS
271 271
   #ifdef MANUAL_K_HOME_POS
272 272
     #define K_HOME_POS MANUAL_K_HOME_POS
273 273
   #else
@@ -745,7 +745,7 @@
745 745
     #define LIB_INTERNAL_MAX31865 1
746 746
   #endif
747 747
 
748
-#endif //HAS_MAX_TC
748
+#endif // HAS_MAX_TC
749 749
 
750 750
 /**
751 751
  * X_DUAL_ENDSTOPS endstop reassignment
@@ -1620,7 +1620,7 @@
1620 1620
   #endif
1621 1621
 #endif
1622 1622
 
1623
-#if LINEAR_AXES >= 4
1623
+#if HAS_I_AXIS
1624 1624
   #if PIN_EXISTS(I_ENABLE) || AXIS_IS_L64XX(I) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(I))
1625 1625
     #define HAS_I_ENABLE 1
1626 1626
   #endif
@@ -1640,7 +1640,7 @@
1640 1640
   #undef DISABLE_INACTIVE_I
1641 1641
 #endif
1642 1642
 
1643
-#if LINEAR_AXES >= 5
1643
+#if HAS_J_AXIS
1644 1644
   #if PIN_EXISTS(J_ENABLE) || AXIS_IS_L64XX(J) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(J))
1645 1645
     #define HAS_J_ENABLE 1
1646 1646
   #endif
@@ -1660,7 +1660,7 @@
1660 1660
   #undef DISABLE_INACTIVE_J
1661 1661
 #endif
1662 1662
 
1663
-#if LINEAR_AXES >= 6
1663
+#if HAS_K_AXIS
1664 1664
   #if PIN_EXISTS(K_ENABLE) || AXIS_IS_L64XX(K) || (ENABLED(SOFTWARE_DRIVER_ENABLE) && AXIS_IS_TMC(K))
1665 1665
     #define HAS_K_ENABLE 1
1666 1666
   #endif

+ 37
- 37
Marlin/src/inc/SanityCheck.h Vedi File

@@ -1416,7 +1416,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
1416 1416
 /**
1417 1417
  * Allow only extra axis codes that do not conflict with G-code parameter names
1418 1418
  */
1419
-#if LINEAR_AXES >= 4
1419
+#if HAS_I_AXIS
1420 1420
   #if AXIS4_NAME != 'A' && AXIS4_NAME != 'B' && AXIS4_NAME != 'C' && AXIS4_NAME != 'U' && AXIS4_NAME != 'V' && AXIS4_NAME != 'W'
1421 1421
     #error "AXIS4_NAME can only be one of 'A', 'B', 'C', 'U', 'V', or 'W'."
1422 1422
   #elif !defined(I_MIN_POS) || !defined(I_MAX_POS)
@@ -1427,7 +1427,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
1427 1427
     #error "I_ENABLE_ON is required for your I driver with LINEAR_AXES >= 4."
1428 1428
   #endif
1429 1429
 #endif
1430
-#if LINEAR_AXES >= 5
1430
+#if HAS_J_AXIS
1431 1431
   #if AXIS5_NAME == AXIS4_NAME
1432 1432
     #error "AXIS5_NAME must be unique."
1433 1433
   #elif AXIS5_NAME != 'A' && AXIS5_NAME != 'B' && AXIS5_NAME != 'C' && AXIS5_NAME != 'U' && AXIS5_NAME != 'V' && AXIS5_NAME != 'W'
@@ -1440,7 +1440,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
1440 1440
     #error "J_ENABLE_ON is required for your J driver with LINEAR_AXES >= 5."
1441 1441
   #endif
1442 1442
 #endif
1443
-#if LINEAR_AXES >= 6
1443
+#if HAS_K_AXIS
1444 1444
   #if AXIS6_NAME == AXIS5_NAME || AXIS6_NAME == AXIS4_NAME
1445 1445
     #error "AXIS6_NAME must be unique."
1446 1446
   #elif AXIS6_NAME != 'A' && AXIS6_NAME != 'B' && AXIS6_NAME != 'C' && AXIS6_NAME != 'U' && AXIS6_NAME != 'V' && AXIS6_NAME != 'W'
@@ -2412,13 +2412,13 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
2412 2412
   #if _AXIS_PLUG_UNUSED_TEST(Z)
2413 2413
     #error "You must enable USE_ZMIN_PLUG or USE_ZMAX_PLUG."
2414 2414
   #endif
2415
-  #if LINEAR_AXES >= 4 && _AXIS_PLUG_UNUSED_TEST(I)
2415
+  #if HAS_I_AXIS && _AXIS_PLUG_UNUSED_TEST(I)
2416 2416
     #error "You must enable USE_IMIN_PLUG or USE_IMAX_PLUG."
2417 2417
   #endif
2418
-  #if LINEAR_AXES >= 5 && _AXIS_PLUG_UNUSED_TEST(J)
2418
+  #if HAS_J_AXIS && _AXIS_PLUG_UNUSED_TEST(J)
2419 2419
     #error "You must enable USE_JMIN_PLUG or USE_JMAX_PLUG."
2420 2420
   #endif
2421
-  #if LINEAR_AXES >= 6 && _AXIS_PLUG_UNUSED_TEST(K)
2421
+  #if HAS_K_AXIS && _AXIS_PLUG_UNUSED_TEST(K)
2422 2422
     #error "You must enable USE_KMIN_PLUG or USE_KMAX_PLUG."
2423 2423
   #endif
2424 2424
 
@@ -2432,17 +2432,17 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
2432 2432
       #error "Enable USE_YMIN_PLUG when homing Y to MIN."
2433 2433
     #elif Y_HOME_TO_MAX && DISABLED(USE_YMAX_PLUG)
2434 2434
       #error "Enable USE_YMAX_PLUG when homing Y to MAX."
2435
-    #elif LINEAR_AXES >= 4 && I_HOME_TO_MIN && DISABLED(USE_IMIN_PLUG)
2435
+    #elif HAS_I_AXIS && I_HOME_TO_MIN && DISABLED(USE_IMIN_PLUG)
2436 2436
       #error "Enable USE_IMIN_PLUG when homing I to MIN."
2437
-    #elif LINEAR_AXES >= 4 && I_HOME_TO_MAX && DISABLED(USE_IMAX_PLUG)
2437
+    #elif HAS_I_AXIS && I_HOME_TO_MAX && DISABLED(USE_IMAX_PLUG)
2438 2438
       #error "Enable USE_IMAX_PLUG when homing I to MAX."
2439
-    #elif LINEAR_AXES >= 5 && J_HOME_TO_MIN && DISABLED(USE_JMIN_PLUG)
2439
+    #elif HAS_J_AXIS && J_HOME_TO_MIN && DISABLED(USE_JMIN_PLUG)
2440 2440
       #error "Enable USE_JMIN_PLUG when homing J to MIN."
2441
-    #elif LINEAR_AXES >= 5 && J_HOME_TO_MAX && DISABLED(USE_JMAX_PLUG)
2441
+    #elif HAS_J_AXIS && J_HOME_TO_MAX && DISABLED(USE_JMAX_PLUG)
2442 2442
       #error "Enable USE_JMAX_PLUG when homing J to MAX."
2443
-    #elif LINEAR_AXES >= 6 && K_HOME_TO_MIN && DISABLED(USE_KMIN_PLUG)
2443
+    #elif HAS_K_AXIS && K_HOME_TO_MIN && DISABLED(USE_KMIN_PLUG)
2444 2444
       #error "Enable USE_KMIN_PLUG when homing K to MIN."
2445
-    #elif LINEAR_AXES >= 6 && K_HOME_TO_MAX && DISABLED(USE_KMAX_PLUG)
2445
+    #elif HAS_K_AXIS && K_HOME_TO_MAX && DISABLED(USE_KMAX_PLUG)
2446 2446
       #error "Enable USE_KMAX_PLUG when homing K to MAX."
2447 2447
     #endif
2448 2448
   #endif
@@ -2967,11 +2967,11 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
2967 2967
   #error "TMC2208 or TMC2209 on E6 requires E6_HARDWARE_SERIAL or E6_SERIAL_(RX|TX)_PIN."
2968 2968
 #elif INVALID_TMC_UART(E7)
2969 2969
   #error "TMC2208 or TMC2209 on E7 requires E7_HARDWARE_SERIAL or E7_SERIAL_(RX|TX)_PIN."
2970
-#elif LINEAR_AXES >= 4 && INVALID_TMC_UART(I)
2970
+#elif HAS_I_AXIS && INVALID_TMC_UART(I)
2971 2971
   #error "TMC2208 or TMC2209 on I requires I_HARDWARE_SERIAL or I_SERIAL_(RX|TX)_PIN."
2972
-#elif LINEAR_AXES >= 5 && INVALID_TMC_UART(J)
2972
+#elif HAS_J_AXIS && INVALID_TMC_UART(J)
2973 2973
   #error "TMC2208 or TMC2209 on J requires J_HARDWARE_SERIAL or J_SERIAL_(RX|TX)_PIN."
2974
-#elif LINEAR_AXES >= 6 && INVALID_TMC_UART(K)
2974
+#elif HAS_K_AXIS && INVALID_TMC_UART(K)
2975 2975
   #error "TMC2208 or TMC2209 on K requires K_HARDWARE_SERIAL or K_SERIAL_(RX|TX)_PIN."
2976 2976
 #endif
2977 2977
 #undef INVALID_TMC_UART
@@ -3057,11 +3057,11 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
3057 3057
   INVALID_TMC_MS(E6)
3058 3058
 #elif !TMC_MICROSTEP_IS_VALID(E7)
3059 3059
   INVALID_TMC_MS(E7)
3060
-#elif LINEAR_AXES >= 4 && !TMC_MICROSTEP_IS_VALID(I)
3060
+#elif HAS_I_AXIS && !TMC_MICROSTEP_IS_VALID(I)
3061 3061
   INVALID_TMC_MS(I)
3062
-#elif LINEAR_AXES >= 5 && !TMC_MICROSTEP_IS_VALID(J)
3062
+#elif HAS_J_AXIS && !TMC_MICROSTEP_IS_VALID(J)
3063 3063
   INVALID_TMC_MS(J)
3064
-#elif LINEAR_AXES >= 6 && !TMC_MICROSTEP_IS_VALID(K)
3064
+#elif HAS_K_AXIS && !TMC_MICROSTEP_IS_VALID(K)
3065 3065
   INVALID_TMC_MS(K)
3066 3066
 #endif
3067 3067
 #undef INVALID_TMC_MS
@@ -3083,13 +3083,13 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
3083 3083
   #define X_ENDSTOP_INVERTING !AXIS_DRIVER_TYPE(X,TMC2209)
3084 3084
   #define Y_ENDSTOP_INVERTING !AXIS_DRIVER_TYPE(Y,TMC2209)
3085 3085
   #define Z_ENDSTOP_INVERTING !AXIS_DRIVER_TYPE(Z,TMC2209)
3086
-  #if LINEAR_AXES >= 4
3086
+  #if HAS_I_AXIS
3087 3087
     #define I_ENDSTOP_INVERTING !AXIS_DRIVER_TYPE(I,TMC2209)
3088 3088
   #endif
3089
-  #if LINEAR_AXES >= 5
3089
+  #if HAS_J_AXIS
3090 3090
     #define J_ENDSTOP_INVERTING !AXIS_DRIVER_TYPE(J,TMC2209)
3091 3091
   #endif
3092
-  #if LINEAR_AXES >= 6
3092
+  #if HAS_K_AXIS
3093 3093
     #define K_ENDSTOP_INVERTING !AXIS_DRIVER_TYPE(K,TMC2209)
3094 3094
   #endif
3095 3095
 
@@ -3106,17 +3106,17 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
3106 3106
       #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_ZMIN (or ENDSTOPPULLUPS) when homing to Z_MIN."
3107 3107
     #elif Z_SENSORLESS && Z_HOME_TO_MAX && DISABLED(ENDSTOPPULLUP_ZMAX)
3108 3108
       #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_ZMAX (or ENDSTOPPULLUPS) when homing to Z_MAX."
3109
-    #elif LINEAR_AXES >= 4 && I_SENSORLESS && I_HOME_TO_MIN && DISABLED(ENDSTOPPULLUP_IMIN)
3109
+    #elif ALL(HAS_I_AXIS, I_SENSORLESS, I_HOME_TO_MIN) && DISABLED(ENDSTOPPULLUP_IMIN)
3110 3110
       #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_IMIN (or ENDSTOPPULLUPS) when homing to I_MIN."
3111
-    #elif LINEAR_AXES >= 4 && I_SENSORLESS && I_HOME_TO_MAX && DISABLED(ENDSTOPPULLUP_IMAX)
3111
+    #elif ALL(HAS_I_AXIS, I_SENSORLESS, I_HOME_TO_MAX) && DISABLED(ENDSTOPPULLUP_IMAX)
3112 3112
       #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_IMAX (or ENDSTOPPULLUPS) when homing to I_MAX."
3113
-    #elif LINEAR_AXES >= 5 && J_SENSORLESS && J_HOME_TO_MIN && DISABLED(ENDSTOPPULLUP_JMIN)
3113
+    #elif ALL(HAS_J_AXIS, J_SENSORLESS, J_HOME_TO_MIN) && DISABLED(ENDSTOPPULLUP_JMIN)
3114 3114
       #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_JMIN (or ENDSTOPPULLUPS) when homing to J_MIN."
3115
-    #elif LINEAR_AXES >= 5 && J_SENSORLESS && J_HOME_TO_MAX && DISABLED(ENDSTOPPULLUP_JMAX)
3115
+    #elif ALL(HAS_J_AXIS, J_SENSORLESS, J_HOME_TO_MAX) && DISABLED(ENDSTOPPULLUP_JMAX)
3116 3116
       #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_JMAX (or ENDSTOPPULLUPS) when homing to J_MAX."
3117
-    #elif LINEAR_AXES >= 6 && K_SENSORLESS && K_HOME_TO_MIN && DISABLED(ENDSTOPPULLUP_KMIN)
3117
+    #elif ALL(HAS_K_AXIS, K_SENSORLESS, K_HOME_TO_MIN) && DISABLED(ENDSTOPPULLUP_KMIN)
3118 3118
       #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_KMIN (or ENDSTOPPULLUPS) when homing to K_MIN."
3119
-    #elif LINEAR_AXES >= 6 && K_SENSORLESS && K_HOME_TO_MAX && DISABLED(ENDSTOPPULLUP_KMAX)
3119
+    #elif ALL(HAS_K_AXIS, K_SENSORLESS, K_HOME_TO_MAX) && DISABLED(ENDSTOPPULLUP_KMAX)
3120 3120
       #error "SENSORLESS_HOMING requires ENDSTOPPULLUP_KMAX (or ENDSTOPPULLUPS) when homing to K_MAX."
3121 3121
     #endif
3122 3122
   #endif
@@ -3162,37 +3162,37 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
3162 3162
       #else
3163 3163
         #error "SENSORLESS_HOMING requires Z_MAX_ENDSTOP_INVERTING = false when homing TMC2209 to Z_MAX."
3164 3164
       #endif
3165
-    #elif LINEAR_AXES >= 4 && I_SENSORLESS && I_HOME_TO_MIN && I_MIN_ENDSTOP_INVERTING != I_ENDSTOP_INVERTING
3165
+    #elif ALL(HAS_I_AXIS, I_SENSORLESS, I_HOME_TO_MIN) && I_MIN_ENDSTOP_INVERTING != I_ENDSTOP_INVERTING
3166 3166
       #if I_ENDSTOP_INVERTING
3167 3167
         #error "SENSORLESS_HOMING requires I_MIN_ENDSTOP_INVERTING = true when homing to I_MIN."
3168 3168
       #else
3169 3169
         #error "SENSORLESS_HOMING requires I_MIN_ENDSTOP_INVERTING = false when homing TMC2209 to I_MIN."
3170 3170
       #endif
3171
-    #elif LINEAR_AXES >= 4 && I_SENSORLESS && I_HOME_TO_MAX && I_MAX_ENDSTOP_INVERTING != I_ENDSTOP_INVERTING
3171
+    #elif ALL(HAS_I_AXIS, I_SENSORLESS, I_HOME_TO_MAX) && I_MAX_ENDSTOP_INVERTING != I_ENDSTOP_INVERTING
3172 3172
       #if I_ENDSTOP_INVERTING
3173 3173
         #error "SENSORLESS_HOMING requires I_MAX_ENDSTOP_INVERTING = true when homing to I_MAX."
3174 3174
       #else
3175 3175
         #error "SENSORLESS_HOMING requires I_MAX_ENDSTOP_INVERTING = false when homing TMC2209 to I_MAX."
3176 3176
       #endif
3177
-    #elif LINEAR_AXES >= 5 && J_SENSORLESS && J_HOME_TO_MIN && J_MIN_ENDSTOP_INVERTING != J_ENDSTOP_INVERTING
3177
+    #elif ALL(HAS_J_AXIS, J_SENSORLESS, J_HOME_TO_MIN) && J_MIN_ENDSTOP_INVERTING != J_ENDSTOP_INVERTING
3178 3178
       #if J_ENDSTOP_INVERTING
3179 3179
         #error "SENSORLESS_HOMING requires J_MIN_ENDSTOP_INVERTING = true when homing to J_MIN."
3180 3180
       #else
3181 3181
         #error "SENSORLESS_HOMING requires J_MIN_ENDSTOP_INVERTING = false when homing TMC2209 to J_MIN."
3182 3182
       #endif
3183
-    #elif LINEAR_AXES >= 5 && J_SENSORLESS && J_HOME_TO_MAX && J_MAX_ENDSTOP_INVERTING != J_ENDSTOP_INVERTING
3183
+    #elif ALL(HAS_J_AXIS, J_SENSORLESS, J_HOME_TO_MAX) && J_MAX_ENDSTOP_INVERTING != J_ENDSTOP_INVERTING
3184 3184
       #if J_ENDSTOP_INVERTING
3185 3185
         #error "SENSORLESS_HOMING requires J_MAX_ENDSTOP_INVERTING = true when homing to J_MAX."
3186 3186
       #else
3187 3187
         #error "SENSORLESS_HOMING requires J_MAX_ENDSTOP_INVERTING = false when homing TMC2209 to J_MAX."
3188 3188
       #endif
3189
-    #elif LINEAR_AXES >= 6 && K_SENSORLESS && K_HOME_TO_MIN && K_MIN_ENDSTOP_INVERTING != K_ENDSTOP_INVERTING
3189
+    #elif ALL(HAS_K_AXIS, K_SENSORLESS, K_HOME_TO_MIN) && K_MIN_ENDSTOP_INVERTING != K_ENDSTOP_INVERTING
3190 3190
       #if K_ENDSTOP_INVERTING
3191 3191
         #error "SENSORLESS_HOMING requires K_MIN_ENDSTOP_INVERTING = true when homing to K_MIN."
3192 3192
       #else
3193 3193
         #error "SENSORLESS_HOMING requires K_MIN_ENDSTOP_INVERTING = false when homing TMC2209 to K_MIN."
3194 3194
       #endif
3195
-    #elif LINEAR_AXES >= 6 && K_SENSORLESS && K_HOME_TO_MAX && K_MAX_ENDSTOP_INVERTING != K_ENDSTOP_INVERTING
3195
+    #elif ALL(HAS_K_AXIS, K_SENSORLESS, K_HOME_TO_MAX) && K_MAX_ENDSTOP_INVERTING != K_ENDSTOP_INVERTING
3196 3196
       #if K_ENDSTOP_INVERTING
3197 3197
         #error "SENSORLESS_HOMING requires K_MAX_ENDSTOP_INVERTING = true when homing to K_MAX."
3198 3198
       #else
@@ -3316,7 +3316,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
3316 3316
 /**
3317 3317
  * L64XX requirement
3318 3318
  */
3319
-#if HAS_L64XX && LINEAR_AXES >= 4
3319
+#if HAS_L64XX && HAS_I_AXIS
3320 3320
   #error "L64XX requires LINEAR_AXES 3. Homing with L64XX is not yet implemented for LINEAR_AXES > 3."
3321 3321
 #endif
3322 3322
 
@@ -3791,17 +3791,17 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
3791 3791
 #if _BAD_DRIVER(Z)
3792 3792
   #error "Z_DRIVER_TYPE is not recognized."
3793 3793
 #endif
3794
-#if LINEAR_AXES >= 4
3794
+#if HAS_I_AXIS
3795 3795
   #if _BAD_DRIVER(I)
3796 3796
     #error "I_DRIVER_TYPE is not recognized."
3797 3797
   #endif
3798 3798
 #endif
3799
-#if LINEAR_AXES >= 5
3799
+#if HAS_J_AXIS
3800 3800
   #if _BAD_DRIVER(J)
3801 3801
     #error "J_DRIVER_TYPE is not recognized."
3802 3802
   #endif
3803 3803
 #endif
3804
-#if LINEAR_AXES >= 6
3804
+#if HAS_K_AXIS
3805 3805
   #if _BAD_DRIVER(K)
3806 3806
     #error "K_DRIVER_TYPE is not recognized."
3807 3807
   #endif

+ 3
- 3
Marlin/src/lcd/extui/mks_ui/mks_hardware.cpp Vedi File

@@ -45,7 +45,7 @@
45 45
   #if PIN_EXISTS(MT_DET_2)
46 46
     bool mt_det2_sta;
47 47
   #endif
48
-  #if HAS_X_MIN || HAS_X_MAX
48
+  #if X_HOME_DIR
49 49
     bool endstopx1_sta;
50 50
   #else
51 51
     constexpr static bool endstopx1_sta = true;
@@ -55,7 +55,7 @@
55 55
   #else
56 56
     constexpr static bool endstopx2_sta = true;
57 57
   #endif
58
-  #if HAS_Y_MIN || HAS_Y_MAX
58
+  #if HAS_Y_AXIS && Y_HOME_DIR
59 59
     bool endstopy1_sta;
60 60
   #else
61 61
     constexpr static bool endstopy1_sta = true;
@@ -65,7 +65,7 @@
65 65
   #else
66 66
     constexpr static bool endstopy2_sta = true;
67 67
   #endif
68
-  #if HAS_Z_MIN || HAS_Z_MAX
68
+  #if HAS_Z_AXIS && Z_HOME_DIR
69 69
     bool endstopz1_sta;
70 70
   #else
71 71
     constexpr static bool endstopz1_sta = true;

+ 8
- 9
Marlin/src/lcd/extui/nextion/nextion_tft.cpp Vedi File

@@ -430,25 +430,24 @@ void NextionTFT::PanelInfo(uint8_t req) {
430 430
     break;
431 431
 
432 432
   case 36: // Endstop Info
433
-    #if HAS_X_MIN
433
+    #if X_HOME_TO_MIN
434 434
       SEND_VALasTXT("x1", READ(X_MIN_PIN) != X_MIN_ENDSTOP_INVERTING ? "triggered" : "open");
435
-    #endif
436
-    #if HAS_X_MAX
435
+    #elif X_HOME_TO_MAX
437 436
       SEND_VALasTXT("x2", READ(X_MAX_PIN) != X_MAX_ENDSTOP_INVERTING ? "triggered" : "open");
438 437
     #endif
439
-    #if HAS_Y_MIN
438
+    #if Y_HOME_TO_MIN
440 439
       SEND_VALasTXT("y1", READ(Y_MIN_PIN) != Y_MIN_ENDSTOP_INVERTING ? "triggered" : "open");
440
+    #elif Y_HOME_TO_MAX
441
+      SEND_VALasTXT("y2", READ(X_MAX_PIN) != Y_MAX_ENDSTOP_INVERTING ? "triggered" : "open");
441 442
     #endif
442
-    #if HAS_Z_MIN
443
+    #if Z_HOME_TO_MIN
443 444
       SEND_VALasTXT("z1", READ(Z_MIN_PIN) != Z_MIN_ENDSTOP_INVERTING ? "triggered" : "open");
444
-    #endif
445
-    #if HAS_Z_MAX
445
+    #elif Z_HOME_TO_MAX
446 446
       SEND_VALasTXT("z2", READ(Z_MAX_PIN) != Z_MAX_ENDSTOP_INVERTING ? "triggered" : "open");
447 447
     #endif
448 448
     #if HAS_Z2_MIN
449 449
       SEND_VALasTXT("z2", READ(Z2_MIN_PIN) != Z2_MIN_ENDSTOP_INVERTING ? "triggered" : "open");
450
-    #endif
451
-    #if HAS_Z2_MAX
450
+    #elif HAS_Z2_MAX
452 451
       SEND_VALasTXT("z2", READ(Z2_MAX_PIN) != Z2_MAX_ENDSTOP_INVERTING ? "triggered" : "open");
453 452
     #endif
454 453
     #if HAS_BED_PROBE

+ 3
- 3
Marlin/src/lcd/menu/menu_backlash.cpp Vedi File

@@ -51,13 +51,13 @@ void menu_backlash() {
51 51
   #if HAS_Z_AXIS && _CAN_CALI(C)
52 52
     EDIT_BACKLASH_DISTANCE(C);
53 53
   #endif
54
-  #if LINEAR_AXES >= 4 && _CAN_CALI(I)
54
+  #if HAS_I_AXIS && _CAN_CALI(I)
55 55
     EDIT_BACKLASH_DISTANCE(I);
56 56
   #endif
57
-  #if LINEAR_AXES >= 5 && _CAN_CALI(J)
57
+  #if HAS_J_AXIS && _CAN_CALI(J)
58 58
     EDIT_BACKLASH_DISTANCE(J);
59 59
   #endif
60
-  #if LINEAR_AXES >= 6 && _CAN_CALI(K)
60
+  #if HAS_K_AXIS && _CAN_CALI(K)
61 61
     EDIT_BACKLASH_DISTANCE(K);
62 62
   #endif
63 63
 

+ 12
- 12
Marlin/src/lcd/menu/menu_motion.cpp Vedi File

@@ -97,13 +97,13 @@ void lcd_move_x() { _lcd_move_xyz(GET_TEXT(MSG_MOVE_X), X_AXIS); }
97 97
 #if HAS_Z_AXIS
98 98
   void lcd_move_z() { _lcd_move_xyz(GET_TEXT(MSG_MOVE_Z), Z_AXIS); }
99 99
 #endif
100
-#if LINEAR_AXES >= 4
100
+#if HAS_I_AXIS
101 101
   void lcd_move_i() { _lcd_move_xyz(GET_TEXT(MSG_MOVE_I), I_AXIS); }
102 102
 #endif
103
-#if LINEAR_AXES >= 5
103
+#if HAS_J_AXIS
104 104
   void lcd_move_j() { _lcd_move_xyz(GET_TEXT(MSG_MOVE_J), J_AXIS); }
105 105
 #endif
106
-#if LINEAR_AXES >= 6
106
+#if HAS_K_AXIS
107 107
   void lcd_move_k() { _lcd_move_xyz(GET_TEXT(MSG_MOVE_K), K_AXIS); }
108 108
 #endif
109 109
 
@@ -254,13 +254,13 @@ void menu_move() {
254 254
     #if HAS_Z_AXIS
255 255
       SUBMENU(MSG_MOVE_Z, []{ _menu_move_distance(Z_AXIS, lcd_move_z); });
256 256
     #endif
257
-    #if LINEAR_AXES >= 4
257
+    #if HAS_I_AXIS
258 258
       SUBMENU(MSG_MOVE_I, []{ _menu_move_distance(I_AXIS, lcd_move_i); });
259 259
     #endif
260
-    #if LINEAR_AXES >= 5
260
+    #if HAS_J_AXIS
261 261
       SUBMENU(MSG_MOVE_J, []{ _menu_move_distance(J_AXIS, lcd_move_j); });
262 262
     #endif
263
-    #if LINEAR_AXES >= 6
263
+    #if HAS_K_AXIS
264 264
       SUBMENU(MSG_MOVE_K, []{ _menu_move_distance(K_AXIS, lcd_move_k); });
265 265
     #endif
266 266
   }
@@ -345,13 +345,13 @@ void menu_move() {
345 345
     #if HAS_Z_AXIS
346 346
       GCODES_ITEM_N(Z_AXIS, MSG_AUTO_HOME_A, PSTR("G28Z"));
347 347
     #endif
348
-    #if LINEAR_AXES >= 4
348
+    #if HAS_I_AXIS
349 349
       GCODES_ITEM_N(I_AXIS, MSG_AUTO_HOME_A, PSTR("G28" AXIS4_STR));
350 350
     #endif
351
-    #if LINEAR_AXES >= 5
351
+    #if HAS_J_AXIS
352 352
       GCODES_ITEM_N(J_AXIS, MSG_AUTO_HOME_A, PSTR("G28" AXIS5_STR));
353 353
     #endif
354
-    #if LINEAR_AXES >= 6
354
+    #if HAS_K_AXIS
355 355
       GCODES_ITEM_N(K_AXIS, MSG_AUTO_HOME_A, PSTR("G28" AXIS6_STR));
356 356
     #endif
357 357
 
@@ -398,13 +398,13 @@ void menu_motion() {
398 398
       #if HAS_Z_AXIS
399 399
         GCODES_ITEM_N(Z_AXIS, MSG_AUTO_HOME_A, PSTR("G28Z"));
400 400
       #endif
401
-      #if LINEAR_AXES >= 4
401
+      #if HAS_I_AXIS
402 402
         GCODES_ITEM_N(I_AXIS, MSG_AUTO_HOME_A, PSTR("G28" AXIS4_STR));
403 403
       #endif
404
-      #if LINEAR_AXES >= 5
404
+      #if HAS_J_AXIS
405 405
         GCODES_ITEM_N(J_AXIS, MSG_AUTO_HOME_A, PSTR("G28" AXIS5_STR));
406 406
       #endif
407
-      #if LINEAR_AXES >= 6
407
+      #if HAS_K_AXIS
408 408
         GCODES_ITEM_N(K_AXIS, MSG_AUTO_HOME_A, PSTR("G28" AXIS6_STR));
409 409
       #endif
410 410
     #endif

+ 3
- 3
Marlin/src/libs/L64XX/L64XX_Marlin.cpp Vedi File

@@ -497,7 +497,7 @@ uint8_t L64XX_Marlin::get_user_input(uint8_t &driver_count, L64XX_axis_t axis_in
497 497
       } break;
498 498
     #endif
499 499
 
500
-    #if LINEAR_AXES >= 4
500
+    #if HAS_I_AXIS
501 501
       case AXIS4_NAME: {
502 502
         position_min = I_center - displacement;
503 503
         position_max = I_center + displacement;
@@ -509,7 +509,7 @@ uint8_t L64XX_Marlin::get_user_input(uint8_t &driver_count, L64XX_axis_t axis_in
509 509
       } break;
510 510
     #endif
511 511
 
512
-    #if LINEAR_AXES >= 5
512
+    #if HAS_J_AXIS
513 513
       case AXIS5_NAME: {
514 514
         position_min = J_center - displacement;
515 515
         position_max = J_center + displacement;
@@ -521,7 +521,7 @@ uint8_t L64XX_Marlin::get_user_input(uint8_t &driver_count, L64XX_axis_t axis_in
521 521
       } break;
522 522
     #endif
523 523
 
524
-    #if LINEAR_AXES >= 6
524
+    #if HAS_K_AXIS
525 525
       case AXIS6_NAME: {
526 526
         position_min = K_center - displacement;
527 527
         position_max = K_center + displacement;

+ 3
- 3
Marlin/src/module/endstops.cpp Vedi File

@@ -1059,7 +1059,7 @@ void Endstops::update() {
1059 1059
     }
1060 1060
   #endif
1061 1061
 
1062
-  #if LINEAR_AXES >= 4
1062
+  #if HAS_I_AXIS
1063 1063
     if (stepper.axis_is_moving(I_AXIS)) {
1064 1064
       if (stepper.motor_direction(I_AXIS_HEAD)) { // -direction
1065 1065
         #if HAS_I_MIN || (I_SPI_SENSORLESS && I_HOME_TO_MIN)
@@ -1074,7 +1074,7 @@ void Endstops::update() {
1074 1074
     }
1075 1075
   #endif
1076 1076
 
1077
-  #if LINEAR_AXES >= 5
1077
+  #if HAS_J_AXIS
1078 1078
     if (stepper.axis_is_moving(J_AXIS)) {
1079 1079
       if (stepper.motor_direction(J_AXIS_HEAD)) { // -direction
1080 1080
         #if HAS_J_MIN || (J_SPI_SENSORLESS && J_HOME_TO_MIN)
@@ -1089,7 +1089,7 @@ void Endstops::update() {
1089 1089
     }
1090 1090
   #endif
1091 1091
 
1092
-  #if LINEAR_AXES >= 6
1092
+  #if HAS_K_AXIS
1093 1093
     if (stepper.axis_is_moving(K_AXIS)) {
1094 1094
       if (stepper.motor_direction(K_AXIS_HEAD)) { // -direction
1095 1095
         #if HAS_K_MIN || (K_SPI_SENSORLESS && K_HOME_TO_MIN)

+ 15
- 15
Marlin/src/module/motion.cpp Vedi File

@@ -603,7 +603,7 @@ void do_blocking_move_to_x(const_float_t rx, const_feedRate_t fr_mm_s/*=0.0*/) {
603 603
   }
604 604
 #endif
605 605
 
606
-#if LINEAR_AXES >= 4
606
+#if HAS_I_AXIS
607 607
   void do_blocking_move_to_i(const_float_t ri, const_feedRate_t fr_mm_s/*=0.0*/) {
608 608
     do_blocking_move_to_xyz_i(current_position, ri, fr_mm_s);
609 609
   }
@@ -615,7 +615,7 @@ void do_blocking_move_to_x(const_float_t rx, const_feedRate_t fr_mm_s/*=0.0*/) {
615 615
   }
616 616
 #endif
617 617
 
618
-#if LINEAR_AXES >= 5
618
+#if HAS_J_AXIS
619 619
   void do_blocking_move_to_j(const_float_t rj, const_feedRate_t fr_mm_s/*=0.0*/) {
620 620
     do_blocking_move_to_xyzi_j(current_position, rj, fr_mm_s);
621 621
   }
@@ -627,7 +627,7 @@ void do_blocking_move_to_x(const_float_t rx, const_feedRate_t fr_mm_s/*=0.0*/) {
627 627
   }
628 628
 #endif
629 629
 
630
-#if LINEAR_AXES >= 6
630
+#if HAS_K_AXIS
631 631
   void do_blocking_move_to_k(const_float_t rk, const_feedRate_t fr_mm_s/*=0.0*/) {
632 632
     do_blocking_move_to_xyzij_k(current_position, rk, fr_mm_s);
633 633
   }
@@ -839,7 +839,7 @@ void restore_feedrate_and_scaling() {
839 839
         #endif
840 840
       }
841 841
     #endif
842
-    #if LINEAR_AXES >= 4
842
+    #if HAS_I_AXIS
843 843
       if (axis_was_homed(I_AXIS)) {
844 844
         #if !HAS_SOFTWARE_ENDSTOPS || ENABLED(MIN_SOFTWARE_ENDSTOP_I)
845 845
           NOLESS(target.i, soft_endstop.min.i);
@@ -849,7 +849,7 @@ void restore_feedrate_and_scaling() {
849 849
         #endif
850 850
       }
851 851
     #endif
852
-    #if LINEAR_AXES >= 5
852
+    #if HAS_J_AXIS
853 853
       if (axis_was_homed(J_AXIS)) {
854 854
         #if !HAS_SOFTWARE_ENDSTOPS || ENABLED(MIN_SOFTWARE_ENDSTOP_J)
855 855
           NOLESS(target.j, soft_endstop.min.j);
@@ -859,7 +859,7 @@ void restore_feedrate_and_scaling() {
859 859
         #endif
860 860
       }
861 861
     #endif
862
-    #if LINEAR_AXES >= 6
862
+    #if HAS_K_AXIS
863 863
       if (axis_was_homed(K_AXIS)) {
864 864
         #if !HAS_SOFTWARE_ENDSTOPS || ENABLED(MIN_SOFTWARE_ENDSTOP_K)
865 865
           NOLESS(target.k, soft_endstop.min.k);
@@ -1417,13 +1417,13 @@ void prepare_line_to_destination() {
1417 1417
           #if HAS_Z_AXIS
1418 1418
             case Z_AXIS: if (ENABLED(Z_SPI_SENSORLESS)) endstops.tmc_spi_homing.z = true; break;
1419 1419
           #endif
1420
-          #if LINEAR_AXES >= 4
1420
+          #if HAS_I_AXIS
1421 1421
             case I_AXIS: if (ENABLED(I_SPI_SENSORLESS)) endstops.tmc_spi_homing.i = true; break;
1422 1422
           #endif
1423
-          #if LINEAR_AXES >= 5
1423
+          #if HAS_J_AXIS
1424 1424
             case J_AXIS: if (ENABLED(J_SPI_SENSORLESS)) endstops.tmc_spi_homing.j = true; break;
1425 1425
           #endif
1426
-          #if LINEAR_AXES >= 6
1426
+          #if HAS_K_AXIS
1427 1427
             case K_AXIS: if (ENABLED(K_SPI_SENSORLESS)) endstops.tmc_spi_homing.k = true; break;
1428 1428
           #endif
1429 1429
           default: break;
@@ -1494,13 +1494,13 @@ void prepare_line_to_destination() {
1494 1494
           #if HAS_Z_AXIS
1495 1495
             case Z_AXIS: if (ENABLED(Z_SPI_SENSORLESS)) endstops.tmc_spi_homing.z = false; break;
1496 1496
           #endif
1497
-          #if LINEAR_AXES >= 4
1497
+          #if HAS_I_AXIS
1498 1498
             case I_AXIS: if (ENABLED(I_SPI_SENSORLESS)) endstops.tmc_spi_homing.i = false; break;
1499 1499
           #endif
1500
-          #if LINEAR_AXES >= 5
1500
+          #if HAS_J_AXIS
1501 1501
             case J_AXIS: if (ENABLED(J_SPI_SENSORLESS)) endstops.tmc_spi_homing.j = false; break;
1502 1502
           #endif
1503
-          #if LINEAR_AXES >= 6
1503
+          #if HAS_K_AXIS
1504 1504
             case K_AXIS: if (ENABLED(K_SPI_SENSORLESS)) endstops.tmc_spi_homing.k = false; break;
1505 1505
           #endif
1506 1506
           default: break;
@@ -1821,13 +1821,13 @@ void prepare_line_to_destination() {
1821 1821
           case X_AXIS: es = X_ENDSTOP; break;
1822 1822
           case Y_AXIS: es = Y_ENDSTOP; break;
1823 1823
           case Z_AXIS: es = Z_ENDSTOP; break;
1824
-          #if LINEAR_AXES >= 4
1824
+          #if HAS_I_AXIS
1825 1825
             case I_AXIS: es = I_ENDSTOP; break;
1826 1826
           #endif
1827
-          #if LINEAR_AXES >= 5
1827
+          #if HAS_J_AXIS
1828 1828
             case J_AXIS: es = J_ENDSTOP; break;
1829 1829
           #endif
1830
-          #if LINEAR_AXES >= 6
1830
+          #if HAS_K_AXIS
1831 1831
             case K_AXIS: es = K_ENDSTOP; break;
1832 1832
           #endif
1833 1833
         }

+ 9
- 9
Marlin/src/module/motion.h Vedi File

@@ -180,19 +180,19 @@ inline float home_bump_mm(const AxisEnum axis) {
180 180
               TERN_(MAX_SOFTWARE_ENDSTOP_Z, amax = max.z);
181 181
               break;
182 182
           #endif
183
-          #if LINEAR_AXES >= 4
183
+          #if HAS_I_AXIS
184 184
             case I_AXIS:
185 185
               TERN_(MIN_SOFTWARE_ENDSTOP_I, amin = min.i);
186 186
               TERN_(MIN_SOFTWARE_ENDSTOP_I, amax = max.i);
187 187
               break;
188 188
           #endif
189
-          #if LINEAR_AXES >= 5
189
+          #if HAS_J_AXIS
190 190
             case J_AXIS:
191 191
               TERN_(MIN_SOFTWARE_ENDSTOP_J, amin = min.j);
192 192
               TERN_(MIN_SOFTWARE_ENDSTOP_J, amax = max.j);
193 193
               break;
194 194
           #endif
195
-          #if LINEAR_AXES >= 6
195
+          #if HAS_K_AXIS
196 196
             case K_AXIS:
197 197
               TERN_(MIN_SOFTWARE_ENDSTOP_K, amin = min.k);
198 198
               TERN_(MIN_SOFTWARE_ENDSTOP_K, amax = max.k);
@@ -333,15 +333,15 @@ void do_blocking_move_to_x(const_float_t rx, const_feedRate_t fr_mm_s=0.0f);
333 333
 #if HAS_Z_AXIS
334 334
   void do_blocking_move_to_z(const_float_t rz, const_feedRate_t fr_mm_s=0.0f);
335 335
 #endif
336
-#if LINEAR_AXES >= 4
336
+#if HAS_I_AXIS
337 337
   void do_blocking_move_to_i(const_float_t ri, const_feedRate_t fr_mm_s=0.0f);
338 338
   void do_blocking_move_to_xyz_i(const xyze_pos_t &raw, const_float_t i, const_feedRate_t fr_mm_s=0.0f);
339 339
 #endif
340
-#if LINEAR_AXES >= 5
340
+#if HAS_J_AXIS
341 341
   void do_blocking_move_to_j(const_float_t rj, const_feedRate_t fr_mm_s=0.0f);
342 342
   void do_blocking_move_to_xyzi_j(const xyze_pos_t &raw, const_float_t j, const_feedRate_t fr_mm_s=0.0f);
343 343
 #endif
344
-#if LINEAR_AXES >= 6
344
+#if HAS_K_AXIS
345 345
   void do_blocking_move_to_k(const_float_t rk, const_feedRate_t fr_mm_s=0.0f);
346 346
   void do_blocking_move_to_xyzij_k(const xyze_pos_t &raw, const_float_t k, const_feedRate_t fr_mm_s=0.0f);
347 347
 #endif
@@ -476,15 +476,15 @@ void home_if_needed(const bool keeplev=false);
476 476
   #define LOGICAL_Z_POSITION(POS) NATIVE_TO_LOGICAL(POS, Z_AXIS)
477 477
   #define RAW_Z_POSITION(POS)     LOGICAL_TO_NATIVE(POS, Z_AXIS)
478 478
 #endif
479
-#if LINEAR_AXES >= 4
479
+#if HAS_I_AXIS
480 480
   #define LOGICAL_I_POSITION(POS) NATIVE_TO_LOGICAL(POS, I_AXIS)
481 481
   #define RAW_I_POSITION(POS)     LOGICAL_TO_NATIVE(POS, I_AXIS)
482 482
 #endif
483
-#if LINEAR_AXES >= 5
483
+#if HAS_J_AXIS
484 484
   #define LOGICAL_J_POSITION(POS) NATIVE_TO_LOGICAL(POS, J_AXIS)
485 485
   #define RAW_J_POSITION(POS)     LOGICAL_TO_NATIVE(POS, J_AXIS)
486 486
 #endif
487
-#if LINEAR_AXES >= 6
487
+#if HAS_K_AXIS
488 488
   #define LOGICAL_K_POSITION(POS) NATIVE_TO_LOGICAL(POS, K_AXIS)
489 489
   #define RAW_K_POSITION(POS)     LOGICAL_TO_NATIVE(POS, K_AXIS)
490 490
 #endif

+ 16
- 16
Marlin/src/module/planner.cpp Vedi File

@@ -1866,13 +1866,13 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
1866 1866
       " A:", target.a, " (", da, " steps)"
1867 1867
       " B:", target.b, " (", db, " steps)"
1868 1868
       " C:", target.c, " (", dc, " steps)"
1869
-      #if LINEAR_AXES >= 4
1869
+      #if HAS_I_AXIS
1870 1870
         " " AXIS4_STR ":", target.i, " (", di, " steps)"
1871 1871
       #endif
1872
-      #if LINEAR_AXES >= 5
1872
+      #if HAS_J_AXIS
1873 1873
         " " AXIS5_STR ":", target.j, " (", dj, " steps)"
1874 1874
       #endif
1875
-      #if LINEAR_AXES >= 6
1875
+      #if HAS_K_AXIS
1876 1876
         " " AXIS6_STR ":", target.k, " (", dk, " steps)"
1877 1877
       #endif
1878 1878
       #if HAS_EXTRUDERS
@@ -1939,13 +1939,13 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
1939 1939
       if (db + dc < 0) SBI(dm, B_AXIS);           // Motor B direction
1940 1940
       if (CORESIGN(db - dc) < 0) SBI(dm, C_AXIS); // Motor C direction
1941 1941
     #endif
1942
-    #if LINEAR_AXES >= 4
1942
+    #if HAS_I_AXIS
1943 1943
       if (di < 0) SBI(dm, I_AXIS);
1944 1944
     #endif
1945
-    #if LINEAR_AXES >= 5
1945
+    #if HAS_J_AXIS
1946 1946
       if (dj < 0) SBI(dm, J_AXIS);
1947 1947
     #endif
1948
-    #if LINEAR_AXES >= 6
1948
+    #if HAS_K_AXIS
1949 1949
       if (dk < 0) SBI(dm, K_AXIS);
1950 1950
     #endif
1951 1951
   #elif ENABLED(MARKFORGED_XY)
@@ -2041,13 +2041,13 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
2041 2041
       steps_dist_mm.b      = (db + dc) * mm_per_step[B_AXIS];
2042 2042
       steps_dist_mm.c      = CORESIGN(db - dc) * mm_per_step[C_AXIS];
2043 2043
     #endif
2044
-    #if LINEAR_AXES >= 4
2044
+    #if HAS_I_AXIS
2045 2045
       steps_dist_mm.i = di * mm_per_step[I_AXIS];
2046 2046
     #endif
2047
-    #if LINEAR_AXES >= 5
2047
+    #if HAS_J_AXIS
2048 2048
       steps_dist_mm.j = dj * mm_per_step[J_AXIS];
2049 2049
     #endif
2050
-    #if LINEAR_AXES >= 6
2050
+    #if HAS_K_AXIS
2051 2051
       steps_dist_mm.k = dk * mm_per_step[K_AXIS];
2052 2052
     #endif
2053 2053
   #elif ENABLED(MARKFORGED_XY)
@@ -2104,7 +2104,7 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
2104 2104
           )
2105 2105
         #elif ENABLED(FOAMCUTTER_XYUV)
2106 2106
           // Return the largest distance move from either X/Y or I/J plane
2107
-          #if LINEAR_AXES >= 5
2107
+          #if HAS_J_AXIS
2108 2108
             _MAX(sq(steps_dist_mm.x) + sq(steps_dist_mm.y), sq(steps_dist_mm.i) + sq(steps_dist_mm.j))
2109 2109
           #else
2110 2110
             sq(steps_dist_mm.x) + sq(steps_dist_mm.y)
@@ -2197,13 +2197,13 @@ bool Planner::_populate_block(block_t * const block, bool split_move,
2197 2197
     );
2198 2198
   #endif
2199 2199
   #if ANY(CORE_IS_XY, MARKFORGED_XY, MARKFORGED_YX)
2200
-    #if LINEAR_AXES >= 4
2200
+    #if HAS_I_AXIS
2201 2201
       if (block->steps.i) stepper.enable_axis(I_AXIS);
2202 2202
     #endif
2203
-    #if LINEAR_AXES >= 5
2203
+    #if HAS_J_AXIS
2204 2204
       if (block->steps.j) stepper.enable_axis(J_AXIS);
2205 2205
     #endif
2206
-    #if LINEAR_AXES >= 6
2206
+    #if HAS_K_AXIS
2207 2207
       if (block->steps.k) stepper.enable_axis(K_AXIS);
2208 2208
     #endif
2209 2209
   #endif
@@ -2949,17 +2949,17 @@ bool Planner::buffer_segment(const abce_pos_t &abce
2949 2949
       SERIAL_ECHOPGM(" (", position.z, "->", target.z);
2950 2950
       SERIAL_CHAR(')');
2951 2951
     #endif
2952
-    #if LINEAR_AXES >= 4
2952
+    #if HAS_I_AXIS
2953 2953
       SERIAL_ECHOPGM_P(SP_I_LBL, abce.i);
2954 2954
       SERIAL_ECHOPGM(" (", position.i, "->", target.i);
2955 2955
       SERIAL_CHAR(')');
2956 2956
     #endif
2957
-    #if LINEAR_AXES >= 5
2957
+    #if HAS_J_AXIS
2958 2958
       SERIAL_ECHOPGM_P(SP_J_LBL, abce.j);
2959 2959
       SERIAL_ECHOPGM(" (", position.j, "->", target.j);
2960 2960
       SERIAL_CHAR(')');
2961 2961
     #endif
2962
-    #if LINEAR_AXES >= 6
2962
+    #if HAS_K_AXIS
2963 2963
       SERIAL_ECHOPGM_P(SP_K_LBL, abce.k);
2964 2964
       SERIAL_ECHOPGM(" (", position.k, "->", target.k);
2965 2965
       SERIAL_CHAR(')');

+ 3
- 3
Marlin/src/module/settings.cpp Vedi File

@@ -2712,13 +2712,13 @@ void MarlinSettings::reset() {
2712 2712
     #if HAS_Z_AXIS && !defined(DEFAULT_ZJERK)
2713 2713
       #define DEFAULT_ZJERK 0
2714 2714
     #endif
2715
-    #if LINEAR_AXES >= 4 && !defined(DEFAULT_IJERK)
2715
+    #if HAS_I_AXIS && !defined(DEFAULT_IJERK)
2716 2716
       #define DEFAULT_IJERK 0
2717 2717
     #endif
2718
-    #if LINEAR_AXES >= 5 && !defined(DEFAULT_JJERK)
2718
+    #if HAS_J_AXIS && !defined(DEFAULT_JJERK)
2719 2719
       #define DEFAULT_JJERK 0
2720 2720
     #endif
2721
-    #if LINEAR_AXES >= 6 && !defined(DEFAULT_KJERK)
2721
+    #if HAS_K_AXIS && !defined(DEFAULT_KJERK)
2722 2722
       #define DEFAULT_KJERK 0
2723 2723
     #endif
2724 2724
     planner.max_jerk.set(

+ 8
- 8
Marlin/src/module/stepper.cpp Vedi File

@@ -435,15 +435,15 @@ xyze_int8_t Stepper::count_direction{0};
435 435
   #define Z_APPLY_STEP(v,Q) Z_STEP_WRITE(v)
436 436
 #endif
437 437
 
438
-#if LINEAR_AXES >= 4
438
+#if HAS_I_AXIS
439 439
   #define I_APPLY_DIR(v,Q) I_DIR_WRITE(v)
440 440
   #define I_APPLY_STEP(v,Q) I_STEP_WRITE(v)
441 441
 #endif
442
-#if LINEAR_AXES >= 5
442
+#if HAS_J_AXIS
443 443
   #define J_APPLY_DIR(v,Q) J_DIR_WRITE(v)
444 444
   #define J_APPLY_STEP(v,Q) J_STEP_WRITE(v)
445 445
 #endif
446
-#if LINEAR_AXES >= 6
446
+#if HAS_K_AXIS
447 447
   #define K_APPLY_DIR(v,Q) K_DIR_WRITE(v)
448 448
   #define K_APPLY_STEP(v,Q) K_STEP_WRITE(v)
449 449
 #endif
@@ -1688,7 +1688,7 @@ void Stepper::pulse_phase_isr() {
1688 1688
     const bool is_page = IS_PAGE(current_block);
1689 1689
 
1690 1690
     #if ENABLED(DIRECT_STEPPING)
1691
-      // TODO (DerAndere): Add support for LINEAR_AXES >= 4
1691
+      // TODO (DerAndere): Add support for HAS_I_AXIS
1692 1692
       if (is_page) {
1693 1693
 
1694 1694
         #if STEPPER_PAGE_FORMAT == SP_4x4D_128
@@ -1929,7 +1929,7 @@ uint32_t Stepper::block_phase_isr() {
1929 1929
     // If current block is finished, reset pointer and finalize state
1930 1930
     if (step_events_completed >= step_event_count) {
1931 1931
       #if ENABLED(DIRECT_STEPPING)
1932
-        // TODO (DerAndere): Add support for LINEAR_AXES >= 4
1932
+        // TODO (DerAndere): Add support for HAS_I_AXIS
1933 1933
         #if STEPPER_PAGE_FORMAT == SP_4x4D_128
1934 1934
           #define PAGE_SEGMENT_UPDATE_POS(AXIS) \
1935 1935
             count_position[_AXIS(AXIS)] += page_step_state.bd[_AXIS(AXIS)] - 128 * 7;
@@ -3184,13 +3184,13 @@ void Stepper::report_positions() {
3184 3184
 
3185 3185
       } break;
3186 3186
 
3187
-      #if LINEAR_AXES >= 4
3187
+      #if HAS_I_AXIS
3188 3188
         case I_AXIS: BABYSTEP_AXIS(I, 0, direction); break;
3189 3189
       #endif
3190
-      #if LINEAR_AXES >= 5
3190
+      #if HAS_J_AXIS
3191 3191
         case J_AXIS: BABYSTEP_AXIS(J, 0, direction); break;
3192 3192
       #endif
3193
-      #if LINEAR_AXES >= 6
3193
+      #if HAS_K_AXIS
3194 3194
         case K_AXIS: BABYSTEP_AXIS(K, 0, direction); break;
3195 3195
       #endif
3196 3196
 

+ 6
- 6
Marlin/src/module/stepper/indirection.h Vedi File

@@ -206,7 +206,7 @@ void reset_stepper_drivers();    // Called by settings.load / settings.reset
206 206
 #endif
207 207
 
208 208
 // I Stepper
209
-#if LINEAR_AXES >= 4
209
+#if HAS_I_AXIS
210 210
   #ifndef I_ENABLE_INIT
211 211
     #define I_ENABLE_INIT() SET_OUTPUT(I_ENABLE_PIN)
212 212
     #define I_ENABLE_WRITE(STATE) WRITE(I_ENABLE_PIN,STATE)
@@ -225,7 +225,7 @@ void reset_stepper_drivers();    // Called by settings.load / settings.reset
225 225
 #endif
226 226
 
227 227
 // J Stepper
228
-#if LINEAR_AXES >= 5
228
+#if HAS_J_AXIS
229 229
   #ifndef J_ENABLE_INIT
230 230
     #define J_ENABLE_INIT() SET_OUTPUT(J_ENABLE_PIN)
231 231
     #define J_ENABLE_WRITE(STATE) WRITE(J_ENABLE_PIN,STATE)
@@ -244,7 +244,7 @@ void reset_stepper_drivers();    // Called by settings.load / settings.reset
244 244
 #endif
245 245
 
246 246
 // K Stepper
247
-#if LINEAR_AXES >= 6
247
+#if HAS_K_AXIS
248 248
   #ifndef K_ENABLE_INIT
249 249
     #define K_ENABLE_INIT() SET_OUTPUT(K_ENABLE_PIN)
250 250
     #define K_ENABLE_WRITE(STATE) WRITE(K_ENABLE_PIN,STATE)
@@ -895,21 +895,21 @@ void reset_stepper_drivers();    // Called by settings.load / settings.reset
895 895
   #define Z_RESET()
896 896
 #endif
897 897
 
898
-#if LINEAR_AXES >= 4
898
+#if HAS_I_AXIS
899 899
   #define  ENABLE_AXIS_I() if (SHOULD_ENABLE(i))  {  ENABLE_STEPPER_I(); AFTER_CHANGE(i, true); }
900 900
   #define DISABLE_AXIS_I() if (SHOULD_DISABLE(i)) { DISABLE_STEPPER_I(); AFTER_CHANGE(i, false); set_axis_untrusted(I_AXIS); }
901 901
 #else
902 902
   #define  ENABLE_AXIS_I() NOOP
903 903
   #define DISABLE_AXIS_I() NOOP
904 904
 #endif
905
-#if LINEAR_AXES >= 5
905
+#if HAS_J_AXIS
906 906
   #define  ENABLE_AXIS_J() if (SHOULD_ENABLE(j))  {  ENABLE_STEPPER_J(); AFTER_CHANGE(j, true); }
907 907
   #define DISABLE_AXIS_J() if (SHOULD_DISABLE(j)) { DISABLE_STEPPER_J(); AFTER_CHANGE(j, false); set_axis_untrusted(J_AXIS); }
908 908
 #else
909 909
   #define  ENABLE_AXIS_J() NOOP
910 910
   #define DISABLE_AXIS_J() NOOP
911 911
 #endif
912
-#if LINEAR_AXES >= 6
912
+#if HAS_K_AXIS
913 913
   #define  ENABLE_AXIS_K() if (SHOULD_ENABLE(k))  {  ENABLE_STEPPER_K(); AFTER_CHANGE(k, true); }
914 914
   #define DISABLE_AXIS_K() if (SHOULD_DISABLE(k)) { DISABLE_STEPPER_K(); AFTER_CHANGE(k, false); set_axis_untrusted(K_AXIS); }
915 915
 #else

+ 3
- 3
Marlin/src/module/stepper/trinamic.h Vedi File

@@ -83,13 +83,13 @@
83 83
 #if HAS_Z_AXIS && !defined(CHOPPER_TIMING_Z)
84 84
   #define CHOPPER_TIMING_Z CHOPPER_TIMING
85 85
 #endif
86
-#if LINEAR_AXES >= 4 && !defined(CHOPPER_TIMING_I)
86
+#if HAS_I_AXIS && !defined(CHOPPER_TIMING_I)
87 87
   #define CHOPPER_TIMING_I CHOPPER_TIMING
88 88
 #endif
89
-#if LINEAR_AXES >= 5 && !defined(CHOPPER_TIMING_J)
89
+#if HAS_J_AXIS && !defined(CHOPPER_TIMING_J)
90 90
   #define CHOPPER_TIMING_J CHOPPER_TIMING
91 91
 #endif
92
-#if LINEAR_AXES >= 6 && !defined(CHOPPER_TIMING_K)
92
+#if HAS_K_AXIS && !defined(CHOPPER_TIMING_K)
93 93
   #define CHOPPER_TIMING_K CHOPPER_TIMING
94 94
 #endif
95 95
 #if HAS_EXTRUDERS && !defined(CHOPPER_TIMING_E)

+ 1
- 1
Marlin/src/pins/lpc1768/pins_RAMPS_RE_ARM.h Vedi File

@@ -228,7 +228,7 @@
228 228
 
229 229
 #define PS_ON_PIN                          P2_12  // (12)
230 230
 
231
-#if !defined(TEMP_0_CS_PIN) && DISABLED(USE_ZMAX_PLUG)
231
+#if !defined(TEMP_0_CS_PIN) && !(HAS_Z_AXIS && Z_HOME_DIR)
232 232
   #define TEMP_0_CS_PIN                    P1_28
233 233
 #endif
234 234
 

+ 8
- 8
Marlin/src/pins/pins_postprocess.h Vedi File

@@ -477,7 +477,7 @@
477 477
   #endif
478 478
 #endif
479 479
 
480
-#if LINEAR_AXES >= 4
480
+#if HAS_I_AXIS
481 481
   #ifdef I_STOP_PIN
482 482
     #if I_HOME_TO_MIN
483 483
       #define I_MIN_PIN I_STOP_PIN
@@ -500,7 +500,7 @@
500 500
   #undef I_MAX_PIN
501 501
 #endif
502 502
 
503
-#if LINEAR_AXES >= 5
503
+#if HAS_J_AXIS
504 504
   #ifdef J_STOP_PIN
505 505
     #if J_HOME_TO_MIN
506 506
       #define J_MIN_PIN J_STOP_PIN
@@ -523,7 +523,7 @@
523 523
   #undef J_MAX_PIN
524 524
 #endif
525 525
 
526
-#if LINEAR_AXES >= 6
526
+#if HAS_K_AXIS
527 527
   #ifdef K_STOP_PIN
528 528
     #if K_HOME_TO_MIN
529 529
       #define K_MIN_PIN K_STOP_PIN
@@ -1027,12 +1027,12 @@
1027 1027
 #endif
1028 1028
 
1029 1029
 // The I axis, if any, should be the next open extruder port
1030
-#if LINEAR_AXES >= 4 && !defined(I_DIAG_PIN) && !defined(I_STEP_PIN) && !PIN_EXISTS(I_CS_PIN)
1030
+#if HAS_I_AXIS && !defined(I_DIAG_PIN) && !defined(I_STEP_PIN) && !PIN_EXISTS(I_CS_PIN)
1031 1031
   #define J_E_INDEX INCREMENT(I_E_INDEX)
1032 1032
 #else
1033 1033
   #define J_E_INDEX I_E_INDEX
1034 1034
 #endif
1035
-#if LINEAR_AXES >= 4
1035
+#if HAS_I_AXIS
1036 1036
   #ifndef I_STEP_PIN
1037 1037
     #define I_STEP_PIN   _EPIN(I_E_INDEX, STEP)
1038 1038
     #define I_DIR_PIN    _EPIN(I_E_INDEX, DIR)
@@ -1112,12 +1112,12 @@
1112 1112
 #endif
1113 1113
 
1114 1114
 // The J axis, if any, should be the next open extruder port
1115
-#if LINEAR_AXES >= 5 && !defined(J_DIAG_PIN) && !defined(J_STEP_PIN) && !PIN_EXISTS(J_CS_PIN)
1115
+#if HAS_J_AXIS && !defined(J_DIAG_PIN) && !defined(J_STEP_PIN) && !PIN_EXISTS(J_CS_PIN)
1116 1116
   #define K_E_INDEX INCREMENT(J_E_INDEX)
1117 1117
 #else
1118 1118
   #define K_E_INDEX J_E_INDEX
1119 1119
 #endif
1120
-#if LINEAR_AXES >= 5
1120
+#if HAS_J_AXIS
1121 1121
   #ifndef J_STEP_PIN
1122 1122
     #define J_STEP_PIN   _EPIN(J_E_INDEX, STEP)
1123 1123
     #define J_DIR_PIN    _EPIN(J_E_INDEX, DIR)
@@ -1197,7 +1197,7 @@
1197 1197
 #endif
1198 1198
 
1199 1199
 // The K axis, if any, should be the next open extruder port
1200
-#if LINEAR_AXES >= 6
1200
+#if HAS_K_AXIS
1201 1201
   #ifndef K_STEP_PIN
1202 1202
     #define K_STEP_PIN   _EPIN(K_E_INDEX, STEP)
1203 1203
     #define K_DIR_PIN    _EPIN(K_E_INDEX, DIR)

+ 5
- 5
Marlin/src/pins/rambo/pins_EINSY_RETRO.h Vedi File

@@ -55,7 +55,6 @@
55 55
 
56 56
   #define X_MIN_PIN                           12  // X-
57 57
   #define Y_MIN_PIN                           11  // Y-
58
-  #define Z_MIN_PIN                           10  // Z-
59 58
   #define X_MAX_PIN                           81  // X+
60 59
   #define Y_MAX_PIN                           57  // Y+
61 60
 
@@ -78,15 +77,16 @@
78 77
   #endif
79 78
 
80 79
   #if ENABLED(BLTOUCH)
81
-    #define Z_MIN_PIN                         11  // Y-MIN
82
-    #define SERVO0_PIN                        10  // Z-MIN
83
-  #else
84
-    #define Z_MIN_PIN                         10
80
+    #define Z_MIN_PIN                         11  // Y-
81
+    #define SERVO0_PIN                        10  // Z-
85 82
   #endif
86 83
 
87 84
 #endif
88 85
 
89 86
 #define Z_MAX_PIN                              7
87
+#ifndef Z_MIN_PIN                              7
88
+  #define Z_MIN_PIN                           10  // Z-
89
+#endif
90 90
 
91 91
 //
92 92
 // Z Probe (when not Z_MIN_PIN)

+ 0
- 4
Marlin/src/pins/sam/pins_RURAMPS4D_11.h Vedi File

@@ -117,10 +117,6 @@
117 117
 //#define E3_MS2_PIN         ?
118 118
 //#define E3_MS3_PIN         ?
119 119
 
120
-#if USES_Z_MIN_PROBE_PIN
121
-  #define Z_MIN_PROBE_PIN                     49
122
-#endif
123
-
124 120
 #ifndef FIL_RUNOUT_PIN
125 121
   #define FIL_RUNOUT_PIN               Y_MIN_PIN
126 122
 #endif

+ 1
- 8
Marlin/src/pins/sam/pins_RURAMPS4D_13.h Vedi File

@@ -54,13 +54,6 @@
54 54
 #define Z_MAX_PIN                             43
55 55
 
56 56
 //
57
-// Z Probe (when not Z_MIN_PIN)
58
-//
59
-#ifndef Z_MIN_PROBE_PIN
60
-  #define Z_MIN_PROBE_PIN                     49
61
-#endif
62
-
63
-//
64 57
 // Steppers
65 58
 //
66 59
 #define X_STEP_PIN                            37  // Support Extension Board
@@ -105,7 +98,7 @@
105 98
   #define E2_CS_PIN                           61
106 99
 #endif
107 100
 
108
-#if USES_Z_MIN_PROBE_PIN
101
+#ifndef Z_MIN_PROBE_PIN
109 102
   #define Z_MIN_PROBE_PIN                     49
110 103
 #endif
111 104
 

+ 3
- 3
Marlin/src/pins/sensitive_pins.h Vedi File

@@ -155,7 +155,7 @@
155 155
 
156 156
 #endif
157 157
 
158
-#if LINEAR_AXES >= 4
158
+#if HAS_I_AXIS
159 159
 
160 160
   #if PIN_EXISTS(I_MIN)
161 161
     #define _I_MIN I_MIN_PIN,
@@ -201,7 +201,7 @@
201 201
 
202 202
 #endif
203 203
 
204
-#if LINEAR_AXES >= 5
204
+#if HAS_J_AXIS
205 205
 
206 206
   #if PIN_EXISTS(J_MIN)
207 207
     #define _J_MIN J_MIN_PIN,
@@ -247,7 +247,7 @@
247 247
 
248 248
 #endif
249 249
 
250
-#if LINEAR_AXES >= 6
250
+#if HAS_K_AXIS
251 251
 
252 252
   #if PIN_EXISTS(K_MIN)
253 253
     #define _K_MIN K_MIN_PIN,

+ 1
- 2
Marlin/src/pins/stm32f7/pins_REMRAM_V1.h Vedi File

@@ -44,14 +44,13 @@
44 44
   #define X_MAX_PIN                           59
45 45
   #define Y_MIN_PIN                           60
46 46
   #define Y_MAX_PIN                           61
47
-  #define Z_MIN_PIN                           62
48 47
   #define Z_MAX_PIN                           63
49 48
 #else
50 49
   #define X_STOP_PIN                          36
51 50
   #define Y_STOP_PIN                          39
52
-  #define Z_MIN_PIN                           62
53 51
   #define Z_MAX_PIN                           42
54 52
 #endif
53
+#define Z_MIN_PIN                             62
55 54
 
56 55
 //
57 56
 // Z Probe (when not Z_MIN_PIN)

Loading…
Annulla
Salva