start implementing absolute E support
This commit is contained in:
parent
b37a5d435e
commit
ae33cb7fa2
|
|
@ -385,9 +385,14 @@ void gcode_parse_char(uint8_t c) {
|
||||||
|
|
||||||
if (next_target.option_relative) {
|
if (next_target.option_relative) {
|
||||||
next_target.target.X = next_target.target.Y = next_target.target.Z = 0;
|
next_target.target.X = next_target.target.Y = next_target.target.Z = 0;
|
||||||
|
#ifdef E_ABSOLUTE
|
||||||
|
next_target.target.E = 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
// E always relative
|
#ifndef E_ABSOLUTE
|
||||||
next_target.target.E = 0;
|
// E always relative
|
||||||
|
next_target.target.E = 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -88,6 +88,9 @@ void process_gcode_command() {
|
||||||
next_target.target.X += startpoint.X;
|
next_target.target.X += startpoint.X;
|
||||||
next_target.target.Y += startpoint.Y;
|
next_target.target.Y += startpoint.Y;
|
||||||
next_target.target.Z += startpoint.Z;
|
next_target.target.Z += startpoint.Z;
|
||||||
|
#ifdef E_ABSOLUTE
|
||||||
|
next_target.target.E += startpoint.E;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
// E ALWAYS relative, otherwise we overflow our registers after only a few layers
|
// E ALWAYS relative, otherwise we overflow our registers after only a few layers
|
||||||
// next_target.target.E += startpoint.E;
|
// next_target.target.E += startpoint.E;
|
||||||
|
|
@ -193,7 +196,7 @@ void process_gcode_command() {
|
||||||
zero_z();
|
zero_z();
|
||||||
axisSelected = 1;
|
axisSelected = 1;
|
||||||
}
|
}
|
||||||
// there's no point in moving E, as E is always relative
|
// there's no point in moving E, as E has no endstops
|
||||||
|
|
||||||
if (!axisSelected) {
|
if (!axisSelected) {
|
||||||
zero_x();
|
zero_x();
|
||||||
|
|
@ -231,7 +234,9 @@ void process_gcode_command() {
|
||||||
axisSelected = 1;
|
axisSelected = 1;
|
||||||
}
|
}
|
||||||
if (next_target.seen_E) {
|
if (next_target.seen_E) {
|
||||||
// there's no point in setting E, as E is always relative
|
#ifdef E_ABSOLUTE
|
||||||
|
startpoint.E = current_position.E = next_target.target.E;
|
||||||
|
#endif
|
||||||
axisSelected = 1;
|
axisSelected = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue