🧑💻 Fix STATIC_ITEM_N arg order
This commit is contained in:
parent
15ca479708
commit
821f4983d0
|
@ -214,6 +214,7 @@ void menu_move();
|
||||||
//////// Menu Item Helper Functions ////////
|
//////// Menu Item Helper Functions ////////
|
||||||
////////////////////////////////////////////
|
////////////////////////////////////////////
|
||||||
|
|
||||||
|
void lcd_move_axis(const AxisEnum);
|
||||||
void lcd_move_z();
|
void lcd_move_z();
|
||||||
void _lcd_draw_homing();
|
void _lcd_draw_homing();
|
||||||
|
|
||||||
|
|
|
@ -357,7 +357,7 @@ class MenuItem_bool : public MenuEditItemBase {
|
||||||
NEXT_ITEM(); \
|
NEXT_ITEM(); \
|
||||||
} while(0)
|
} while(0)
|
||||||
|
|
||||||
#define STATIC_ITEM_N_F(FLABEL, N, V...) do{ \
|
#define STATIC_ITEM_N_F(N, FLABEL, V...) do{ \
|
||||||
if (_menuLineNr == _thisItemNr) { \
|
if (_menuLineNr == _thisItemNr) { \
|
||||||
MenuItemBase::init(N); \
|
MenuItemBase::init(N); \
|
||||||
STATIC_ITEM_INNER_F(FLABEL, ##V); \
|
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 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(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
|
// 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)
|
#define MENU_ITEM_N_S_F(TYPE, N, S, FLABEL, V...) _MENU_ITEM_N_S_F(TYPE, N, S, false, FLABEL, ##V)
|
||||||
|
|
|
@ -83,7 +83,7 @@
|
||||||
START_MENU();
|
START_MENU();
|
||||||
BACK_ITEM(MSG_LED_CONTROL);
|
BACK_ITEM(MSG_LED_CONTROL);
|
||||||
#if ENABLED(NEOPIXEL2_SEPARATE)
|
#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
|
#endif
|
||||||
EDIT_ITEM(uint8, MSG_INTENSITY_R, &leds.color.r, 0, 255, leds.update, true);
|
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);
|
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);
|
EDIT_ITEM(uint8, MSG_LED_BRIGHTNESS, &leds.color.i, 0, 255, leds.update, true);
|
||||||
#endif
|
#endif
|
||||||
#if ENABLED(NEOPIXEL2_SEPARATE)
|
#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_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_G, &leds2.color.g, 0, 255, leds2.update, true);
|
||||||
EDIT_ITEM(uint8, MSG_INTENSITY_B, &leds2.color.b, 0, 255, leds2.update, true);
|
EDIT_ITEM(uint8, MSG_INTENSITY_B, &leds2.color.b, 0, 255, leds2.update, true);
|
||||||
|
|
|
@ -165,15 +165,13 @@ void _goto_manual_move(const_float_t scale) {
|
||||||
void _menu_move_distance(const AxisEnum axis, const screenFunc_t func, const int8_t eindex=active_extruder) {
|
void _menu_move_distance(const AxisEnum axis, const screenFunc_t func, const int8_t eindex=active_extruder) {
|
||||||
_manual_move_func_ptr = func;
|
_manual_move_func_ptr = func;
|
||||||
START_MENU();
|
START_MENU();
|
||||||
|
|
||||||
if (LCD_HEIGHT >= 4) {
|
if (LCD_HEIGHT >= 4) {
|
||||||
switch (axis) {
|
if (axis < LINEAR_AXES)
|
||||||
case X_AXIS: STATIC_ITEM(MSG_MOVE_X, SS_DEFAULT|SS_INVERT); break;
|
STATIC_ITEM_N(axis, MSG_MOVE_N, SS_DEFAULT|SS_INVERT);
|
||||||
case Y_AXIS: STATIC_ITEM(MSG_MOVE_Y, SS_DEFAULT|SS_INVERT); break;
|
else {
|
||||||
case Z_AXIS: STATIC_ITEM(MSG_MOVE_Z, SS_DEFAULT|SS_INVERT); break;
|
|
||||||
default:
|
|
||||||
TERN_(MANUAL_E_MOVES_RELATIVE, manual_move_e_origin = current_position.e);
|
TERN_(MANUAL_E_MOVES_RELATIVE, manual_move_e_origin = current_position.e);
|
||||||
STATIC_ITEM(MSG_MOVE_E, SS_DEFAULT|SS_INVERT);
|
STATIC_ITEM(MSG_MOVE_E, SS_DEFAULT|SS_INVERT);
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue