Skip to content

DISTINCT_E_FACTORS compile error with input shaping - #26167

Merged
thinkyhead merged 2 commits into
MarlinFirmware:bugfix-2.1.xfrom
tombrazier:is_distinct_e_factors
Oct 27, 2023
Merged

DISTINCT_E_FACTORS compile error with input shaping#26167
thinkyhead merged 2 commits into
MarlinFirmware:bugfix-2.1.xfrom
tombrazier:is_distinct_e_factors

Conversation

@tombrazier

Copy link
Copy Markdown
Contributor

Description

When DISTINCT_E_FACTORS is used, the comment in Configuration.h says

/**
 * With this option each E stepper can have its own factors for the
 * following movement settings. If fewer factors are given than the
 * total number of extruders, the last value applies to the rest.
 */

The logic for calculating input shaping buffer size does not take this into account and this can cause a compile time error.

This PR essentially copies the following logic from settings.cpp into the input shaping buffer size calculation logic.

planner.settings.max_acceleration_mm_per_s2[i] = in ? tmp1[i] : pgm_read_dword(&_DMA[ALIM(i, _DMA)]);
planner.settings.axis_steps_per_mm[i] = in ? tmp2[i] : pgm_read_float(&_DASU[ALIM(i, _DASU)]);
planner.settings.max_feedrate_mm_s[i] = in ? tmp3[i] : pgm_read_float(&_DMF[ALIM(i, _DMF)]);

Requirements

Enable DISTINCT_E_FACTORS and do not specify values for all extruders in DEFAULT_AXIS_STEPS_PER_UNIT or DEFAULT_MAX_FEEDRATE.

Benefits

The code compiles.

Configurations

See above.

Related Issues

This conversation on 3D Printing Discord server

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants