From 95339c9561a701ede6b159dfc91edd0afd169e63 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 20 Jun 2022 21:17:29 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=91=E2=80=8D=F0=9F=92=BB=20Fix=20STATI?= =?UTF-8?q?C=5FITEM=5FN=20arg=20order?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/lcd/menu/menu.h | 1 + Marlin/src/lcd/menu/menu_item.h | 4 ++-- Marlin/src/lcd/menu/menu_led.cpp | 4 ++-- Marlin/src/lcd/menu/menu_motion.cpp | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Marlin/src/lcd/menu/menu.h b/Marlin/src/lcd/menu/menu.h index b65214f7b5..6f5a9efb15 100644 --- a/Marlin/src/lcd/menu/menu.h +++ b/Marlin/src/lcd/menu/menu.h @@ -214,6 +214,7 @@ void menu_move(); //////// Menu Item Helper Functions //////// //////////////////////////////////////////// +void lcd_move_axis(const AxisEnum); void lcd_move_z(); void _lcd_draw_homing(); diff --git a/Marlin/src/lcd/menu/menu_item.h b/Marlin/src/lcd/menu/menu_item.h index b48eaf9bae..77e6bcab7b 100644 --- a/Marlin/src/lcd/menu/menu_item.h +++ b/Marlin/src/lcd/menu/menu_item.h @@ -357,7 +357,7 @@ class MenuItem_bool : public MenuEditItemBase { NEXT_ITEM(); \ } while(0) -#define STATIC_ITEM_N_F(FLABEL, N, V...) do{ \ +#define STATIC_ITEM_N_F(N, FLABEL, V...) do{ \ if (_menuLineNr == _thisItemNr) { \ MenuItemBase::init(N); \ STATIC_ITEM_INNER_F(FLABEL, ##V); \ @@ -380,7 +380,7 @@ class MenuItem_bool : public MenuEditItemBase { #define PSTRING_ITEM(LABEL, V...) PSTRING_ITEM_F(GET_TEXT_F(LABEL), ##V) #define STATIC_ITEM(LABEL, V...) STATIC_ITEM_F(GET_TEXT_F(LABEL), ##V) -#define STATIC_ITEM_N(LABEL, N, V...) STATIC_ITEM_N_F(GET_TEXT_F(LABEL), N, ##V) +#define STATIC_ITEM_N(N, LABEL, V...) STATIC_ITEM_N_F(N, GET_TEXT_F(LABEL), ##V) // Menu item with index and composed C-string substitution #define MENU_ITEM_N_S_F(TYPE, N, S, FLABEL, V...) _MENU_ITEM_N_S_F(TYPE, N, S, false, FLABEL, ##V) diff --git a/Marlin/src/lcd/menu/menu_led.cpp b/Marlin/src/lcd/menu/menu_led.cpp index 0c08f6fa94..867e4dafa9 100644 --- a/Marlin/src/lcd/menu/menu_led.cpp +++ b/Marlin/src/lcd/menu/menu_led.cpp @@ -83,7 +83,7 @@ START_MENU(); BACK_ITEM(MSG_LED_CONTROL); #if ENABLED(NEOPIXEL2_SEPARATE) - STATIC_ITEM_N(MSG_LED_CHANNEL_N, 1, SS_DEFAULT|SS_INVERT); + STATIC_ITEM_N(1, MSG_LED_CHANNEL_N, SS_DEFAULT|SS_INVERT); #endif EDIT_ITEM(uint8, MSG_INTENSITY_R, &leds.color.r, 0, 255, leds.update, true); EDIT_ITEM(uint8, MSG_INTENSITY_G, &leds.color.g, 0, 255, leds.update, true); @@ -95,7 +95,7 @@ EDIT_ITEM(uint8, MSG_LED_BRIGHTNESS, &leds.color.i, 0, 255, leds.update, true); #endif #if ENABLED(NEOPIXEL2_SEPARATE) - STATIC_ITEM_N(MSG_LED_CHANNEL_N, 2, SS_DEFAULT|SS_INVERT); + STATIC_ITEM_N(2, MSG_LED_CHANNEL_N, SS_DEFAULT|SS_INVERT); EDIT_ITEM(uint8, MSG_INTENSITY_R, &leds2.color.r, 0, 255, leds2.update, true); EDIT_ITEM(uint8, MSG_INTENSITY_G, &leds2.color.g, 0, 255, leds2.update, true); EDIT_ITEM(uint8, MSG_INTENSITY_B, &leds2.color.b, 0, 255, leds2.update, true); diff --git a/Marlin/src/lcd/menu/menu_motion.cpp b/Marlin/src/lcd/menu/menu_motion.cpp index 90bd015eff..8857ba9dee 100644 --- a/Marlin/src/lcd/menu/menu_motion.cpp +++ b/Marlin/src/lcd/menu/menu_motion.cpp @@ -173,7 +173,7 @@ void _menu_move_distance(const AxisEnum axis, const screenFunc_t func, const int START_MENU(); if (LCD_HEIGHT >= 4) { switch (axis) { - #define _CASE_MOVE(N) case N##_AXIS: STATIC_ITEM(MSG_MOVE_##N, SS_DEFAULT|SS_INVERT); break; + #define _CASE_MOVE(N) case N##_AXIS: STATIC_ITEM_N(N##_AXIS, MSG_MOVE_N, SS_DEFAULT|SS_INVERT); break; MAIN_AXIS_MAP(_CASE_MOVE) default: TERN_(MANUAL_E_MOVES_RELATIVE, manual_move_e_origin = current_position.e);