Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move steps/mm out of slim menus #16603

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 29 additions & 29 deletions Marlin/src/lcd/menu/menu_advanced.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -480,27 +480,6 @@ void menu_cancelobject();
END_MENU();
}

// M92 Steps-per-mm
void menu_advanced_steps_per_mm() {
START_MENU();
BACK_ITEM(MSG_ADVANCED_SETTINGS);

#define EDIT_QSTEPS(Q) EDIT_ITEM_FAST(float51, MSG_##Q##_STEPS, &planner.settings.axis_steps_per_mm[_AXIS(Q)], 5, 9999, []{ planner.refresh_positioning(); })
EDIT_QSTEPS(A);
EDIT_QSTEPS(B);
EDIT_QSTEPS(C);

#if ENABLED(DISTINCT_E_FACTORS)
EDIT_ITEM_FAST(float51, MSG_E_STEPS, &planner.settings.axis_steps_per_mm[E_AXIS_N(active_extruder)], 5, 9999, []{ planner.refresh_positioning(); });
for (uint8_t n = 0; n < E_STEPPERS; n++)
EDIT_ITEM_FAST_N(float51, n, MSG_EN_STEPS, &planner.settings.axis_steps_per_mm[E_AXIS_N(n)], 5, 9999, []{ _planner_refresh_e_positioning(MenuItemBase::itemIndex); });
#elif E_STEPPERS
EDIT_ITEM_FAST(float51, MSG_E_STEPS, &planner.settings.axis_steps_per_mm[E_AXIS], 5, 9999, []{ planner.refresh_positioning(); });
#endif

END_MENU();
}

// M851 - Z Probe Offsets
#if HAS_BED_PROBE
void menu_probe_offsets() {
Expand All @@ -515,6 +494,27 @@ void menu_cancelobject();

#endif // !SLIM_LCD_MENUS

// M92 Steps-per-mm
void menu_advanced_steps_per_mm() {
START_MENU();
BACK_ITEM(MSG_ADVANCED_SETTINGS);

#define EDIT_QSTEPS(Q) EDIT_ITEM_FAST(float51, MSG_##Q##_STEPS, &planner.settings.axis_steps_per_mm[_AXIS(Q)], 5, 9999, []{ planner.refresh_positioning(); })
EDIT_QSTEPS(A);
EDIT_QSTEPS(B);
EDIT_QSTEPS(C);

#if ENABLED(DISTINCT_E_FACTORS)
EDIT_ITEM_FAST(float51, MSG_E_STEPS, &planner.settings.axis_steps_per_mm[E_AXIS_N(active_extruder)], 5, 9999, []{ planner.refresh_positioning(); });
for (uint8_t n = 0; n < E_STEPPERS; n++)
EDIT_ITEM_FAST_N(float51, n, MSG_EN_STEPS, &planner.settings.axis_steps_per_mm[E_AXIS_N(n)], 5, 9999, []{ _planner_refresh_e_positioning(MenuItemBase::itemIndex); });
#elif E_STEPPERS
EDIT_ITEM_FAST(float51, MSG_E_STEPS, &planner.settings.axis_steps_per_mm[E_AXIS], 5, 9999, []{ planner.refresh_positioning(); });
#endif

END_MENU();
}

void menu_advanced_settings() {
#if ENABLED(FILAMENT_RUNOUT_SENSOR) && FILAMENT_RUNOUT_DISTANCE_MM
lcd_runout_distance_mm = runout.runout_distance();
Expand All @@ -540,17 +540,17 @@ void menu_advanced_settings() {
// M205 - Max Jerk
SUBMENU(MSG_JERK, menu_advanced_jerk);

if (!printer_busy()) {
// M92 - Steps Per mm
SUBMENU(MSG_STEPS_PER_MM, menu_advanced_steps_per_mm);

#if HAS_BED_PROBE
// M851 - Z Probe Offsets
// M851 - Z Probe Offsets
#if HAS_BED_PROBE
if (!printer_busy())
SUBMENU(MSG_ZPROBE_OFFSETS, menu_probe_offsets);
#endif
}
#endif
#endif // !SLIM_LCD_MENUS

// M92 - Steps Per mm
if (!printer_busy())
SUBMENU(MSG_STEPS_PER_MM, menu_advanced_steps_per_mm);

#if ENABLED(BACKLASH_GCODE)
SUBMENU(MSG_BACKLASH, menu_backlash);
#endif
Expand Down