Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

task -set blend tolerance default based on machine units #1853

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/emc/task/emccanon.cc
Expand Up @@ -2569,7 +2569,6 @@ void INIT_CANON()
canon.g92Offset.w = 0.0;
SELECT_PLANE(CANON_PLANE_XY);
canonUpdateEndPoint(0, 0, 0, 0, 0, 0, 0, 0, 0);
SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0);
SET_NAIVECAM_TOLERANCE(0);
for (int s = 0; s < EMCMOT_MAX_SPINDLES; s++) {
canon.spindle[s].speed = 0.0;
Expand Down Expand Up @@ -2599,6 +2598,12 @@ void INIT_CANON()
("non-standard length units, setting interpreter to mm");
canon.lengthUnits = CANON_UNITS_MM;
}
/* Set blending tolerance default depending on units machine is based on*/
if (canon.lengthUnits == CANON_UNITS_INCHES) {
SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, .001);
} else {
SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, .001 * MM_PER_INCH);
}
}

/* Sends error message */
Expand Down
2 changes: 1 addition & 1 deletion tests/startup-state/test-ui.py
Expand Up @@ -303,7 +303,7 @@ def assert_axis_initialized(axis):
assert(s.read_line == 0)
assert(s.rotation_xy == 0.0)

assert(s.settings == (0.0, 0.0, 0.0, 0.0, 0.0))
assert(s.settings == (0.0, 0.0, 0.0, 0.001, 0.0))
assert(s.spindle[0]['brake'] == 1)
assert(s.spindle[0]['direction'] == 0)
assert(s.spindle[0]['enabled'] == 0)
Expand Down