mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-30 15:26:18 +00:00
Patch DISTINCT_E_FACTORS bug
This commit is contained in:
parent
20addc6e32
commit
bfb0007573
@ -184,7 +184,7 @@
|
|||||||
*/
|
*/
|
||||||
#if ENABLED(ADVANCE)
|
#if ENABLED(ADVANCE)
|
||||||
#define EXTRUSION_AREA (0.25 * (D_FILAMENT) * (D_FILAMENT) * M_PI)
|
#define EXTRUSION_AREA (0.25 * (D_FILAMENT) * (D_FILAMENT) * M_PI)
|
||||||
#define STEPS_PER_CUBIC_MM_E (axis_steps_per_mm[E_AXIS] / (EXTRUSION_AREA))
|
#define STEPS_PER_CUBIC_MM_E (axis_steps_per_mm[E_AXIS_N] / (EXTRUSION_AREA))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ENABLED(ULTIPANEL) && DISABLED(ELB_FULL_GRAPHIC_CONTROLLER)
|
#if ENABLED(ULTIPANEL) && DISABLED(ELB_FULL_GRAPHIC_CONTROLLER)
|
||||||
|
@ -1062,6 +1062,9 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
|
|||||||
float current_speed[NUM_AXIS], speed_factor = 1.0; // factor <1 decreases speed
|
float current_speed[NUM_AXIS], speed_factor = 1.0; // factor <1 decreases speed
|
||||||
LOOP_XYZE(i) {
|
LOOP_XYZE(i) {
|
||||||
const float cs = fabs(current_speed[i] = delta_mm[i] * inverse_mm_s);
|
const float cs = fabs(current_speed[i] = delta_mm[i] * inverse_mm_s);
|
||||||
|
#if ENABLED(DISTINCT_E_FACTORS)
|
||||||
|
if (i == E_AXIS) i += extruder;
|
||||||
|
#endif
|
||||||
if (cs > max_feedrate_mm_s[i]) NOMORE(speed_factor, max_feedrate_mm_s[i] / cs);
|
if (cs > max_feedrate_mm_s[i]) NOMORE(speed_factor, max_feedrate_mm_s[i] / cs);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1135,18 +1138,24 @@ void Planner::_buffer_line(const float &a, const float &b, const float &c, const
|
|||||||
// Start with print or travel acceleration
|
// Start with print or travel acceleration
|
||||||
accel = ceil((esteps ? acceleration : travel_acceleration) * steps_per_mm);
|
accel = ceil((esteps ? acceleration : travel_acceleration) * steps_per_mm);
|
||||||
|
|
||||||
|
#if ENABLED(DISTINCT_E_FACTORS)
|
||||||
|
#define ACCEL_IDX extruder
|
||||||
|
#else
|
||||||
|
#define ACCEL_IDX 0
|
||||||
|
#endif
|
||||||
|
|
||||||
// Limit acceleration per axis
|
// Limit acceleration per axis
|
||||||
if (block->step_event_count <= cutoff_long) {
|
if (block->step_event_count <= cutoff_long) {
|
||||||
LIMIT_ACCEL_LONG(X_AXIS,0);
|
LIMIT_ACCEL_LONG(X_AXIS,0);
|
||||||
LIMIT_ACCEL_LONG(Y_AXIS,0);
|
LIMIT_ACCEL_LONG(Y_AXIS,0);
|
||||||
LIMIT_ACCEL_LONG(Z_AXIS,0);
|
LIMIT_ACCEL_LONG(Z_AXIS,0);
|
||||||
LIMIT_ACCEL_LONG(E_AXIS,extruder);
|
LIMIT_ACCEL_LONG(E_AXIS,ACCEL_IDX);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
LIMIT_ACCEL_FLOAT(X_AXIS,0);
|
LIMIT_ACCEL_FLOAT(X_AXIS,0);
|
||||||
LIMIT_ACCEL_FLOAT(Y_AXIS,0);
|
LIMIT_ACCEL_FLOAT(Y_AXIS,0);
|
||||||
LIMIT_ACCEL_FLOAT(Z_AXIS,0);
|
LIMIT_ACCEL_FLOAT(Z_AXIS,0);
|
||||||
LIMIT_ACCEL_FLOAT(E_AXIS,extruder);
|
LIMIT_ACCEL_FLOAT(E_AXIS,ACCEL_IDX);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
block->acceleration_steps_per_s2 = accel;
|
block->acceleration_steps_per_s2 = accel;
|
||||||
|
@ -147,7 +147,7 @@ volatile long Stepper::endstops_trigsteps[XYZ];
|
|||||||
X2_STEP_WRITE(v); \
|
X2_STEP_WRITE(v); \
|
||||||
} \
|
} \
|
||||||
else { \
|
else { \
|
||||||
if (current_block->active_extruder != 0) X2_STEP_WRITE(v); else X_STEP_WRITE(v); \
|
if (current_block->active_extruder) X2_STEP_WRITE(v); else X_STEP_WRITE(v); \
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
#define X_APPLY_DIR(v,Q) X_DIR_WRITE(v)
|
#define X_APPLY_DIR(v,Q) X_DIR_WRITE(v)
|
||||||
|
Loading…
Reference in New Issue
Block a user