G12 E soft endstops parameter (#17788)

This commit is contained in:
Scott Lahteine
2020-04-29 03:25:35 -05:00
committed by GitHub
parent 36adbfa41c
commit 2d758663db
4 changed files with 23 additions and 16 deletions

View File

@ -152,18 +152,20 @@ Nozzle nozzle;
LIMIT( end[arrPos].A, soft_endstop.min.A, soft_endstop.max.A); \
}while(0)
LIMIT_AXIS(x);
LIMIT_AXIS(y);
LIMIT_AXIS(z);
if (soft_endstops_enabled) {
const bool radiusOutOfRange = (middle[arrPos].x + radius > soft_endstop.max.x)
|| (middle[arrPos].x - radius < soft_endstop.min.x)
|| (middle[arrPos].y + radius > soft_endstop.max.y)
|| (middle[arrPos].y - radius < soft_endstop.min.y);
LIMIT_AXIS(x);
LIMIT_AXIS(y);
LIMIT_AXIS(z);
const bool radiusOutOfRange = (middle[arrPos].x + radius > soft_endstop.max.x)
|| (middle[arrPos].x - radius < soft_endstop.min.x)
|| (middle[arrPos].y + radius > soft_endstop.max.y)
|| (middle[arrPos].y - radius < soft_endstop.min.y);
if (radiusOutOfRange && pattern == 2) {
SERIAL_ECHOLNPGM("Warning: Radius Out of Range");
return;
}
if (radiusOutOfRange && pattern == 2) {
SERIAL_ECHOLNPGM("Warning: Radius Out of Range");
return;
}
#endif