Quellcode durchsuchen

🧑‍💻 Fix STATIC_ITEM_N arg order

Scott Lahteine vor 2 Jahren
Ursprung
Commit
432c879328

+ 1
- 0
Marlin/src/lcd/menu/menu.h Datei anzeigen

@@ -214,6 +214,7 @@ void menu_move();
214 214
 //////// Menu Item Helper Functions ////////
215 215
 ////////////////////////////////////////////
216 216
 
217
+void lcd_move_axis(const AxisEnum);
217 218
 void lcd_move_z();
218 219
 void _lcd_draw_homing();
219 220
 

+ 2
- 2
Marlin/src/lcd/menu/menu_item.h Datei anzeigen

@@ -357,7 +357,7 @@ class MenuItem_bool : public MenuEditItemBase {
357 357
   NEXT_ITEM();                          \
358 358
 } while(0)
359 359
 
360
-#define STATIC_ITEM_N_F(FLABEL, N, V...) do{ \
360
+#define STATIC_ITEM_N_F(N, FLABEL, V...) do{ \
361 361
   if (_menuLineNr == _thisItemNr) {          \
362 362
     MenuItemBase::init(N);                   \
363 363
     STATIC_ITEM_INNER_F(FLABEL, ##V);        \
@@ -380,7 +380,7 @@ class MenuItem_bool : public MenuEditItemBase {
380 380
 #define PSTRING_ITEM(LABEL, V...)                     PSTRING_ITEM_F(GET_TEXT_F(LABEL), ##V)
381 381
 
382 382
 #define STATIC_ITEM(LABEL, V...)                       STATIC_ITEM_F(GET_TEXT_F(LABEL), ##V)
383
-#define STATIC_ITEM_N(LABEL, N, V...)                STATIC_ITEM_N_F(GET_TEXT_F(LABEL), N, ##V)
383
+#define STATIC_ITEM_N(N, LABEL, V...)                STATIC_ITEM_N_F(N, GET_TEXT_F(LABEL), ##V)
384 384
 
385 385
 // Menu item with index and composed C-string substitution
386 386
 #define MENU_ITEM_N_S_F(TYPE, N, S, FLABEL, V...)   _MENU_ITEM_N_S_F(TYPE, N, S, false, FLABEL, ##V)

+ 2
- 2
Marlin/src/lcd/menu/menu_led.cpp Datei anzeigen

@@ -83,7 +83,7 @@
83 83
     START_MENU();
84 84
     BACK_ITEM(MSG_LED_CONTROL);
85 85
     #if ENABLED(NEOPIXEL2_SEPARATE)
86
-      STATIC_ITEM_N(MSG_LED_CHANNEL_N, 1, SS_DEFAULT|SS_INVERT);
86
+      STATIC_ITEM_N(1, MSG_LED_CHANNEL_N, SS_DEFAULT|SS_INVERT);
87 87
     #endif
88 88
     EDIT_ITEM(uint8, MSG_INTENSITY_R, &leds.color.r, 0, 255, leds.update, true);
89 89
     EDIT_ITEM(uint8, MSG_INTENSITY_G, &leds.color.g, 0, 255, leds.update, true);
@@ -95,7 +95,7 @@
95 95
       EDIT_ITEM(uint8, MSG_LED_BRIGHTNESS, &leds.color.i, 0, 255, leds.update, true);
96 96
     #endif
97 97
     #if ENABLED(NEOPIXEL2_SEPARATE)
98
-      STATIC_ITEM_N(MSG_LED_CHANNEL_N, 2, SS_DEFAULT|SS_INVERT);
98
+      STATIC_ITEM_N(2, MSG_LED_CHANNEL_N, SS_DEFAULT|SS_INVERT);
99 99
       EDIT_ITEM(uint8, MSG_INTENSITY_R, &leds2.color.r, 0, 255, leds2.update, true);
100 100
       EDIT_ITEM(uint8, MSG_INTENSITY_G, &leds2.color.g, 0, 255, leds2.update, true);
101 101
       EDIT_ITEM(uint8, MSG_INTENSITY_B, &leds2.color.b, 0, 255, leds2.update, true);

+ 1
- 1
Marlin/src/lcd/menu/menu_motion.cpp Datei anzeigen

@@ -173,7 +173,7 @@ void _menu_move_distance(const AxisEnum axis, const screenFunc_t func, const int
173 173
   START_MENU();
174 174
   if (LCD_HEIGHT >= 4) {
175 175
     switch (axis) {
176
-      #define _CASE_MOVE(N) case N##_AXIS: STATIC_ITEM(MSG_MOVE_##N, SS_DEFAULT|SS_INVERT); break;
176
+      #define _CASE_MOVE(N) case N##_AXIS: STATIC_ITEM_N(N##_AXIS, MSG_MOVE_N, SS_DEFAULT|SS_INVERT); break;
177 177
       MAIN_AXIS_MAP(_CASE_MOVE)
178 178
       default:
179 179
         TERN_(MANUAL_E_MOVES_RELATIVE, manual_move_e_origin = current_position.e);

Laden…
Abbrechen
Speichern