Skip to content

Commit 9b5e2a6

Browse files
committed
task -set blend tolerance default based on machine units
A very common newbee complaint is huge corner rounding. This is caused by linuxcnc setting the default blend tolerance to maximum. Now we set it to a (seemingly) reasonable default depending if the machine is metric or inch. - modify the startup runtest for G64 p startup change
1 parent dc622fd commit 9b5e2a6

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/emc/task/emccanon.cc

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2569,7 +2569,6 @@ void INIT_CANON()
25692569
canon.g92Offset.w = 0.0;
25702570
SELECT_PLANE(CANON_PLANE_XY);
25712571
canonUpdateEndPoint(0, 0, 0, 0, 0, 0, 0, 0, 0);
2572-
SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0);
25732572
SET_NAIVECAM_TOLERANCE(0);
25742573
for (int s = 0; s < EMCMOT_MAX_SPINDLES; s++) {
25752574
canon.spindle[s].speed = 0.0;
@@ -2599,6 +2598,12 @@ void INIT_CANON()
25992598
("non-standard length units, setting interpreter to mm");
26002599
canon.lengthUnits = CANON_UNITS_MM;
26012600
}
2601+
/* Set blending tolerance default depending on units machine is based on*/
2602+
if (canon.lengthUnits == CANON_UNITS_INCHES) {
2603+
SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, .001);
2604+
} else {
2605+
SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, .001 * MM_PER_INCH);
2606+
}
26022607
}
26032608

26042609
/* Sends error message */

tests/startup-state/test-ui.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ def assert_axis_initialized(axis):
303303
assert(s.read_line == 0)
304304
assert(s.rotation_xy == 0.0)
305305

306-
assert(s.settings == (0.0, 0.0, 0.0, 0.0, 0.0))
306+
assert(s.settings == (0.0, 0.0, 0.0, 0.001, 0.0))
307307
assert(s.spindle[0]['brake'] == 1)
308308
assert(s.spindle[0]['direction'] == 0)
309309
assert(s.spindle[0]['enabled'] == 0)

0 commit comments

Comments
 (0)