Skip to content

Commit 68c6dec

Browse files
committed
Set index for title in move_axis
1 parent 7f9708d commit 68c6dec

File tree

6 files changed

+6
-10
lines changed

6 files changed

+6
-10
lines changed

Marlin/src/lcd/marlinui.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,8 @@ typedef bool (*statusResetFunc_t)();
176176
static void soon(const AxisEnum axis OPTARG(MULTI_E_MANUAL, const int8_t eindex=active_extruder));
177177
};
178178

179+
void lcd_move_axis(const AxisEnum);
180+
179181
#endif
180182

181183
////////////////////////////////////////////

Marlin/src/lcd/menu/menu.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ void MarlinUI::goto_screen(screenFunc_t screen, const uint16_t encoder/*=0*/, co
191191
else {
192192
#if ENABLED(MOVE_Z_WHEN_IDLE)
193193
ui.manual_move.menu_scale = MOVE_Z_IDLE_MULTIPLICATOR;
194-
screen = lcd_move_z;
194+
screen = []{ lcd_move_axis(Z_AXIS); };
195195
#endif
196196
}
197197
}

Marlin/src/lcd/menu/menu.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,6 @@ void menu_move();
214214
//////// Menu Item Helper Functions ////////
215215
////////////////////////////////////////////
216216

217-
void lcd_move_axis(const AxisEnum);
218-
void lcd_move_z();
219217
void _lcd_draw_homing();
220218

221219
#define HAS_LINE_TO_Z ANY(DELTA, PROBE_MANUALLY, MESH_BED_LEVELING, LCD_BED_TRAMMING)

Marlin/src/lcd/menu/menu_delta_calibrate.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ void _man_probe_pt(const xy_pos_t &xy) {
5252
ui.wait_for_move = false;
5353
ui.synchronize();
5454
ui.manual_move.menu_scale = _MAX(PROBE_MANUALLY_STEP, MIN_STEPS_PER_SEGMENT / planner.settings.axis_steps_per_mm[0]); // Use first axis as for delta XYZ should always match
55-
ui.goto_screen(lcd_move_z);
55+
ui.goto_screen([]{ lcd_move_axis(Z_AXIS); });
5656
}
5757
}
5858

Marlin/src/lcd/menu/menu_item.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@
3131
#include "../../module/planner.h"
3232
#endif
3333

34-
void lcd_move_z();
35-
3634
////////////////////////////////////////////
3735
///////////// Base Menu Items //////////////
3836
////////////////////////////////////////////

Marlin/src/lcd/menu/menu_motion.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ void lcd_move_axis(const AxisEnum axis) {
7474
}
7575
ui.encoderPosition = 0;
7676
if (ui.should_draw()) {
77+
MenuEditItemBase::itemIndex = axis;
7778
const float pos = ui.manual_move.axis_value(axis);
7879
if (parser.using_inch_units()) {
7980
const float imp_pos = LINEAR_UNIT(pos);
@@ -84,9 +85,6 @@ void lcd_move_axis(const AxisEnum axis) {
8485
}
8586
}
8687

87-
// Move Z easy accessor
88-
void lcd_move_z() { lcd_move_axis(Z_AXIS); }
89-
9088
#if E_MANUAL
9189

9290
static void lcd_move_e(TERN_(MULTI_E_MANUAL, const int8_t eindex=active_extruder)) {
@@ -118,7 +116,7 @@ void lcd_move_z() { lcd_move_axis(Z_AXIS); }
118116

119117
void _goto_manual_move_z(const_float_t scale) {
120118
ui.manual_move.menu_scale = scale;
121-
ui.goto_screen(lcd_move_z);
119+
ui.goto_screen([]{ lcd_move_axis(Z_AXIS); });
122120
}
123121

124122
#endif

0 commit comments

Comments
 (0)