Fix compile with DISTINCT_E_FACTORS + SLIM_LCD_MENUS (#21733)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com>
This commit is contained in:
parent
f6b0398ca8
commit
d32575ee74
|
@ -350,16 +350,6 @@ void menu_backlash();
|
|||
|
||||
#if DISABLED(SLIM_LCD_MENUS)
|
||||
|
||||
#if ENABLED(DISTINCT_E_FACTORS)
|
||||
inline void _reset_e_acceleration_rate(const uint8_t e) { if (e == active_extruder) planner.reset_acceleration_rates(); }
|
||||
inline void _planner_refresh_e_positioning(const uint8_t e) {
|
||||
if (e == active_extruder)
|
||||
planner.refresh_positioning();
|
||||
else
|
||||
planner.steps_to_mm[E_AXIS_N(e)] = 1.0f / planner.settings.axis_steps_per_mm[E_AXIS_N(e)];
|
||||
}
|
||||
#endif
|
||||
|
||||
// M203 / M205 Velocity options
|
||||
void menu_advanced_velocity() {
|
||||
// M203 Max Feedrate
|
||||
|
@ -443,7 +433,10 @@ void menu_backlash();
|
|||
#if ENABLED(DISTINCT_E_FACTORS)
|
||||
EDIT_ITEM_FAST(long5_25, MSG_AMAX_E, &planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(active_extruder)], 100, max_accel_edit_scaled.e, []{ planner.reset_acceleration_rates(); });
|
||||
LOOP_L_N(n, E_STEPPERS)
|
||||
EDIT_ITEM_FAST_N(long5_25, n, MSG_AMAX_EN, &planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(n)], 100, max_accel_edit_scaled.e, []{ _reset_e_acceleration_rate(MenuItemBase::itemIndex); });
|
||||
EDIT_ITEM_FAST_N(long5_25, n, MSG_AMAX_EN, &planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(n)], 100, max_accel_edit_scaled.e, []{
|
||||
if (MenuItemBase::itemIndex == active_extruder)
|
||||
planner.reset_acceleration_rates();
|
||||
});
|
||||
#elif E_STEPPERS
|
||||
EDIT_ITEM_FAST(long5_25, MSG_AMAX_E, &planner.settings.max_acceleration_mm_per_s2[E_AXIS], 100, max_accel_edit_scaled.e, []{ planner.reset_acceleration_rates(); });
|
||||
#endif
|
||||
|
@ -530,7 +523,13 @@ void menu_advanced_steps_per_mm() {
|
|||
|
||||
#if ENABLED(DISTINCT_E_FACTORS)
|
||||
LOOP_L_N(n, E_STEPPERS)
|
||||
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); });
|
||||
EDIT_ITEM_FAST_N(float51, n, MSG_EN_STEPS, &planner.settings.axis_steps_per_mm[E_AXIS_N(n)], 5, 9999, []{
|
||||
const uint8_t e = MenuItemBase::itemIndex;
|
||||
if (e == active_extruder)
|
||||
planner.refresh_positioning();
|
||||
else
|
||||
planner.steps_to_mm[E_AXIS_N(e)] = 1.0f / planner.settings.axis_steps_per_mm[E_AXIS_N(e)];
|
||||
});
|
||||
#elif E_STEPPERS
|
||||
EDIT_ITEM_FAST(float51, MSG_E_STEPS, &planner.settings.axis_steps_per_mm[E_AXIS], 5, 9999, []{ planner.refresh_positioning(); });
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue