Browse Source

🐛 Fix compile without Y/Z (#24858)

Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
karliss 1 year ago
parent
commit
52096599b3
No account linked to committer's email address

+ 6
- 2
Marlin/src/gcode/feature/trinamic/M569.cpp View File

197
   if (chop_x2 || chop_y2 || chop_z2) {
197
   if (chop_x2 || chop_y2 || chop_z2) {
198
     say_M569(forReplay, F("I1"));
198
     say_M569(forReplay, F("I1"));
199
     if (chop_x2) SERIAL_ECHOPGM_P(SP_X_STR);
199
     if (chop_x2) SERIAL_ECHOPGM_P(SP_X_STR);
200
-    if (chop_y2) SERIAL_ECHOPGM_P(SP_Y_STR);
201
-    if (chop_z2) SERIAL_ECHOPGM_P(SP_Z_STR);
200
+    #if HAS_Y_AXIS
201
+      if (chop_y2) SERIAL_ECHOPGM_P(SP_Y_STR);
202
+    #endif
203
+    #if HAS_Z_AXIS
204
+      if (chop_z2) SERIAL_ECHOPGM_P(SP_Z_STR);
205
+    #endif
202
     SERIAL_EOL();
206
     SERIAL_EOL();
203
   }
207
   }
204
 
208
 

+ 25
- 8
Marlin/src/gcode/host/M115.cpp View File

222
 
222
 
223
     // Machine Geometry
223
     // Machine Geometry
224
     #if ENABLED(M115_GEOMETRY_REPORT)
224
     #if ENABLED(M115_GEOMETRY_REPORT)
225
-      const xyz_pos_t bmin = { 0, 0, 0 },
226
-                      bmax = { X_BED_SIZE , Y_BED_SIZE, Z_MAX_POS },
227
-                      dmin = { X_MIN_POS, Y_MIN_POS, Z_MIN_POS },
228
-                      dmax = { X_MAX_POS, Y_MAX_POS, Z_MAX_POS };
225
+      constexpr xyz_pos_t bmin{0},
226
+                          bmax = ARRAY_N(NUM_AXES, X_BED_SIZE, Y_BED_SIZE, Z_MAX_POS, I_MAX_POS, J_MAX_POS, K_MAX_POS, U_MAX_POS, V_MAX_POS, W_MAX_POS),
227
+                          dmin = ARRAY_N(NUM_AXES, X_MIN_POS,  Y_MIN_POS,  Z_MIN_POS, I_MIN_POS, J_MIN_POS, K_MIN_POS, U_MIN_POS, V_MIN_POS, W_MIN_POS),
228
+                          dmax = ARRAY_N(NUM_AXES, X_MAX_POS,  Y_MAX_POS,  Z_MAX_POS, I_MAX_POS, J_MAX_POS, K_MAX_POS, U_MAX_POS, V_MAX_POS, W_MAX_POS);
229
       xyz_pos_t cmin = bmin, cmax = bmax;
229
       xyz_pos_t cmin = bmin, cmax = bmax;
230
       apply_motion_limits(cmin);
230
       apply_motion_limits(cmin);
231
       apply_motion_limits(cmax);
231
       apply_motion_limits(cmax);
232
       const xyz_pos_t lmin = dmin.asLogical(), lmax = dmax.asLogical(),
232
       const xyz_pos_t lmin = dmin.asLogical(), lmax = dmax.asLogical(),
233
                       wmin = cmin.asLogical(), wmax = cmax.asLogical();
233
                       wmin = cmin.asLogical(), wmax = cmax.asLogical();
234
+
234
       SERIAL_ECHOLNPGM(
235
       SERIAL_ECHOLNPGM(
235
         "area:{"
236
         "area:{"
236
           "full:{"
237
           "full:{"
237
-            "min:{x:", lmin.x, ",y:", lmin.y, ",z:", lmin.z, "},"
238
-            "max:{x:", lmax.x, ",y:", lmax.y, ",z:", lmax.z, "}"
238
+            LIST_N(DOUBLE(NUM_AXES),
239
+              "min:{x:", lmin.x, ",y:", lmin.y, ",z:", lmin.z,
240
+                  ",i:", lmin.i, ",j:", lmin.j, ",k:", lmin.k,
241
+                  ",u:", lmin.u, ",v:", lmin.v, ",w:", lmin.w
242
+            ),
243
+            LIST_N(DOUBLE(NUM_AXES),
244
+              "max:{x:", lmax.x, ",y:", lmax.y, ",z:", lmax.z,
245
+                  ",i:", lmax.i, ",j:", lmax.j, ",k:", lmax.k,
246
+                  ",u:", lmax.u, ",v:", lmax.v, ",w:", lmax.w
247
+            ),
239
           "},"
248
           "},"
240
           "work:{"
249
           "work:{"
241
-            "min:{x:", wmin.x, ",y:", wmin.y, ",z:", wmin.z, "},"
242
-            "max:{x:", wmax.x, ",y:", wmax.y, ",z:", wmax.z, "}",
250
+            LIST_N(DOUBLE(NUM_AXES),
251
+              "min:{x:", wmin.x, ",y:", wmin.y, ",z:", wmin.z,
252
+                  ",i:", wmin.i, ",j:", wmin.j, ",k:", wmin.k,
253
+                  ",u:", wmin.u, ",v:", wmin.v, ",w:", wmin.w
254
+            ),
255
+            LIST_N(DOUBLE(NUM_AXES),
256
+              "max:{x:", wmax.x, ",y:", wmax.y, ",z:", wmax.z,
257
+                  ",i:", wmax.i, ",j:", wmax.j, ",k:", wmax.k,
258
+                  ",u:", wmax.u, ",v:", wmax.v, ",w:", wmax.w
259
+            ),
243
           "}"
260
           "}"
244
         "}"
261
         "}"
245
       );
262
       );

+ 55
- 39
Marlin/src/inc/Conditionals_LCD.h View File

1204
 #elif X_HOME_DIR < 0
1204
 #elif X_HOME_DIR < 0
1205
   #define X_HOME_TO_MIN 1
1205
   #define X_HOME_TO_MIN 1
1206
 #endif
1206
 #endif
1207
-#if Y_HOME_DIR > 0
1208
-  #define Y_HOME_TO_MAX 1
1209
-#elif Y_HOME_DIR < 0
1210
-  #define Y_HOME_TO_MIN 1
1211
-#endif
1212
-#if Z_HOME_DIR > 0
1213
-  #define Z_HOME_TO_MAX 1
1214
-#elif Z_HOME_DIR < 0
1215
-  #define Z_HOME_TO_MIN 1
1216
-#endif
1217
-#if I_HOME_DIR > 0
1218
-  #define I_HOME_TO_MAX 1
1219
-#elif I_HOME_DIR < 0
1220
-  #define I_HOME_TO_MIN 1
1221
-#endif
1222
-#if J_HOME_DIR > 0
1223
-  #define J_HOME_TO_MAX 1
1224
-#elif J_HOME_DIR < 0
1225
-  #define J_HOME_TO_MIN 1
1226
-#endif
1227
-#if K_HOME_DIR > 0
1228
-  #define K_HOME_TO_MAX 1
1229
-#elif K_HOME_DIR < 0
1230
-  #define K_HOME_TO_MIN 1
1231
-#endif
1232
-#if U_HOME_DIR > 0
1233
-  #define U_HOME_TO_MAX 1
1234
-#elif U_HOME_DIR < 0
1235
-  #define U_HOME_TO_MIN 1
1236
-#endif
1237
-#if V_HOME_DIR > 0
1238
-  #define V_HOME_TO_MAX 1
1239
-#elif V_HOME_DIR < 0
1240
-  #define V_HOME_TO_MIN 1
1241
-#endif
1242
-#if W_HOME_DIR > 0
1243
-  #define W_HOME_TO_MAX 1
1244
-#elif W_HOME_DIR < 0
1245
-  #define W_HOME_TO_MIN 1
1207
+#if HAS_Y_AXIS
1208
+  #if Y_HOME_DIR > 0
1209
+    #define Y_HOME_TO_MAX 1
1210
+  #elif Y_HOME_DIR < 0
1211
+    #define Y_HOME_TO_MIN 1
1212
+  #endif
1213
+#endif
1214
+#if HAS_Z_AXIS
1215
+  #if Z_HOME_DIR > 0
1216
+    #define Z_HOME_TO_MAX 1
1217
+  #elif Z_HOME_DIR < 0
1218
+    #define Z_HOME_TO_MIN 1
1219
+  #endif
1220
+#endif
1221
+#if HAS_I_AXIS
1222
+  #if I_HOME_DIR > 0
1223
+    #define I_HOME_TO_MAX 1
1224
+  #elif I_HOME_DIR < 0
1225
+    #define I_HOME_TO_MIN 1
1226
+  #endif
1227
+#endif
1228
+#if HAS_J_AXIS
1229
+  #if J_HOME_DIR > 0
1230
+    #define J_HOME_TO_MAX 1
1231
+  #elif J_HOME_DIR < 0
1232
+    #define J_HOME_TO_MIN 1
1233
+  #endif
1234
+#endif
1235
+#if HAS_K_AXIS
1236
+  #if K_HOME_DIR > 0
1237
+    #define K_HOME_TO_MAX 1
1238
+  #elif K_HOME_DIR < 0
1239
+    #define K_HOME_TO_MIN 1
1240
+  #endif
1241
+#endif
1242
+#if HAS_U_AXIS
1243
+  #if U_HOME_DIR > 0
1244
+    #define U_HOME_TO_MAX 1
1245
+  #elif U_HOME_DIR < 0
1246
+    #define U_HOME_TO_MIN 1
1247
+  #endif
1248
+#endif
1249
+#if HAS_V_AXIS
1250
+  #if V_HOME_DIR > 0
1251
+    #define V_HOME_TO_MAX 1
1252
+  #elif V_HOME_DIR < 0
1253
+    #define V_HOME_TO_MIN 1
1254
+  #endif
1255
+#endif
1256
+#if HAS_W_AXIS
1257
+  #if W_HOME_DIR > 0
1258
+    #define W_HOME_TO_MAX 1
1259
+  #elif W_HOME_DIR < 0
1260
+    #define W_HOME_TO_MIN 1
1261
+  #endif
1246
 #endif
1262
 #endif
1247
 
1263
 
1248
 /**
1264
 /**

+ 19
- 19
Marlin/src/inc/SanityCheck.h View File

2641
 #define _PLUG_UNUSED_TEST(A,P) (DISABLED(USE_##P##MIN_PLUG, USE_##P##MAX_PLUG) \
2641
 #define _PLUG_UNUSED_TEST(A,P) (DISABLED(USE_##P##MIN_PLUG, USE_##P##MAX_PLUG) \
2642
   && !(ENABLED(A##_DUAL_ENDSTOPS) && WITHIN(A##2_USE_ENDSTOP, _##P##MAX_, _##P##MIN_)) \
2642
   && !(ENABLED(A##_DUAL_ENDSTOPS) && WITHIN(A##2_USE_ENDSTOP, _##P##MAX_, _##P##MIN_)) \
2643
   && !(ENABLED(A##_MULTI_ENDSTOPS) && WITHIN(A##2_USE_ENDSTOP, _##P##MAX_, _##P##MIN_)) )
2643
   && !(ENABLED(A##_MULTI_ENDSTOPS) && WITHIN(A##2_USE_ENDSTOP, _##P##MAX_, _##P##MIN_)) )
2644
-#define _AXIS_PLUG_UNUSED_TEST(A) (1 NUM_AXIS_GANG(&& _PLUG_UNUSED_TEST(A,X), && _PLUG_UNUSED_TEST(A,Y), && _PLUG_UNUSED_TEST(A,Z), \
2644
+#define _AXIS_PLUG_UNUSED_TEST(A) (HAS_##A##_A NUM_AXIS_GANG(&& _PLUG_UNUSED_TEST(A,X), && _PLUG_UNUSED_TEST(A,Y), && _PLUG_UNUSED_TEST(A,Z), \
2645
                                                       && _PLUG_UNUSED_TEST(A,I), && _PLUG_UNUSED_TEST(A,J), && _PLUG_UNUSED_TEST(A,K), \
2645
                                                       && _PLUG_UNUSED_TEST(A,I), && _PLUG_UNUSED_TEST(A,J), && _PLUG_UNUSED_TEST(A,K), \
2646
                                                       && _PLUG_UNUSED_TEST(A,U), && _PLUG_UNUSED_TEST(A,V), && _PLUG_UNUSED_TEST(A,W) ) )
2646
                                                       && _PLUG_UNUSED_TEST(A,U), && _PLUG_UNUSED_TEST(A,V), && _PLUG_UNUSED_TEST(A,W) ) )
2647
 
2647
 
2656
   #if _AXIS_PLUG_UNUSED_TEST(Z)
2656
   #if _AXIS_PLUG_UNUSED_TEST(Z)
2657
     #error "You must enable USE_ZMIN_PLUG or USE_ZMAX_PLUG."
2657
     #error "You must enable USE_ZMIN_PLUG or USE_ZMAX_PLUG."
2658
   #endif
2658
   #endif
2659
-  #if HAS_I_AXIS && _AXIS_PLUG_UNUSED_TEST(I)
2659
+  #if _AXIS_PLUG_UNUSED_TEST(I)
2660
     #error "You must enable USE_IMIN_PLUG or USE_IMAX_PLUG."
2660
     #error "You must enable USE_IMIN_PLUG or USE_IMAX_PLUG."
2661
   #endif
2661
   #endif
2662
-  #if HAS_J_AXIS && _AXIS_PLUG_UNUSED_TEST(J)
2662
+  #if _AXIS_PLUG_UNUSED_TEST(J)
2663
     #error "You must enable USE_JMIN_PLUG or USE_JMAX_PLUG."
2663
     #error "You must enable USE_JMIN_PLUG or USE_JMAX_PLUG."
2664
   #endif
2664
   #endif
2665
-  #if HAS_K_AXIS && _AXIS_PLUG_UNUSED_TEST(K)
2665
+  #if _AXIS_PLUG_UNUSED_TEST(K)
2666
     #error "You must enable USE_KMIN_PLUG or USE_KMAX_PLUG."
2666
     #error "You must enable USE_KMIN_PLUG or USE_KMAX_PLUG."
2667
   #endif
2667
   #endif
2668
-  #if HAS_U_AXIS && _AXIS_PLUG_UNUSED_TEST(U)
2668
+  #if _AXIS_PLUG_UNUSED_TEST(U)
2669
     #error "You must enable USE_UMIN_PLUG or USE_UMAX_PLUG."
2669
     #error "You must enable USE_UMIN_PLUG or USE_UMAX_PLUG."
2670
   #endif
2670
   #endif
2671
-  #if HAS_V_AXIS && _AXIS_PLUG_UNUSED_TEST(V)
2671
+  #if _AXIS_PLUG_UNUSED_TEST(V)
2672
     #error "You must enable USE_VMIN_PLUG or USE_VMAX_PLUG."
2672
     #error "You must enable USE_VMIN_PLUG or USE_VMAX_PLUG."
2673
   #endif
2673
   #endif
2674
-  #if HAS_W_AXIS && _AXIS_PLUG_UNUSED_TEST(W)
2674
+  #if _AXIS_PLUG_UNUSED_TEST(W)
2675
     #error "You must enable USE_WMIN_PLUG or USE_WMAX_PLUG."
2675
     #error "You must enable USE_WMIN_PLUG or USE_WMAX_PLUG."
2676
   #endif
2676
   #endif
2677
 
2677
 
2685
       #error "Enable USE_YMIN_PLUG when homing Y to MIN."
2685
       #error "Enable USE_YMIN_PLUG when homing Y to MIN."
2686
     #elif Y_HOME_TO_MAX && DISABLED(USE_YMAX_PLUG)
2686
     #elif Y_HOME_TO_MAX && DISABLED(USE_YMAX_PLUG)
2687
       #error "Enable USE_YMAX_PLUG when homing Y to MAX."
2687
       #error "Enable USE_YMAX_PLUG when homing Y to MAX."
2688
-    #elif HAS_I_AXIS && I_HOME_TO_MIN && DISABLED(USE_IMIN_PLUG)
2688
+    #elif I_HOME_TO_MIN && DISABLED(USE_IMIN_PLUG)
2689
       #error "Enable USE_IMIN_PLUG when homing I to MIN."
2689
       #error "Enable USE_IMIN_PLUG when homing I to MIN."
2690
-    #elif HAS_I_AXIS && I_HOME_TO_MAX && DISABLED(USE_IMAX_PLUG)
2690
+    #elif I_HOME_TO_MAX && DISABLED(USE_IMAX_PLUG)
2691
       #error "Enable USE_IMAX_PLUG when homing I to MAX."
2691
       #error "Enable USE_IMAX_PLUG when homing I to MAX."
2692
-    #elif HAS_J_AXIS && J_HOME_TO_MIN && DISABLED(USE_JMIN_PLUG)
2692
+    #elif J_HOME_TO_MIN && DISABLED(USE_JMIN_PLUG)
2693
       #error "Enable USE_JMIN_PLUG when homing J to MIN."
2693
       #error "Enable USE_JMIN_PLUG when homing J to MIN."
2694
-    #elif HAS_J_AXIS && J_HOME_TO_MAX && DISABLED(USE_JMAX_PLUG)
2694
+    #elif J_HOME_TO_MAX && DISABLED(USE_JMAX_PLUG)
2695
       #error "Enable USE_JMAX_PLUG when homing J to MAX."
2695
       #error "Enable USE_JMAX_PLUG when homing J to MAX."
2696
-    #elif HAS_K_AXIS && K_HOME_TO_MIN && DISABLED(USE_KMIN_PLUG)
2696
+    #elif K_HOME_TO_MIN && DISABLED(USE_KMIN_PLUG)
2697
       #error "Enable USE_KMIN_PLUG when homing K to MIN."
2697
       #error "Enable USE_KMIN_PLUG when homing K to MIN."
2698
-    #elif HAS_K_AXIS && K_HOME_TO_MAX && DISABLED(USE_KMAX_PLUG)
2698
+    #elif K_HOME_TO_MAX && DISABLED(USE_KMAX_PLUG)
2699
       #error "Enable USE_KMAX_PLUG when homing K to MAX."
2699
       #error "Enable USE_KMAX_PLUG when homing K to MAX."
2700
-    #elif HAS_U_AXIS && U_HOME_TO_MIN && DISABLED(USE_UMIN_PLUG)
2700
+    #elif U_HOME_TO_MIN && DISABLED(USE_UMIN_PLUG)
2701
       #error "Enable USE_UMIN_PLUG when homing U to MIN."
2701
       #error "Enable USE_UMIN_PLUG when homing U to MIN."
2702
-    #elif HAS_U_AXIS && U_HOME_TO_MAX && DISABLED(USE_UMAX_PLUG)
2702
+    #elif U_HOME_TO_MAX && DISABLED(USE_UMAX_PLUG)
2703
       #error "Enable USE_UMAX_PLUG when homing U to MAX."
2703
       #error "Enable USE_UMAX_PLUG when homing U to MAX."
2704
-    #elif HAS_V_AXIS && V_HOME_TO_MIN && DISABLED(USE_VMIN_PLUG)
2704
+    #elif V_HOME_TO_MIN && DISABLED(USE_VMIN_PLUG)
2705
       #error "Enable USE_VMIN_PLUG when homing V to MIN."
2705
       #error "Enable USE_VMIN_PLUG when homing V to MIN."
2706
-    #elif HAS_V_AXIS && V_HOME_TO_MAX && DISABLED(USE_VMAX_PLUG)
2706
+    #elif V_HOME_TO_MAX && DISABLED(USE_VMAX_PLUG)
2707
       #error "Enable USE_VMAX_PLUG when homing V to MAX."
2707
       #error "Enable USE_VMAX_PLUG when homing V to MAX."
2708
-    #elif HAS_W_AXIS && W_HOME_TO_MIN && DISABLED(USE_WMIN_PLUG)
2708
+    #elif W_HOME_TO_MIN && DISABLED(USE_WMIN_PLUG)
2709
       #error "Enable USE_WMIN_PLUG when homing W to MIN."
2709
       #error "Enable USE_WMIN_PLUG when homing W to MIN."
2710
-    #elif HAS_W_AXIS && W_HOME_TO_MAX && DISABLED(USE_WMAX_PLUG)
2710
+    #elif W_HOME_TO_MAX && DISABLED(USE_WMAX_PLUG)
2711
       #error "Enable USE_WMAX_PLUG when homing W to MAX."
2711
       #error "Enable USE_WMAX_PLUG when homing W to MAX."
2712
     #endif
2712
     #endif
2713
   #endif
2713
   #endif

+ 16
- 6
Marlin/src/lcd/dogm/status_screen_DOGM.cpp View File

438
   else if (axis_should_home(axis))
438
   else if (axis_should_home(axis))
439
     while (const char c = *value++) lcd_put_lchar(c <= '.' ? c : '?');
439
     while (const char c = *value++) lcd_put_lchar(c <= '.' ? c : '?');
440
   else if (NONE(HOME_AFTER_DEACTIVATE, DISABLE_REDUCED_ACCURACY_WARNING) && !axis_is_trusted(axis))
440
   else if (NONE(HOME_AFTER_DEACTIVATE, DISABLE_REDUCED_ACCURACY_WARNING) && !axis_is_trusted(axis))
441
-    lcd_put_u8str(axis == Z_AXIS ? F("       ") : F("    "));
441
+    lcd_put_u8str(TERN0(HAS_Z_AXIS, axis == Z_AXIS) ? F("       ") : F("    "));
442
   else
442
   else
443
     lcd_put_u8str(value);
443
     lcd_put_u8str(value);
444
 }
444
 }
500
  */
500
  */
501
 void MarlinUI::draw_status_screen() {
501
 void MarlinUI::draw_status_screen() {
502
   constexpr int xystorage = TERN(INCH_MODE_SUPPORT, 8, 5);
502
   constexpr int xystorage = TERN(INCH_MODE_SUPPORT, 8, 5);
503
-  static char xstring[TERN(LCD_SHOW_E_TOTAL, 12, xystorage)], ystring[xystorage], zstring[8];
503
+  static char xstring[TERN(LCD_SHOW_E_TOTAL, 12, xystorage)];
504
+  #if HAS_Y_AXIS
505
+    static char ystring[xystorage];
506
+  #endif
507
+  #if HAS_Z_AXIS
508
+    static char zstring[8];
509
+  #endif
504
 
510
 
505
   #if ENABLED(FILAMENT_LCD_DISPLAY)
511
   #if ENABLED(FILAMENT_LCD_DISPLAY)
506
     static char wstring[5], mstring[4];
512
     static char wstring[5], mstring[4];
525
 
531
 
526
     const xyz_pos_t lpos = current_position.asLogical();
532
     const xyz_pos_t lpos = current_position.asLogical();
527
     const bool is_inch = parser.using_inch_units();
533
     const bool is_inch = parser.using_inch_units();
528
-    strcpy(zstring, is_inch ? ftostr42_52(LINEAR_UNIT(lpos.z)) : ftostr52sp(lpos.z));
534
+    #if HAS_Z_AXIS
535
+      strcpy(zstring, is_inch ? ftostr42_52(LINEAR_UNIT(lpos.z)) : ftostr52sp(lpos.z));
536
+    #endif
529
 
537
 
530
     if (show_e_total) {
538
     if (show_e_total) {
531
       #if ENABLED(LCD_SHOW_E_TOTAL)
539
       #if ENABLED(LCD_SHOW_E_TOTAL)
535
     }
543
     }
536
     else {
544
     else {
537
       strcpy(xstring, is_inch ? ftostr53_63(LINEAR_UNIT(lpos.x)) : ftostr4sign(lpos.x));
545
       strcpy(xstring, is_inch ? ftostr53_63(LINEAR_UNIT(lpos.x)) : ftostr4sign(lpos.x));
538
-      strcpy(ystring, is_inch ? ftostr53_63(LINEAR_UNIT(lpos.y)) : ftostr4sign(lpos.y));
546
+      TERN_(HAS_Y_AXIS, strcpy(ystring, is_inch ? ftostr53_63(LINEAR_UNIT(lpos.y)) : ftostr4sign(lpos.y)));
539
     }
547
     }
540
 
548
 
541
     #if ENABLED(FILAMENT_LCD_DISPLAY)
549
     #if ENABLED(FILAMENT_LCD_DISPLAY)
858
         }
866
         }
859
         else {
867
         else {
860
           _draw_axis_value(X_AXIS, xstring, blink);
868
           _draw_axis_value(X_AXIS, xstring, blink);
861
-          _draw_axis_value(Y_AXIS, ystring, blink);
869
+          TERN_(HAS_Y_AXIS, _draw_axis_value(Y_AXIS, ystring, blink));
862
         }
870
         }
863
 
871
 
864
       #endif
872
       #endif
865
 
873
 
866
-      _draw_axis_value(Z_AXIS, zstring, blink);
874
+      #if HAS_Z_AXIS
875
+        _draw_axis_value(Z_AXIS, zstring, blink);
876
+      #endif
867
 
877
 
868
       #if NONE(XYZ_NO_FRAME, XYZ_HOLLOW_FRAME)
878
       #if NONE(XYZ_NO_FRAME, XYZ_HOLLOW_FRAME)
869
         u8g.setColorIndex(1); // black on white
879
         u8g.setColorIndex(1); // black on white

+ 3
- 1
Marlin/src/lcd/menu/menu_advanced.cpp View File

477
 
477
 
478
   // M201 / M204 Accelerations
478
   // M201 / M204 Accelerations
479
   void menu_advanced_acceleration() {
479
   void menu_advanced_acceleration() {
480
-    const float max_accel = _MAX(planner.settings.max_acceleration_mm_per_s2[A_AXIS], planner.settings.max_acceleration_mm_per_s2[B_AXIS], planner.settings.max_acceleration_mm_per_s2[C_AXIS]);
480
+    float max_accel = planner.settings.max_acceleration_mm_per_s2[A_AXIS];
481
+    TERN_(HAS_Y_AXIS, NOLESS(max_accel, planner.settings.max_acceleration_mm_per_s2[B_AXIS]));
482
+    TERN_(HAS_Z_AXIS, NOLESS(max_accel, planner.settings.max_acceleration_mm_per_s2[C_AXIS]));
481
 
483
 
482
     // M201 settings
484
     // M201 settings
483
     constexpr xyze_ulong_t max_accel_edit =
485
     constexpr xyze_ulong_t max_accel_edit =

+ 5
- 3
Marlin/src/lcd/menu/menu_motion.cpp View File

28
 
28
 
29
 #if HAS_MARLINUI_MENU
29
 #if HAS_MARLINUI_MENU
30
 
30
 
31
-#define LARGE_AREA_TEST ((X_BED_SIZE) >= 1000 || (Y_BED_SIZE) >= 1000 || (Z_MAX_POS) >= 1000)
31
+#define LARGE_AREA_TEST ((X_BED_SIZE) >= 1000 || TERN0(HAS_Y_AXIS, (Y_BED_SIZE) >= 1000) || TERN0(HAS_Z_AXIS, (Z_MAX_POS) >= 1000))
32
 
32
 
33
 #include "menu_item.h"
33
 #include "menu_item.h"
34
 #include "menu_addon.h"
34
 #include "menu_addon.h"
160
     SUBMENU(MSG_MOVE_10MM, []{ _goto_manual_move(10);    });
160
     SUBMENU(MSG_MOVE_10MM, []{ _goto_manual_move(10);    });
161
     SUBMENU(MSG_MOVE_1MM,  []{ _goto_manual_move( 1);    });
161
     SUBMENU(MSG_MOVE_1MM,  []{ _goto_manual_move( 1);    });
162
     SUBMENU(MSG_MOVE_01MM, []{ _goto_manual_move( 0.1f); });
162
     SUBMENU(MSG_MOVE_01MM, []{ _goto_manual_move( 0.1f); });
163
-    if (axis == Z_AXIS && (FINE_MANUAL_MOVE) > 0.0f && (FINE_MANUAL_MOVE) < 0.1f)
164
-      SUBMENU_f(F(STRINGIFY(FINE_MANUAL_MOVE)), MSG_MOVE_N_MM, []{ _goto_manual_move(float(FINE_MANUAL_MOVE)); });
163
+    #if HAS_Z_AXIS
164
+      if (axis == Z_AXIS && (FINE_MANUAL_MOVE) > 0.0f && (FINE_MANUAL_MOVE) < 0.1f)
165
+        SUBMENU_f(F(STRINGIFY(FINE_MANUAL_MOVE)), MSG_MOVE_N_MM, []{ _goto_manual_move(float(FINE_MANUAL_MOVE)); });
166
+    #endif
165
   }
167
   }
166
   END_MENU();
168
   END_MENU();
167
 }
169
 }

Loading…
Cancel
Save