Fix de after PREVENT_DANGEROUS_EXTRUDE

- Set `de` to 0 when `position[E] = target[E]`
- Address regression mention in #1846
This commit is contained in:
Scott Lahteine 2015-04-07 20:01:08 -07:00
parent e03da4805b
commit 1d291be2ba

View File

@ -511,12 +511,14 @@ float junction_deviation = 0.1;
if (de) {
if (degHotend(active_extruder) < extrude_min_temp) {
position[E_AXIS] = target[E_AXIS]; //behave as if the move really took place, but ignore E part
de = 0; // no difference
SERIAL_ECHO_START;
SERIAL_ECHOLNPGM(MSG_ERR_COLD_EXTRUDE_STOP);
}
#ifdef PREVENT_LENGTHY_EXTRUDE
if (labs(de) > axis_steps_per_unit[E_AXIS] * EXTRUDE_MAXLENGTH) {
position[E_AXIS] = target[E_AXIS]; // Behave as if the move really took place, but ignore E part
de = 0; // no difference
SERIAL_ECHO_START;
SERIAL_ECHOLNPGM(MSG_ERR_LONG_EXTRUDE_STOP);
}