- Show latest GCode message in ``Message`` field on CONTROL page.
- Marked several GCodes supported in cheat sheet.
- Solved planner lookahead failure for most reasonable cases.
+ - Prevent cutting off distant parts of 3D path view.
+ - Raised default ``latch-backoff`` to 100mm and ``zero-backoff`` to 5mm.
+ - Added ``max-deviation`` option.
## v0.4.11
- Don't reset global offsets on M2.
#!/bin/bash
-UPDATE=/var/lib/bbctrl/firmware/update.tar.bz2
+(
+ flock -n 9
-if [ ! -e "$UPDATE" ]; then
- echo "Missing $UPDATE"
- exit 1
-fi
+ UPDATE=/var/lib/bbctrl/firmware/update.tar.bz2
-systemctl stop bbctrl
+ if [ ! -e "$UPDATE" ]; then
+ echo "Missing $UPDATE"
+ exit 1
+ fi
-rm -rf /tmp/update
-mkdir /tmp/update
-cd /tmp/update
+ systemctl stop bbctrl
-LOG=/var/log/bbctrl.$(date +%Y%m%d-%H%M%S).install
-tar xf "$UPDATE"
-cd *
-./scripts/install.sh "$*" 2>&1 > $LOG
+ rm -rf /tmp/update
+ mkdir /tmp/update
+ cd /tmp/update
-cd -
-rm -rf /tmp/update $UPDATE
+ LOG=/var/log/bbctrl.$(date +%Y%m%d-%H%M%S).install
+ tar xf "$UPDATE"
+ cd *
+ ./scripts/install.sh "$*" 2>&1 > $LOG
+
+ cd -
+ rm -rf /tmp/update $UPDATE
+
+) 9> /var/lock/bbctrl.update.lock
ex.seg.cb = ex.cb;
ex.cb = _segment_exec;
- if (!ex.seg.cb) seek_end();
+ // TODO To be precise, seek_end() should not be called until the current
+ // segment has completed execution.
+ if (!ex.seg.cb) seek_end(); // No callback when at line end
return _segment_exec();
}
var pathMin = this.state['path_min_' + axis];
var pathMax = this.state['path_max_' + axis];
var pathDim = pathMax - pathMin;
- var under = pathMin - off < min;
- var over = max < pathMax - off;
+ var under = pathMin + off < min;
+ var over = max < pathMax + off;
var klass = (homed ? 'homed' : 'unhomed') + ' axis-' + axis;
var state = 'UNHOMED';
var icon = 'question-circle';
case 'OVER':
title = 'Tool path would move ' +
- this._length_str(pathMax - off - max) + ' beyond axis bounds.';
+ this._length_str(pathMax + off - max) + ' beyond axis bounds.';
break;
case 'UNDER':
title = 'Tool path would move ' +
- this._length_str(min - pathMin + off) + ' below axis bounds.';
+ this._length_str(min - pathMin - off) + ' below axis bounds.';
break;
case 'NO FIT':
}
return {
- pos: abs + off,
+ pos: abs - off,
abs: abs,
off: off,
min: min,
var max = new THREE.Vector3();
for (var axis of 'xyz') {
- min[axis] = this[axis].min + this[axis].off;
- max[axis] = this[axis].max + this[axis].off;
+ min[axis] = this[axis].min - this[axis].off;
+ max[axis] = this[axis].max - this[axis].off;
}
var bounds = new THREE.Box3(min, max);
this.enabled = true;
// Camera
- this.camera = new THREE.PerspectiveCamera(45, 4 / 3, 1, 1000);
+ this.camera = new THREE.PerspectiveCamera(45, 4 / 3, 1, 10000);
// Lighting
this.ambient = new THREE.AmbientLight(0xffffff, 0.5);
h2 GCode
templated-input(v-for="templ in template.gcode", :name="$key",
:model.sync="config.gcode[$key]", :template="templ")
+
+ fieldset
+ h2 Path Accuracy
+ templated-input(name="max-deviation",
+ :model.sync="config.settings['max-deviation']",
+ :template="template.settings['max-deviation']")
+
+ p.
+ Lower #[tt max-deviation] to follow the programmed path more precisely
+ but at a slower speed.
+
+ p.
+ In order to improve traversal speed, the path planner may merge
+ consecutive moves or round off sharp corners if doing so would deviate
+ from the program path by less than #[tt max-deviation].
+
+ - var base = '//linuxcnc.org/docs/html/gcode/g-code.html'
+ p.
+ GCode commands
+ #[a(href=base + "#gcode:g61-g61.1", target="_blank") G61, G61.1] and
+ #[a(href=base + "#gcode:g64", target="_blank") G64] also affect path
+ planning accuracy.
self._get_cycle())
# Set the absolute position both locally and via the AVR
- target = position - state.get('offset_' + axis)
+ target = position + state.get('offset_' + axis)
state.set(axis + 'p', target)
super().queue_command(Cmd.set_axis(axis, target))
'max-accel': state.get_axis_vector('am', 1000000),
'max-jerk': state.get_axis_vector('jm', 1000000),
'rapid-auto-off': config.get('rapid-auto-off'),
- # TODO junction deviation & accel
+ 'max-blend-error': config.get('max-deviation'),
+ 'max-merge-error': config.get('max-deviation'),
}
if with_limits:
"type": "enum",
"values": ["METRIC", "IMPERIAL"],
"default": "METRIC"
+ },
+ "max-deviation": {
+ "help":
+ "Default allowed deviation from programmed path. Also see G64 & G61.",
+ "type": "float",
+ "min": 0.001,
+ "max": 100,
+ "unit": "mm",
+ "iunit": "in",
+ "scale": 25.4,
+ "default": 0.1
}
},
"motors": {
"unit": "mm",
"iunit": "in",
"scale": 25.4,
- "default": 5,
+ "default": 100,
"code": "lb"
},
"zero-backoff": {
"unit": "mm",
"iunit": "in",
"scale": 25.4,
- "default": 1,
+ "default": 5,
"code": "zb"
}
}