Merge branch '1.0.7-devel' into make-update-onefinity
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -19,7 +19,10 @@ __pycache__
|
|||||||
*.deb
|
*.deb
|
||||||
*.zip
|
*.zip
|
||||||
/rpi-share
|
/rpi-share
|
||||||
|
/rpi-root
|
||||||
/package-lock.json
|
/package-lock.json
|
||||||
|
/src/bbserial/linux-rpi-raspberrypi-kernel*
|
||||||
|
/src/bbserial/raspberrypi-kernel*
|
||||||
|
|
||||||
*.elf
|
*.elf
|
||||||
*.hex
|
*.hex
|
||||||
|
|||||||
1
Makefile
1
Makefile
@@ -60,6 +60,7 @@ $(GPLAN_MOD): $(GPLAN_IMG)
|
|||||||
./scripts/gplan-init-build.sh
|
./scripts/gplan-init-build.sh
|
||||||
git -C rpi-share/cbang fetch
|
git -C rpi-share/cbang fetch
|
||||||
git -C rpi-share/cbang reset --hard FETCH_HEAD
|
git -C rpi-share/cbang reset --hard FETCH_HEAD
|
||||||
|
git -C rpi-share/cbang checkout 18f1e963107ef26abe750c023355a5c40dd07853
|
||||||
git -C rpi-share/camotics fetch
|
git -C rpi-share/camotics fetch
|
||||||
git -C rpi-share/camotics reset --hard FETCH_HEAD
|
git -C rpi-share/camotics reset --hard FETCH_HEAD
|
||||||
git -C rpi-share/camotics checkout ec876c80d20fc19837133087cef0c447df5a939d
|
git -C rpi-share/camotics checkout ec876c80d20fc19837133087cef0c447df5a939d
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "bbctrl",
|
"name": "bbctrl",
|
||||||
"version": "1.0.6",
|
"version": "1.0.7b0",
|
||||||
"homepage": "https://onefinitycnc.com/",
|
"homepage": "https://onefinitycnc.com/",
|
||||||
"repository": "https://github.com/OneFinityCNC/onefinity",
|
"repository": "https://github.com/OneFinityCNC/onefinity",
|
||||||
"license": "GPL-3.0+",
|
"license": "GPL-3.0+",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash -ex
|
#!/bin/bash -ex
|
||||||
|
|
||||||
cd /mnt/host
|
cd /mnt/host
|
||||||
scons -C cbang disable_local="re2 libevent"
|
scons -j 8 -C cbang disable_local="re2 libevent"
|
||||||
export CBANG_HOME="/mnt/host/cbang"
|
export CBANG_HOME="/mnt/host/cbang"
|
||||||
scons -C camotics gplan.so with_gui=0 with_tpl=0
|
scons -j 8 -C camotics gplan.so with_gui=0 with_tpl=0
|
||||||
|
|||||||
@@ -73,14 +73,12 @@ module.exports = {
|
|||||||
|
|
||||||
|
|
||||||
restore: function (e) {
|
restore: function (e) {
|
||||||
debugger;
|
|
||||||
var files = e.target.files || e.dataTransfer.files;
|
var files = e.target.files || e.dataTransfer.files;
|
||||||
if (!files.length) return;
|
if (!files.length) return;
|
||||||
|
|
||||||
var fr = new FileReader();
|
var fr = new FileReader();
|
||||||
fr.onload = function (e) {
|
fr.onload = function (e) {
|
||||||
var config;
|
var config;
|
||||||
debugger;
|
|
||||||
try {
|
try {
|
||||||
config = JSON.parse(e.target.result);
|
config = JSON.parse(e.target.result);
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
@@ -111,9 +109,6 @@ module.exports = {
|
|||||||
cache: false
|
cache: false
|
||||||
|
|
||||||
}).done(function (data) {
|
}).done(function (data) {
|
||||||
debugger;
|
|
||||||
//console.debug('>', data);
|
|
||||||
//this.default_config = data;
|
|
||||||
var config;
|
var config;
|
||||||
try {
|
try {
|
||||||
config = JSON.parse(data);
|
config = JSON.parse(data);
|
||||||
@@ -149,9 +144,6 @@ module.exports = {
|
|||||||
cache: false
|
cache: false
|
||||||
|
|
||||||
}).done(function (data) {
|
}).done(function (data) {
|
||||||
debugger;
|
|
||||||
//console.debug('>', data);
|
|
||||||
//this.default_config = data;
|
|
||||||
var config;
|
var config;
|
||||||
try {
|
try {
|
||||||
config = JSON.parse(data);
|
config = JSON.parse(data);
|
||||||
|
|||||||
@@ -408,6 +408,11 @@ module.exports = new Vue({
|
|||||||
}
|
}
|
||||||
|
|
||||||
update_object(this.state, e.data, false);
|
update_object(this.state, e.data, false);
|
||||||
|
|
||||||
|
if (this.state.pw === 0) {
|
||||||
|
Vue.set(this.state, "probe_connected", true);
|
||||||
|
}
|
||||||
|
|
||||||
this.$broadcast('update');
|
this.$broadcast('update');
|
||||||
|
|
||||||
}.bind(this)
|
}.bind(this)
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ module.exports = {
|
|||||||
deleteGCode: false,
|
deleteGCode: false,
|
||||||
tab: 'auto',
|
tab: 'auto',
|
||||||
jog_incr: 1.0,
|
jog_incr: 1.0,
|
||||||
|
probe_test: false,
|
||||||
tool_msg: false,
|
tool_msg: false,
|
||||||
tool_diameter: 6.35,
|
tool_diameter: 6.35,
|
||||||
toolpath_msg: {x: false, y: false, z: false, a: false, b: false, c: false},
|
toolpath_msg: {x: false, y: false, z: false, a: false, b: false, c: false},
|
||||||
@@ -259,8 +260,27 @@ module.exports = {
|
|||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
set_tool_diameter : function (new_diameter) {
|
start_probe_test: function(on_finish) {
|
||||||
|
this.probe_test = true;
|
||||||
|
Vue.set(this.state, "probe_connected", false);
|
||||||
|
Vue.set(this.state, "on_probe_finish", on_finish);
|
||||||
|
},
|
||||||
|
|
||||||
|
finish_probe_test: function() {
|
||||||
|
this.probe_test = false;
|
||||||
|
Vue.set(this.state, "probe_connected", false);
|
||||||
|
|
||||||
|
const on_finish = this.state.on_probe_finish;
|
||||||
|
Vue.set(this.state, "on_probe_finish", undefined);
|
||||||
|
|
||||||
|
on_finish();
|
||||||
|
},
|
||||||
|
|
||||||
|
show_tool_diameter_prompt: function() {
|
||||||
|
this.tool_msg = true;
|
||||||
|
},
|
||||||
|
|
||||||
|
set_tool_diameter : function (new_diameter) {
|
||||||
if(isNaN(new_diameter))
|
if(isNaN(new_diameter))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -269,7 +289,6 @@ module.exports = {
|
|||||||
this.tool_diameter = parseFloat(new_diameter);
|
this.tool_diameter = parseFloat(new_diameter);
|
||||||
|
|
||||||
this.probe_xyz();
|
this.probe_xyz();
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
set_jog_incr: function(newValue) {
|
set_jog_incr: function(newValue) {
|
||||||
@@ -328,158 +347,105 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
probe_xyz() {
|
probe_xyz() {
|
||||||
var pcmd = "";
|
let xoffset = this.config.probe["probe-xdim"];
|
||||||
var xoffset = this.config.probe["probe-xdim"];
|
let yoffset = this.config.probe["probe-ydim"];
|
||||||
var yoffset = this.config.probe["probe-ydim"];
|
let zoffset = this.config.probe["probe-zdim"];
|
||||||
var zoffset = this.config.probe["probe-zdim"];
|
let fastSeek = this.config.probe["probe-fast-seek"];
|
||||||
var fastSeek = this.config.probe["probe-fast-seek"];
|
let slowSeek = this.config.probe["probe-slow-seek"];
|
||||||
var slowSeek = this.config.probe["probe-slow-seek"];
|
|
||||||
debugger;
|
|
||||||
|
|
||||||
if(this.mach_units == "METRIC") {
|
xoffset += this.tool_diameter / 2.0;
|
||||||
|
yoffset += this.tool_diameter / 2.0;
|
||||||
|
|
||||||
fastSeek = "F" + fastSeek;
|
if (this.mach_units !== "METRIC") {
|
||||||
slowSeek = "F" + slowSeek;
|
xoffset /= 25.4;
|
||||||
|
yoffset /= 25.4;
|
||||||
//Metric Probing
|
zoffset /= 25.4;
|
||||||
pcmd += "G92 X0\n";
|
slowSeek /= 25.4;
|
||||||
pcmd += "G92 Y0\n";
|
fastSeek /= 25.4;
|
||||||
pcmd += "G92 Z0\n";
|
|
||||||
pcmd += "G21\n";
|
|
||||||
pcmd += "G38.2 Z-25.4 " + fastSeek + "\n";
|
|
||||||
pcmd += "G91 G0 Z1.5\n";
|
|
||||||
pcmd += "G38.2 Z-2.5 " + slowSeek + "\n";
|
|
||||||
|
|
||||||
//var zoffset = 16.383;
|
|
||||||
pcmd += "G92 Z " + zoffset + "\n";
|
|
||||||
|
|
||||||
pcmd += "G91 G0 Z 3.175\n";
|
|
||||||
pcmd += "G91 G0 X 19.05\n";
|
|
||||||
pcmd += "G91 G0 Z -12.7\n";
|
|
||||||
pcmd += "G38.2 X -19.05 " + fastSeek + "\n";
|
|
||||||
pcmd += "G91 G1 X 1.27 " + fastSeek +"\n";
|
|
||||||
pcmd += "G38.2 X -4 " + slowSeek + "\n";
|
|
||||||
|
|
||||||
xoffset += this.tool_diameter/2.0;
|
|
||||||
xoffset = xoffset.toFixed(5);
|
|
||||||
pcmd += "G92 X " + xoffset + "\n";
|
|
||||||
|
|
||||||
pcmd += "G91 G0 X 2.5\n";
|
|
||||||
pcmd += "G91 G0 Y 17\n";
|
|
||||||
pcmd += "G91 G0 X -13\n";
|
|
||||||
pcmd += "G38.2 Y -17 " + fastSeek + "\n";
|
|
||||||
pcmd += "G91 G0 Y 1.27\n";
|
|
||||||
pcmd += "G38.2 Y -4 " + slowSeek +"\n";
|
|
||||||
|
|
||||||
yoffset += this.tool_diameter/2.0;
|
|
||||||
yoffset = yoffset.toFixed(5);
|
|
||||||
pcmd += "G92 Y " + yoffset + "\n";
|
|
||||||
|
|
||||||
pcmd += "G91 G0 Y2.54\n";
|
|
||||||
pcmd += "G91 G0 Z 25.4\n";
|
|
||||||
pcmd += "G90 G0 X0 Y0\n";
|
|
||||||
} else {
|
|
||||||
|
|
||||||
//Imperial Probing
|
|
||||||
|
|
||||||
xoffset = xoffset / 25.4;
|
|
||||||
yoffset = yoffset / 25.4;
|
|
||||||
zoffset = zoffset / 25.4;
|
|
||||||
slowSeek = slowSeek / 25.4;
|
|
||||||
slowSeek = slowSeek.toFixed(5);
|
|
||||||
slowSeek = "F" + slowSeek;
|
|
||||||
fastSeek = fastSeek / 25.4;
|
|
||||||
fastSeek = fastSeek.toFixed(5);
|
|
||||||
fastSeek = "F" + fastSeek;
|
|
||||||
|
|
||||||
pcmd += "G92 X0\n";
|
|
||||||
pcmd += "G92 Y0\n";
|
|
||||||
pcmd += "G92 Z0\n";
|
|
||||||
pcmd += "G20\n";
|
|
||||||
pcmd += "G38.2 Z-1.0 " + fastSeek + "\n";
|
|
||||||
pcmd += "G91 G0 Z0.06\n";
|
|
||||||
pcmd += "G38.2 Z-0.1 " + slowSeek + "\n";
|
|
||||||
|
|
||||||
//var zoffset = 0.645;
|
|
||||||
zoffset = zoffset.toFixed(5);
|
|
||||||
pcmd += "G92 Z " + zoffset + "\n";
|
|
||||||
|
|
||||||
|
|
||||||
pcmd += "G91 G0 Z 0.125\n";
|
|
||||||
pcmd += "G91 G0 X 0.75\n";
|
|
||||||
pcmd += "G91 G0 Z -0.5\n";
|
|
||||||
pcmd += "G38.2 X -0.75 " + fastSeek + "\n";
|
|
||||||
pcmd += "G91 G1 X 0.05 " + fastSeek + "\n";
|
|
||||||
pcmd += "G38.2 X -0.15 " + slowSeek + "\n";
|
|
||||||
|
|
||||||
xoffset += this.tool_diameter/2.0;
|
|
||||||
xoffset = xoffset.toFixed(5);
|
|
||||||
pcmd += "G92 X " + xoffset + "\n";
|
|
||||||
|
|
||||||
pcmd += "G91 G0 X 0.1\n";
|
|
||||||
pcmd += "G91 G0 Y 0.75\n";
|
|
||||||
pcmd += "G91 G0 X -0.5\n";
|
|
||||||
pcmd += "G38.2 Y -0.75 " + fastSeek + "\n";
|
|
||||||
pcmd += "G91 G0 Y 0.05\n";
|
|
||||||
pcmd += "G38.2 Y -0.15 " + slowSeek +"\n";
|
|
||||||
|
|
||||||
yoffset += this.tool_diameter/2.0;
|
|
||||||
yoffset = yoffset.toFixed(5);
|
|
||||||
pcmd += "G92 Y " + yoffset + "\n";
|
|
||||||
|
|
||||||
pcmd += "G91 G0 Y0.1\n";
|
|
||||||
pcmd += "G91 G0 Z1\n";
|
|
||||||
pcmd += "G90 G0 X0 Y0\n";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.send(pcmd);
|
const zlift = 1;
|
||||||
|
|
||||||
|
// After probing Z, we want to drop the bit down:
|
||||||
|
// Ideally, 12.7mm/0.5in
|
||||||
|
// And we don't want to be more than 75% down on the probe block
|
||||||
|
let plunge = Math.min(12.7, zoffset * 0.75);
|
||||||
|
plunge += zlift; // Compensate for the fact that we lift after probing Z
|
||||||
|
|
||||||
|
xoffset = xoffset.toFixed(5);
|
||||||
|
yoffset = yoffset.toFixed(5);
|
||||||
|
zoffset = zoffset.toFixed(5);
|
||||||
|
slowSeek = slowSeek.toFixed(5);
|
||||||
|
fastSeek = fastSeek.toFixed(5);
|
||||||
|
plunge = plunge.toFixed(5);
|
||||||
|
|
||||||
|
slowSeek = `F${slowSeek}`;
|
||||||
|
fastSeek = `F${fastSeek}`;
|
||||||
|
|
||||||
|
this.send(`
|
||||||
|
G21
|
||||||
|
G92 X0 Y0 Z0
|
||||||
|
|
||||||
|
G38.2 Z -25.4 ${fastSeek}
|
||||||
|
G91 G1 Z 1
|
||||||
|
G38.2 Z -2 ${slowSeek}
|
||||||
|
G92 Z ${zoffset}
|
||||||
|
|
||||||
|
G91 G0 Z ${zlift}
|
||||||
|
G91 G0 X 20
|
||||||
|
G91 G0 Z -${plunge}
|
||||||
|
G38.2 X -20 ${fastSeek}
|
||||||
|
G91 G1 X 1
|
||||||
|
G38.2 X -2 ${slowSeek}
|
||||||
|
G92 X ${xoffset}
|
||||||
|
|
||||||
|
G91 G0 X 1
|
||||||
|
G91 G0 Y 20
|
||||||
|
G91 G0 X -20
|
||||||
|
G38.2 Y -20 ${fastSeek}
|
||||||
|
G91 G1 Y 1
|
||||||
|
G38.2 Y -2 ${slowSeek}
|
||||||
|
G92 Y ${yoffset}
|
||||||
|
|
||||||
|
G91 G0 Y 3
|
||||||
|
G91 G0 Z 25.4
|
||||||
|
G90 G0 X0 Y0
|
||||||
|
|
||||||
|
M2
|
||||||
|
`);
|
||||||
},
|
},
|
||||||
|
|
||||||
probe_z() {
|
probe_z() {
|
||||||
var pcmd = "";
|
let fastSeek = this.config.probe["probe-fast-seek"];
|
||||||
var fastSeek = this.config.probe["probe-fast-seek"];
|
let slowSeek = this.config.probe["probe-slow-seek"];
|
||||||
var slowSeek = this.config.probe["probe-slow-seek"];
|
let zoffset = this.config.probe["probe-zdim"];
|
||||||
var zoffset = this.config.probe["probe-zdim"];
|
|
||||||
|
|
||||||
debugger;
|
|
||||||
|
|
||||||
if(this.mach_units == "METRIC") {
|
|
||||||
fastSeek = "F" + fastSeek;
|
|
||||||
slowSeek = "F" + slowSeek;
|
|
||||||
|
|
||||||
|
|
||||||
pcmd += "G92 Z0\n";
|
|
||||||
pcmd += "G21\n";
|
|
||||||
pcmd += "G38.2 Z-25 " + fastSeek + "\n";
|
|
||||||
pcmd += "G91 G0 Z1.5\n";
|
|
||||||
pcmd += "G38.2 Z-2.5 " + slowSeek + "\n";
|
|
||||||
pcmd += "G92 Z " + zoffset + "\n";
|
|
||||||
pcmd += "G91 G0 Z3\n";
|
|
||||||
|
|
||||||
|
|
||||||
} else {
|
|
||||||
zoffset = zoffset / 25.4;
|
|
||||||
slowSeek = slowSeek / 25.4;
|
|
||||||
slowSeek = slowSeek.toFixed(5);
|
|
||||||
slowSeek = "F" + slowSeek;
|
|
||||||
fastSeek = fastSeek / 25.4;
|
|
||||||
fastSeek = fastSeek.toFixed(5);
|
|
||||||
fastSeek = "F" + fastSeek;
|
|
||||||
|
|
||||||
pcmd += "G92 Z0\n";
|
|
||||||
pcmd += "G20\n";
|
|
||||||
pcmd += "G38.2 Z-1.0 " + fastSeek +"\n";
|
|
||||||
pcmd += "G91 G0 Z0.06\n";
|
|
||||||
pcmd += "G38.2 Z-0.1 " + slowSeek + "\n";
|
|
||||||
zoffset = zoffset.toFixed(5);
|
|
||||||
pcmd += "G92 Z " + zoffset + "\n";
|
|
||||||
pcmd += "G91 G0 Z0.125\n";
|
|
||||||
|
|
||||||
|
if (this.mach_units !== "METRIC") {
|
||||||
|
zoffset /= 25.4;
|
||||||
|
slowSeek /= 25.4;
|
||||||
|
fastSeek /= 25.4;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.send(pcmd);
|
zoffset = zoffset.toFixed(5);
|
||||||
|
slowSeek = slowSeek.toFixed(5);
|
||||||
|
fastSeek = fastSeek.toFixed(5);
|
||||||
|
|
||||||
|
slowSeek = `F${slowSeek}`;
|
||||||
|
fastSeek = `F${fastSeek}`;
|
||||||
|
|
||||||
|
this.send(`
|
||||||
|
G21
|
||||||
|
G92 Z0
|
||||||
|
|
||||||
|
G38.2 Z -25.4 ${fastSeek}
|
||||||
|
G91 G1 Z 1
|
||||||
|
G38.2 Z -2 ${slowSeek}
|
||||||
|
G92 Z ${zoffset}
|
||||||
|
|
||||||
|
G91 G0 Z3
|
||||||
|
|
||||||
|
M2
|
||||||
|
`);
|
||||||
},
|
},
|
||||||
|
|
||||||
jog_fn: function (x_jog,y_jog,z_jog,a_jog) {
|
jog_fn: function (x_jog,y_jog,z_jog,a_jog) {
|
||||||
@@ -488,9 +454,6 @@ module.exports = {
|
|||||||
var zcmd = "Z" + z_jog * this.jog_incr;
|
var zcmd = "Z" + z_jog * this.jog_incr;
|
||||||
var acmd = "A" + a_jog * this.jog_incr;
|
var acmd = "A" + a_jog * this.jog_incr;
|
||||||
|
|
||||||
console.log("Jog command: " + this.jog_incr);
|
|
||||||
//debugger;
|
|
||||||
|
|
||||||
this.send('G91\nG0' + xcmd + ycmd + zcmd + acmd + '\n');
|
this.send('G91\nG0' + xcmd + ycmd + zcmd + acmd + '\n');
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -511,15 +474,20 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
load_toolpath: function (file, file_time) {
|
load_toolpath: async function (file, file_time) {
|
||||||
this.toolpath = {};
|
this.toolpath = {};
|
||||||
|
|
||||||
if (!file) return;
|
if (!file) return;
|
||||||
|
|
||||||
api.get('path/' + file).done(function (toolpath) {
|
|
||||||
if (this.last_file_time != file_time) return;
|
if (this.last_file_time != file_time) return;
|
||||||
|
|
||||||
|
this.showGcodeMessage = true;
|
||||||
|
|
||||||
|
let done = false;
|
||||||
|
while (!done) {
|
||||||
|
const toolpath = await api.get(`path/${file}`);
|
||||||
|
|
||||||
if (typeof toolpath.progress == 'undefined') {
|
if (typeof toolpath.progress == 'undefined') {
|
||||||
|
done = true;
|
||||||
toolpath.filename = file;
|
toolpath.filename = file;
|
||||||
this.toolpath_progress = 1;
|
this.toolpath_progress = 1;
|
||||||
this.showGcodeMessage = false;
|
this.showGcodeMessage = false;
|
||||||
@@ -531,13 +499,10 @@ module.exports = {
|
|||||||
Vue.set(state, 'path_min_' + axis, bounds.min[axis]);
|
Vue.set(state, 'path_min_' + axis, bounds.min[axis]);
|
||||||
Vue.set(state, 'path_max_' + axis, bounds.max[axis]);
|
Vue.set(state, 'path_max_' + axis, bounds.max[axis]);
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.showGcodeMessage = true;
|
|
||||||
this.toolpath_progress = toolpath.progress;
|
this.toolpath_progress = toolpath.progress;
|
||||||
this.load_toolpath(file, file_time); // Try again
|
|
||||||
}
|
}
|
||||||
}.bind(this));
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -80,33 +80,29 @@ module.exports = {
|
|||||||
|
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
load: function (file) {
|
load: async function(file) {
|
||||||
if (file == this.file) return;
|
if (file == this.file) return;
|
||||||
this.clear();
|
this.clear();
|
||||||
this.file = file;
|
this.file = file;
|
||||||
|
|
||||||
if (!file) return;
|
if (!file) return;
|
||||||
|
|
||||||
var xhr = new XMLHttpRequest();
|
const response = await fetch(`/api/file/${file}?${Math.random()}`);
|
||||||
xhr.open('GET', '/api/file/' + file + '?' + Math.random(), true);
|
const text = await response.text();
|
||||||
xhr.responseType = 'text';
|
|
||||||
|
|
||||||
xhr.onload = function (e) {
|
if (text.length > 20e6) {
|
||||||
if (this.file != file) return;
|
this.clusterize.update(['File is large - gcode view disabled']);
|
||||||
var lines = escapeHTML(xhr.response.trimRight()).split(/\r?\n/);
|
} else {
|
||||||
|
const lines = escapeHTML(text.trimRight())
|
||||||
for (var i = 0; i < lines.length; i++) {
|
.split(/[\r\n]/)
|
||||||
lines[i] = '<li class="ln' + (i + 1) + '">' +
|
.map((line, i) => `<li class="ln${i + 1}"><b>${i + 1}</b>${line}</li>`);
|
||||||
'<b>' + (i + 1) + '</b>' + lines[i] + '</li>';
|
|
||||||
}
|
|
||||||
|
|
||||||
this.clusterize.update(lines);
|
this.clusterize.update(lines);
|
||||||
|
}
|
||||||
|
|
||||||
this.empty = false;
|
this.empty = false;
|
||||||
|
|
||||||
Vue.nextTick(this.update_line);
|
Vue.nextTick(this.update_line);
|
||||||
}.bind(this)
|
|
||||||
|
|
||||||
xhr.send();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,54 @@
|
|||||||
|
|
||||||
script#control-view-template(type="text/x-template")
|
script#control-view-template(type="text/x-template")
|
||||||
#control
|
#control
|
||||||
|
message(:show.sync="showGcodeMessage")
|
||||||
|
h3(slot="header") Processing New File
|
||||||
|
|
||||||
|
div(slot="body")
|
||||||
|
h3 Please wait..
|
||||||
|
p Simulating GCode to check for errors, calculate ETA and generate 3D view.
|
||||||
|
|
||||||
|
div(slot="footer")
|
||||||
|
label Simulating {{(toolpath_progress || 0) | percent}}
|
||||||
|
|
||||||
|
message(:show.sync=`ask_home_msg`)
|
||||||
|
h3(slot="header") Home Machine
|
||||||
|
|
||||||
|
div(slot="body")
|
||||||
|
p Home the machine?
|
||||||
|
|
||||||
|
div(slot="footer")
|
||||||
|
button.pure-button(@click="home()")
|
||||||
|
| OK
|
||||||
|
|
||||||
|
button.pure-button(@click='ask_home_msg = false; ask_home = false')
|
||||||
|
| Cancel
|
||||||
|
|
||||||
|
message(:show.sync=`ask_zero_xy_msg`)
|
||||||
|
h3(slot="header") XY Origin
|
||||||
|
|
||||||
|
div(slot="body")
|
||||||
|
p Move to XY origin?
|
||||||
|
|
||||||
|
div(slot="footer")
|
||||||
|
button.pure-button(@click="goto_zero(1,1,0,0)")
|
||||||
|
| Confirm
|
||||||
|
|
||||||
|
button.pure-button(@click='ask_zero_xy_msg = false')
|
||||||
|
| Cancel
|
||||||
|
|
||||||
|
message(:show.sync=`ask_zero_z_msg`)
|
||||||
|
h3(slot="header") Z Origin
|
||||||
|
|
||||||
|
div(slot="body")
|
||||||
|
p Move to Z origin?
|
||||||
|
|
||||||
|
div(slot="footer")
|
||||||
|
button.pure-button(@click="goto_zero(0,0,1,0)")
|
||||||
|
| Confirm
|
||||||
|
|
||||||
|
button.pure-button(@click='ask_zero_z_msg = false')
|
||||||
|
| Cancel
|
||||||
|
|
||||||
table(width="99%")
|
table(width="99%")
|
||||||
tr
|
tr
|
||||||
@@ -114,56 +162,6 @@ script#control-view-template(type="text/x-template")
|
|||||||
button.pure-button(@click=`toolpath_msg['${axis}'] = false`)
|
button.pure-button(@click=`toolpath_msg['${axis}'] = false`)
|
||||||
| OK
|
| OK
|
||||||
|
|
||||||
|
|
||||||
message(:show.sync="showGcodeMessage")
|
|
||||||
h3(slot="header") Processing New File
|
|
||||||
|
|
||||||
div(slot="body")
|
|
||||||
h3 Please wait..
|
|
||||||
p Simulating GCode to check for errors, calculate ETA and generate 3D view.
|
|
||||||
|
|
||||||
div(slot="footer")
|
|
||||||
label Simulating {{(toolpath_progress || 0) | percent}}
|
|
||||||
|
|
||||||
message(:show.sync=`ask_home_msg`)
|
|
||||||
h3(slot="header") Home Machine
|
|
||||||
|
|
||||||
div(slot="body")
|
|
||||||
p Home the machine?
|
|
||||||
|
|
||||||
div(slot="footer")
|
|
||||||
button.pure-button(@click="home()")
|
|
||||||
| OK
|
|
||||||
|
|
||||||
button.pure-button(@click='ask_home_msg = false; ask_home = false')
|
|
||||||
| Cancel
|
|
||||||
|
|
||||||
message(:show.sync=`ask_zero_xy_msg`)
|
|
||||||
h3(slot="header") XY Origin
|
|
||||||
|
|
||||||
div(slot="body")
|
|
||||||
p Move to XY origin?
|
|
||||||
|
|
||||||
div(slot="footer")
|
|
||||||
button.pure-button(@click="goto_zero(1,1,0,0)")
|
|
||||||
| Confirm
|
|
||||||
|
|
||||||
button.pure-button(@click='ask_zero_xy_msg = false')
|
|
||||||
| Cancel
|
|
||||||
|
|
||||||
message(:show.sync=`ask_zero_z_msg`)
|
|
||||||
h3(slot="header") Z Origin
|
|
||||||
|
|
||||||
div(slot="body")
|
|
||||||
p Move to Z origin?
|
|
||||||
|
|
||||||
div(slot="footer")
|
|
||||||
button.pure-button(@click="goto_zero(0,0,1,0)")
|
|
||||||
| Confirm
|
|
||||||
|
|
||||||
button.pure-button(@click='ask_zero_z_msg = false')
|
|
||||||
| Cancel
|
|
||||||
|
|
||||||
th.actions
|
th.actions
|
||||||
button.pure-button(:disabled="!can_set_axis",
|
button.pure-button(:disabled="!can_set_axis",
|
||||||
title=`Set {{'${axis}' | upper}} axis position.`,
|
title=`Set {{'${axis}' | upper}} axis position.`,
|
||||||
@@ -308,7 +306,21 @@ script#control-view-template(type="text/x-template")
|
|||||||
.bar(:style="'width:' + (progress || 0) * 100 + '%'")
|
.bar(:style="'width:' + (progress || 0) * 100 + '%'")
|
||||||
tr
|
tr
|
||||||
td(style="white-space: nowrap;text-align:center")
|
td(style="white-space: nowrap;text-align:center")
|
||||||
button(:class="state['pw'] ? '' : 'load-on'",style="height:100px;width:200px",@click="tool_msg = true",) Probe XYZ
|
message(:show.sync=`probe_test`)
|
||||||
|
h3(slot="header") Test probe connection
|
||||||
|
|
||||||
|
div(slot="body")
|
||||||
|
.pure-form
|
||||||
|
p Attach the probe magnet to the collet.
|
||||||
|
p Touch the probe block to the bit.
|
||||||
|
|
||||||
|
div(slot="footer")
|
||||||
|
button.pure-button(@click=`probe_test = false`)
|
||||||
|
| Cancel
|
||||||
|
|
||||||
|
button.pure-button.button-success(
|
||||||
|
:disabled=`!state.probe_connected`
|
||||||
|
@click=`finish_probe_test()`) Continue
|
||||||
|
|
||||||
message(:show.sync=`tool_msg`)
|
message(:show.sync=`tool_msg`)
|
||||||
h3(slot="header") Enter probe tool information
|
h3(slot="header") Enter probe tool information
|
||||||
@@ -328,8 +340,8 @@ script#control-view-template(type="text/x-template")
|
|||||||
button.pure-button.button-success(
|
button.pure-button.button-success(
|
||||||
@click=`set_tool_diameter(tool_diameter)`) Set
|
@click=`set_tool_diameter(tool_diameter)`) Set
|
||||||
|
|
||||||
|
button(:class="state['pw'] ? '' : 'load-on'", style="height:100px;width:200px", @click=`start_probe_test(show_tool_diameter_prompt)`) Probe XYZ
|
||||||
button(:class="state['pw'] ? '' : 'load-on'",style="height:100px;width:200px",@click="probe_z()") Probe Z
|
button(:class="state['pw'] ? '' : 'load-on'", style="height:100px;width:200px", @click=`start_probe_test(probe_z)`) Probe Z
|
||||||
|
|
||||||
|
|
||||||
.tabs
|
.tabs
|
||||||
|
|||||||
@@ -137,7 +137,9 @@ class Config(object):
|
|||||||
|
|
||||||
|
|
||||||
def upgrade(self, config):
|
def upgrade(self, config):
|
||||||
version = tuple(map(int, config['version'].split('.')))
|
version = config['version']
|
||||||
|
version = version.split('b')[0] # Strip off any "beta" suffix
|
||||||
|
version = tuple(map(int, version.split('.'))) # Break it into a tuple of integers
|
||||||
|
|
||||||
if version < (0, 2, 4):
|
if version < (0, 2, 4):
|
||||||
for motor in config['motors']:
|
for motor in config['motors']:
|
||||||
@@ -177,7 +179,7 @@ class Config(object):
|
|||||||
self._update(config, False)
|
self._update(config, False)
|
||||||
|
|
||||||
with open(self.ctrl.get_path('config.json'), 'w') as f:
|
with open(self.ctrl.get_path('config.json'), 'w') as f:
|
||||||
json.dump(config, f)
|
json.dump(config, f, indent=2)
|
||||||
|
|
||||||
os.sync()
|
os.sync()
|
||||||
|
|
||||||
|
|||||||
@@ -381,7 +381,7 @@ class Planner():
|
|||||||
|
|
||||||
except RuntimeError as e:
|
except RuntimeError as e:
|
||||||
# Pass on the planner message
|
# Pass on the planner message
|
||||||
self.log.error(str(e));
|
self.log.error(str(e))
|
||||||
self.stop()
|
self.stop()
|
||||||
|
|
||||||
except:
|
except:
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ class State(object):
|
|||||||
|
|
||||||
|
|
||||||
def load_files(self):
|
def load_files(self):
|
||||||
self.files = []
|
files = []
|
||||||
|
|
||||||
upload = self.ctrl.get_upload()
|
upload = self.ctrl.get_upload()
|
||||||
|
|
||||||
@@ -116,37 +116,38 @@ class State(object):
|
|||||||
|
|
||||||
for path in os.listdir(upload):
|
for path in os.listdir(upload):
|
||||||
if os.path.isfile(upload + '/' + path):
|
if os.path.isfile(upload + '/' + path):
|
||||||
self.files.append(path)
|
files.append(path)
|
||||||
|
|
||||||
self.files.sort()
|
files.sort()
|
||||||
self.set('files', self.files)
|
self.set('files', files)
|
||||||
|
|
||||||
if len(self.files): self.select_file(self.files[0])
|
if len(files): self.select_file(files[0])
|
||||||
else: self.select_file('')
|
else: self.select_file('')
|
||||||
|
|
||||||
|
|
||||||
def clear_files(self):
|
def clear_files(self):
|
||||||
self.select_file('')
|
self.select_file('')
|
||||||
self.files = []
|
self.set('files', [])
|
||||||
self.changes['files'] = self.files
|
|
||||||
|
|
||||||
|
|
||||||
def add_file(self, filename):
|
def add_file(self, filename):
|
||||||
if not filename in self.files:
|
files = copy.deepcopy(self.get('files'))
|
||||||
self.files.append(filename)
|
if not filename in files:
|
||||||
self.files.sort()
|
files.append(filename)
|
||||||
self.changes['files'] = self.files
|
files.sort()
|
||||||
|
self.set('files', files)
|
||||||
|
|
||||||
self.select_file(filename)
|
self.select_file(filename)
|
||||||
|
|
||||||
|
|
||||||
def remove_file(self, filename):
|
def remove_file(self, filename):
|
||||||
if filename in self.files:
|
files = copy.deepcopy(self.get('files'))
|
||||||
self.files.remove(filename)
|
if filename in files:
|
||||||
self.changes['files'] = self.files
|
files.remove(filename)
|
||||||
|
self.set('files', files)
|
||||||
|
|
||||||
if self.get('selected', filename) == filename:
|
if self.get('selected', filename) == filename:
|
||||||
if len(self.files): self.select_file(self.files[0])
|
if len(files): self.select_file(files[0])
|
||||||
else: self.select_file('')
|
else: self.select_file('')
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user