Use E_AXIS_N where it makes sense
This commit is contained in:
parent
0d30ccf767
commit
19fea772e5
4 changed files with 6 additions and 6 deletions
|
@ -368,7 +368,7 @@ void menu_advanced_temperature() {
|
||||||
if (e == active_extruder)
|
if (e == active_extruder)
|
||||||
_planner_refresh_positioning();
|
_planner_refresh_positioning();
|
||||||
else
|
else
|
||||||
planner.steps_to_mm[E_AXIS + e] = 1.0f / planner.settings.axis_steps_per_mm[E_AXIS + e];
|
planner.steps_to_mm[E_AXIS_N(e)] = 1.0f / planner.settings.axis_steps_per_mm[E_AXIS_N(e)];
|
||||||
}
|
}
|
||||||
void _planner_refresh_e0_positioning() { _planner_refresh_e_positioning(0); }
|
void _planner_refresh_e0_positioning() { _planner_refresh_e_positioning(0); }
|
||||||
void _planner_refresh_e1_positioning() { _planner_refresh_e_positioning(1); }
|
void _planner_refresh_e1_positioning() { _planner_refresh_e_positioning(1); }
|
||||||
|
|
|
@ -2353,7 +2353,7 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||||
CONFIG_ECHO_START();
|
CONFIG_ECHO_START();
|
||||||
for (uint8_t i = 0; i < E_STEPPERS; i++) {
|
for (uint8_t i = 0; i < E_STEPPERS; i++) {
|
||||||
SERIAL_ECHOPAIR_P(port, " M203 T", (int)i);
|
SERIAL_ECHOPAIR_P(port, " M203 T", (int)i);
|
||||||
SERIAL_ECHOLNPAIR_P(port, " E", VOLUMETRIC_UNIT(planner.settings.max_feedrate_mm_s[E_AXIS + i]));
|
SERIAL_ECHOLNPAIR_P(port, " E", VOLUMETRIC_UNIT(planner.settings.max_feedrate_mm_s[E_AXIS_N(i)]));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -2370,7 +2370,7 @@ void MarlinSettings::reset(PORTARG_SOLO) {
|
||||||
CONFIG_ECHO_START();
|
CONFIG_ECHO_START();
|
||||||
for (uint8_t i = 0; i < E_STEPPERS; i++) {
|
for (uint8_t i = 0; i < E_STEPPERS; i++) {
|
||||||
SERIAL_ECHOPAIR_P(port, " M201 T", (int)i);
|
SERIAL_ECHOPAIR_P(port, " M201 T", (int)i);
|
||||||
SERIAL_ECHOLNPAIR_P(port, " E", VOLUMETRIC_UNIT(planner.settings.max_acceleration_mm_per_s2[E_AXIS + i]));
|
SERIAL_ECHOLNPAIR_P(port, " E", VOLUMETRIC_UNIT(planner.settings.max_acceleration_mm_per_s2[E_AXIS_N(i)]));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -2646,8 +2646,8 @@ bool Planner::buffer_segment(const float &a, const float &b, const float &c, con
|
||||||
|
|
||||||
// When changing extruders recalculate steps corresponding to the E position
|
// When changing extruders recalculate steps corresponding to the E position
|
||||||
#if ENABLED(DISTINCT_E_FACTORS)
|
#if ENABLED(DISTINCT_E_FACTORS)
|
||||||
if (last_extruder != extruder && settings.axis_steps_per_mm[E_AXIS_N(extruder)] != settings.axis_steps_per_mm[E_AXIS + last_extruder]) {
|
if (last_extruder != extruder && settings.axis_steps_per_mm[E_AXIS_N(extruder)] != settings.axis_steps_per_mm[E_AXIS_N(last_extruder)]) {
|
||||||
position[E_AXIS] = LROUND(position[E_AXIS] * settings.axis_steps_per_mm[E_AXIS_N(extruder)] * steps_to_mm[E_AXIS + last_extruder]);
|
position[E_AXIS] = LROUND(position[E_AXIS] * settings.axis_steps_per_mm[E_AXIS_N(extruder)] * steps_to_mm[E_AXIS_N(last_extruder)]);
|
||||||
last_extruder = extruder;
|
last_extruder = extruder;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -866,7 +866,7 @@ class Planner {
|
||||||
#define GET_MAX_E_JERK(N) SQRT(SQRT(0.5) * junction_deviation_mm * (N) * RECIPROCAL(1.0 - SQRT(0.5)))
|
#define GET_MAX_E_JERK(N) SQRT(SQRT(0.5) * junction_deviation_mm * (N) * RECIPROCAL(1.0 - SQRT(0.5)))
|
||||||
#if ENABLED(DISTINCT_E_FACTORS)
|
#if ENABLED(DISTINCT_E_FACTORS)
|
||||||
for (uint8_t i = 0; i < EXTRUDERS; i++)
|
for (uint8_t i = 0; i < EXTRUDERS; i++)
|
||||||
max_e_jerk[i] = GET_MAX_E_JERK(settings.max_acceleration_mm_per_s2[E_AXIS + i]);
|
max_e_jerk[i] = GET_MAX_E_JERK(settings.max_acceleration_mm_per_s2[E_AXIS_N(i)]);
|
||||||
#else
|
#else
|
||||||
max_e_jerk = GET_MAX_E_JERK(settings.max_acceleration_mm_per_s2[E_AXIS]);
|
max_e_jerk = GET_MAX_E_JERK(settings.max_acceleration_mm_per_s2[E_AXIS]);
|
||||||
#endif
|
#endif
|
||||||
|
|
Reference in a new issue