G12 E soft endstops parameter (#17788)

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

No files matched your search

+12 -10
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