Merge branch '1.0.7-devel' into put-away-probe-modal
This commit is contained in:
@@ -30,27 +30,39 @@
|
|||||||
var api = require('./api');
|
var api = require('./api');
|
||||||
var cookie = require('./cookie')('bbctrl-');
|
var cookie = require('./cookie')('bbctrl-');
|
||||||
var Sock = require('./sock');
|
var Sock = require('./sock');
|
||||||
const { exec } = require('child_process');
|
|
||||||
|
|
||||||
function compare_versions(a, b) {
|
function is_newer_version(current, latest) {
|
||||||
var reStripTrailingZeros = /(\.0+)+$/;
|
const pattern = /(\d+)\.(\d+)\.(\d+)(.*)/;
|
||||||
var segsA = a.replace(reStripTrailingZeros, '').split('.');
|
const currentParts = current.match(pattern);
|
||||||
var segsB = b.replace(reStripTrailingZeros, '').split('.');
|
const latestParts = latest.match(pattern);
|
||||||
var l = Math.min(segsA.length, segsB.length);
|
|
||||||
|
|
||||||
for (var i = 0; i < l; i++) {
|
if (!currentParts || !latestParts) {
|
||||||
var diff = parseInt(segsA[i], 10) - parseInt(segsB[i], 10);
|
return false;
|
||||||
if (diff) return diff;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return segsA.length - segsB.length;
|
// Normal version comparisons
|
||||||
}
|
const major = latestParts[1] - currentParts[1];
|
||||||
|
const minor = latestParts[2] - currentParts[2];
|
||||||
|
const patch = latestParts[3] - currentParts[3];
|
||||||
|
|
||||||
|
// If current is a pre-release, and latest is a release
|
||||||
|
const betaToRelease = latestParts[4].length === 0 && currentParts[4].length > 0;
|
||||||
|
|
||||||
|
switch (true) {
|
||||||
|
case major > 0:
|
||||||
|
case major === 0 && minor > 0:
|
||||||
|
case major === 0 && minor === 0 && patch > 0:
|
||||||
|
case major === 0 && minor === 0 && patch === 0 && betaToRelease:
|
||||||
|
return true;
|
||||||
|
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function is_object(o) {return o !== null && typeof o == 'object'}
|
function is_object(o) {return o !== null && typeof o == 'object'}
|
||||||
function is_array(o) {return Array.isArray(o)}
|
function is_array(o) {return Array.isArray(o)}
|
||||||
|
|
||||||
|
|
||||||
function update_array(dst, src) {
|
function update_array(dst, src) {
|
||||||
while (dst.length) dst.pop()
|
while (dst.length) dst.pop()
|
||||||
for (var i = 0; i < src.length; i++)
|
for (var i = 0; i < src.length; i++)
|
||||||
@@ -292,7 +304,7 @@ module.exports = new Vue({
|
|||||||
|
|
||||||
show_upgrade: function () {
|
show_upgrade: function () {
|
||||||
if (!this.latestVersion) return false;
|
if (!this.latestVersion) return false;
|
||||||
return compare_versions(this.config.version, this.latestVersion) < 0;
|
return is_newer_version(this.config.version, this.latestVersion);
|
||||||
},
|
},
|
||||||
|
|
||||||
update: function () {
|
update: function () {
|
||||||
|
|||||||
@@ -348,68 +348,54 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
probe_xyz() {
|
probe_xyz() {
|
||||||
let xoffset = this.config.probe["probe-xdim"];
|
const xdim = this.config.probe["probe-xdim"];
|
||||||
let yoffset = this.config.probe["probe-ydim"];
|
const ydim = this.config.probe["probe-ydim"];
|
||||||
let zoffset = this.config.probe["probe-zdim"];
|
const zdim = this.config.probe["probe-zdim"];
|
||||||
let fastSeek = this.config.probe["probe-fast-seek"];
|
const slowSeek = this.config.probe["probe-slow-seek"];
|
||||||
let slowSeek = this.config.probe["probe-slow-seek"];
|
const fastSeek = this.config.probe["probe-fast-seek"];
|
||||||
|
|
||||||
xoffset += this.tool_diameter / 2.0;
|
|
||||||
yoffset += this.tool_diameter / 2.0;
|
|
||||||
|
|
||||||
if (this.mach_units !== "METRIC") {
|
|
||||||
xoffset /= 25.4;
|
|
||||||
yoffset /= 25.4;
|
|
||||||
zoffset /= 25.4;
|
|
||||||
slowSeek /= 25.4;
|
|
||||||
fastSeek /= 25.4;
|
|
||||||
}
|
|
||||||
|
|
||||||
const zlift = 1;
|
const zlift = 1;
|
||||||
|
const xoffset = xdim + (this.tool_diameter / 2.0);
|
||||||
|
const yoffset = ydim + (this.tool_diameter / 2.0);
|
||||||
|
const zoffset = zdim;
|
||||||
|
|
||||||
|
const metric = this.mach_units == "METRIC";
|
||||||
|
const mm = n => (metric ? n : n / 25.4).toFixed(5);
|
||||||
|
const speed = s => `F${mm(s)}`;
|
||||||
|
|
||||||
// After probing Z, we want to drop the bit down:
|
// After probing Z, we want to drop the bit down:
|
||||||
// Ideally, 12.7mm/0.5in
|
// Ideally, 12.7mm/0.5in
|
||||||
// And we don't want to be more than 75% down on the probe block
|
// And we don't want to be more than 75% down on the probe block
|
||||||
let plunge = Math.min(12.7, zoffset * 0.75);
|
// Also, add zlift to compensate for the fact that we lift after probing Z
|
||||||
plunge += zlift; // Compensate for the fact that we lift after probing Z
|
const plunge = Math.min(12.7, zoffset * 0.75) + zlift;
|
||||||
|
|
||||||
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(`
|
this.send(`
|
||||||
G21
|
${metric ? "G21" : "G20"}
|
||||||
G92 X0 Y0 Z0
|
G92 X0 Y0 Z0
|
||||||
|
|
||||||
G38.2 Z -25.4 ${fastSeek}
|
G38.2 Z ${mm(-25.4)} ${speed(fastSeek)}
|
||||||
G91 G1 Z 1
|
G91 G1 Z ${mm(1)}
|
||||||
G38.2 Z -2 ${slowSeek}
|
G38.2 Z ${mm(-2)} ${speed(slowSeek)}
|
||||||
G92 Z ${zoffset}
|
G92 Z ${mm(zoffset)}
|
||||||
|
|
||||||
G91 G0 Z ${zlift}
|
G91 G0 Z ${mm(zlift)}
|
||||||
G91 G0 X 20
|
G91 G0 X ${mm(20)}
|
||||||
G91 G0 Z -${plunge}
|
G91 G0 Z ${mm(-plunge)}
|
||||||
G38.2 X -20 ${fastSeek}
|
G38.2 X ${mm(-20)} ${speed(fastSeek)}
|
||||||
G91 G1 X 1
|
G91 G1 X ${mm(1)}
|
||||||
G38.2 X -2 ${slowSeek}
|
G38.2 X ${mm(-2)} ${speed(slowSeek)}
|
||||||
G92 X ${xoffset}
|
G92 X ${mm(xoffset)}
|
||||||
|
|
||||||
G91 G0 X 1
|
G91 G0 X ${mm(1)}
|
||||||
G91 G0 Y 20
|
G91 G0 Y ${mm(20)}
|
||||||
G91 G0 X -20
|
G91 G0 X ${mm(-20)}
|
||||||
G38.2 Y -20 ${fastSeek}
|
G38.2 Y ${mm(-20)} ${speed(fastSeek)}
|
||||||
G91 G1 Y 1
|
G91 G1 Y ${mm(1)}
|
||||||
G38.2 Y -2 ${slowSeek}
|
G38.2 Y ${mm(-2)} ${speed(slowSeek)}
|
||||||
G92 Y ${yoffset}
|
G92 Y ${mm(yoffset)}
|
||||||
|
|
||||||
G91 G0 Y 3
|
G91 G0 Y ${mm(3)}
|
||||||
G91 G0 Z 25.4
|
G91 G0 Z ${mm(25.4)}
|
||||||
G90 G0 X0 Y0
|
G90 G0 X0 Y0
|
||||||
|
|
||||||
M2
|
M2
|
||||||
@@ -419,33 +405,28 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
probe_z() {
|
probe_z() {
|
||||||
let fastSeek = this.config.probe["probe-fast-seek"];
|
const xdim = this.config.probe["probe-xdim"];
|
||||||
let slowSeek = this.config.probe["probe-slow-seek"];
|
const ydim = this.config.probe["probe-ydim"];
|
||||||
let zoffset = this.config.probe["probe-zdim"];
|
const zdim = this.config.probe["probe-zdim"];
|
||||||
|
const slowSeek = this.config.probe["probe-slow-seek"];
|
||||||
|
const fastSeek = this.config.probe["probe-fast-seek"];
|
||||||
|
|
||||||
if (this.mach_units !== "METRIC") {
|
const zoffset = zdim;
|
||||||
zoffset /= 25.4;
|
|
||||||
slowSeek /= 25.4;
|
|
||||||
fastSeek /= 25.4;
|
|
||||||
}
|
|
||||||
|
|
||||||
zoffset = zoffset.toFixed(5);
|
const metric = this.mach_units == "METRIC";
|
||||||
slowSeek = slowSeek.toFixed(5);
|
const mm = n => (metric ? n : n / 25.4).toFixed(5);
|
||||||
fastSeek = fastSeek.toFixed(5);
|
const speed = s => `F${mm(s)}`;
|
||||||
|
|
||||||
slowSeek = `F${slowSeek}`;
|
|
||||||
fastSeek = `F${fastSeek}`;
|
|
||||||
|
|
||||||
this.send(`
|
this.send(`
|
||||||
G21
|
${metric ? "G21" : "G20"}
|
||||||
G92 Z0
|
G92 Z0
|
||||||
|
|
||||||
G38.2 Z -25.4 ${fastSeek}
|
G38.2 Z ${mm(-25.4)} ${speed(fastSeek)}
|
||||||
G91 G1 Z 1
|
G91 G1 Z ${mm(1)}
|
||||||
G38.2 Z -2 ${slowSeek}
|
G38.2 Z ${mm(-2)} ${speed(slowSeek)}
|
||||||
G92 Z ${zoffset}
|
G92 Z ${mm(zoffset)}
|
||||||
|
|
||||||
G91 G0 Z3
|
G91 G0 Z ${mm(3)}
|
||||||
|
|
||||||
M2
|
M2
|
||||||
`);
|
`);
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ html(lang="en")
|
|||||||
a.upgrade-version(v-if="show_upgrade()", href="#admin-general")
|
a.upgrade-version(v-if="show_upgrade()", href="#admin-general")
|
||||||
| Upgrade to v{{latestVersion}}
|
| Upgrade to v{{latestVersion}}
|
||||||
.fa.fa-check(v-if="!show_upgrade() && latestVersion",
|
.fa.fa-check(v-if="!show_upgrade() && latestVersion",
|
||||||
title="Firmware up to date")
|
title="Firmware up to date" style="font-size: inherit")
|
||||||
.p {{get_ip_address()}} {{get_ssid()}}
|
.p {{get_ip_address()}} {{get_ssid()}}
|
||||||
|
|
||||||
.estop(:class="{active: state.es}")
|
.estop(:class="{active: state.es}")
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ script#control-view-template(type="text/x-template")
|
|||||||
table(width="99%")
|
table(width="99%")
|
||||||
tr
|
tr
|
||||||
td(style="white-space: nowrap;")
|
td(style="white-space: nowrap;")
|
||||||
table(table-layout="fixed")
|
table.control-buttons(table-layout="fixed")
|
||||||
colgroup
|
colgroup
|
||||||
col(style="width:100px")
|
col(style="width:100px")
|
||||||
col(style="width:100px")
|
col(style="width:100px")
|
||||||
@@ -88,11 +88,13 @@ script#control-view-template(type="text/x-template")
|
|||||||
col(style="width:100px")
|
col(style="width:100px")
|
||||||
tr
|
tr
|
||||||
td(style="height:100px",align="center")
|
td(style="height:100px",align="center")
|
||||||
button(style="height:100px;width:100px",@click="jog_fn(-1,1,0,0)") ⬁
|
button(style="height:100px;width:100px",@click="jog_fn(-1,1,0,0)")
|
||||||
|
.fa.fa-arrow-right(style="transform: rotate(-135deg);")
|
||||||
td(style="height:100px",align="center")
|
td(style="height:100px",align="center")
|
||||||
button(style="height:100px;width:100px",@click="jog_fn(0,1,0,0)") Y+
|
button(style="height:100px;width:100px",@click="jog_fn(0,1,0,0)") Y+
|
||||||
td(style="height:100px",align="center")
|
td(style="height:100px",align="center")
|
||||||
button(style="height:100px;width:100px",@click="jog_fn(1,1,0,0)") ⬀
|
button(style="height:100px;width:100px",@click="jog_fn(1,1,0,0)")
|
||||||
|
.fa.fa-arrow-right(style="transform: rotate(-45deg);")
|
||||||
td
|
td
|
||||||
td(style="height:100px",align="center")
|
td(style="height:100px",align="center")
|
||||||
button(style="height:100px;width:100px",,@click="jog_fn(0,0,1,0)") Z+
|
button(style="height:100px;width:100px",,@click="jog_fn(0,0,1,0)") Z+
|
||||||
@@ -101,7 +103,7 @@ script#control-view-template(type="text/x-template")
|
|||||||
button(style="height:100px;width:100px",@click="jog_fn(-1,0,0,0)") X-
|
button(style="height:100px;width:100px",@click="jog_fn(-1,0,0,0)") X-
|
||||||
td(style="height:100px",align="center")
|
td(style="height:100px",align="center")
|
||||||
button(style="height:100px;width:100px",@click="ask_zero_xy_msg = true")
|
button(style="height:100px;width:100px",@click="ask_zero_xy_msg = true")
|
||||||
.fa.fa-bullseye
|
.fa.fa-bullseye(style="font-size: 172%")
|
||||||
td(style="height:100px",align="center")
|
td(style="height:100px",align="center")
|
||||||
button(style="height:100px;width:100px",@click="jog_fn(1,0,0,0)") X+
|
button(style="height:100px;width:100px",@click="jog_fn(1,0,0,0)") X+
|
||||||
td
|
td
|
||||||
@@ -109,11 +111,13 @@ script#control-view-template(type="text/x-template")
|
|||||||
button(style="height:100px;width:100px",@click='ask_zero_z_msg = true') Z0
|
button(style="height:100px;width:100px",@click='ask_zero_z_msg = true') Z0
|
||||||
tr
|
tr
|
||||||
td(style="height:100px",align="center")
|
td(style="height:100px",align="center")
|
||||||
button(style="height:100px;width:100px",@click="jog_fn(-1,-1,0,0)") ⬃
|
button(style="height:100px;width:100px",@click="jog_fn(-1,-1,0,0)")
|
||||||
|
.fa.fa-arrow-right(style="transform: rotate(135deg);")
|
||||||
td(style="height:100px",align="center")
|
td(style="height:100px",align="center")
|
||||||
button(style="height:100px;width:100px",@click="jog_fn(0,-1,0,0)") Y-
|
button(style="height:100px;width:100px",@click="jog_fn(0,-1,0,0)") Y-
|
||||||
td(style="height:100px",align="center")
|
td(style="height:100px",align="center")
|
||||||
button(style="height:100px;width:100px",@click="jog_fn(1,-1,0,0)") ⬂
|
button(style="height:100px;width:100px",@click="jog_fn(1,-1,0,0)")
|
||||||
|
.fa.fa-arrow-right(style="transform: rotate(45deg);")
|
||||||
td
|
td
|
||||||
td(style="height:100px",align="center")
|
td(style="height:100px",align="center")
|
||||||
button(style="height:100px;width:100px",@click="jog_fn(0,0,-1,0)") Z-
|
button(style="height:100px;width:100px",@click="jog_fn(0,0,-1,0)") Z-
|
||||||
@@ -130,7 +134,8 @@ script#control-view-template(type="text/x-template")
|
|||||||
//th.tstate Max
|
//th.tstate Max
|
||||||
th.actions
|
th.actions
|
||||||
button.pure-button(:disabled="!can_set_axis",
|
button.pure-button(:disabled="!can_set_axis",
|
||||||
title="Zero all axis offsets.", @click="zero()",style="height:60px;width:60px") ∅
|
title="Zero all axis offsets.", @click="zero()",style="height:60px;width:60px")
|
||||||
|
.fa.fa-map-marker
|
||||||
|
|
||||||
button.pure-button(title="Home all axes.", @click="home()",
|
button.pure-button(title="Home all axes.", @click="home()",
|
||||||
:disabled="!is_idle",style="height:60px;width:60px")
|
:disabled="!is_idle",style="height:60px;width:60px")
|
||||||
@@ -170,7 +175,8 @@ script#control-view-template(type="text/x-template")
|
|||||||
|
|
||||||
button.pure-button(:disabled="!can_set_axis",
|
button.pure-button(:disabled="!can_set_axis",
|
||||||
title=`Zero {{'${axis}' | upper}} axis offset.`,
|
title=`Zero {{'${axis}' | upper}} axis offset.`,
|
||||||
@click=`zero('${axis}')`,style="height:60px;width:60px") ∅
|
@click=`zero('${axis}')`,style="height:60px;width:60px")
|
||||||
|
.fa.fa-map-marker
|
||||||
|
|
||||||
button.pure-button(:disabled="!is_idle", @click=`home('${axis}')`,
|
button.pure-button(:disabled="!is_idle", @click=`home('${axis}')`,
|
||||||
title=`Home {{'${axis}' | upper}} axis.`,style="height:60px;width:60px")
|
title=`Home {{'${axis}' | upper}} axis.`,style="height:60px;width:60px")
|
||||||
@@ -220,7 +226,7 @@ script#control-view-template(type="text/x-template")
|
|||||||
title=`Home {{'${axis}' | upper}} axis.`,
|
title=`Home {{'${axis}' | upper}} axis.`,
|
||||||
@click=`set_home('${axis}', axis_position)`) Set
|
@click=`set_home('${axis}', axis_position)`) Set
|
||||||
tr
|
tr
|
||||||
td(style="white-space: nowrap;")
|
td.control-buttons(style="white-space: nowrap;")
|
||||||
button(style="height:100px;width:100px;font-weight:normal",id="jog_button_fine",@click=`set_jog_incr('fine')`) 0.1
|
button(style="height:100px;width:100px;font-weight:normal",id="jog_button_fine",@click=`set_jog_incr('fine')`) 0.1
|
||||||
button(style="height:100px;width:100px;font-weight:bold",id="jog_button_small",@click=`set_jog_incr('small')`) 1.0
|
button(style="height:100px;width:100px;font-weight:bold",id="jog_button_small",@click=`set_jog_incr('small')`) 1.0
|
||||||
button(style="height:100px;width:100px;font-weight:normal",id="jog_button_medium",@click=`set_jog_incr('medium')`) 10
|
button(style="height:100px;width:100px;font-weight:normal",id="jog_button_medium",@click=`set_jog_incr('medium')`) 10
|
||||||
@@ -305,8 +311,10 @@ script#control-view-template(type="text/x-template")
|
|||||||
label {{(progress || 0) | percent}}
|
label {{(progress || 0) | percent}}
|
||||||
.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")
|
||||||
message(:show.sync=`show_probe_test_modal`)
|
message(:show.sync=`show_probe_test_modal`)
|
||||||
|
|
||||||
h3(slot="header") Test probe connection
|
h3(slot="header") Test probe connection
|
||||||
|
|
||||||
div(slot="body")
|
div(slot="body")
|
||||||
@@ -406,11 +414,10 @@ script#control-view-template(type="text/x-template")
|
|||||||
input(type="file", @change="upload", :disabled="!is_ready",
|
input(type="file", @change="upload", :disabled="!is_ready",
|
||||||
accept="text/*,.nc,.gcode,.gc,.ngc,.txt,.tap,.cnc")
|
accept="text/*,.nc,.gcode,.gc,.ngc,.txt,.tap,.cnc")
|
||||||
|
|
||||||
a.pure-button(:disabled="!state.selected", download,
|
a(:disabled="!state.selected", download,
|
||||||
:href="'/api/file/' + state.selected",
|
:href="'/api/file/' + state.selected",
|
||||||
title="Download the selected GCode program.",style="height:100px;width:100px")
|
title="Download the selected GCode program.")
|
||||||
br
|
button.pure-button(style="height:100px;width:100px")
|
||||||
br
|
|
||||||
.fa.fa-download
|
.fa.fa-download
|
||||||
|
|
||||||
button.pure-button(title="Delete current GCode program.",
|
button.pure-button(title="Delete current GCode program.",
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ script#settings-view-template(type="text/x-template")
|
|||||||
- var base = '//linuxcnc.org/docs/html/gcode/g-code.html'
|
- var base = '//linuxcnc.org/docs/html/gcode/g-code.html'
|
||||||
p.
|
p.
|
||||||
GCode commands
|
GCode commands
|
||||||
#[a(href=base + "#gcode:g61-g61.1", target="_blank") G61, G61.1] and
|
#[a(href=base + "#gcode:g61", target="_blank") G61, G61.1] and
|
||||||
#[a(href=base + "#gcode:g64", target="_blank") G64] also affect path
|
#[a(href=base + "#gcode:g64", target="_blank") G64] also affect path
|
||||||
planning accuracy.
|
planning accuracy.
|
||||||
|
|
||||||
|
|||||||
@@ -141,35 +141,23 @@ class Config(object):
|
|||||||
version = version.split('b')[0] # Strip off any "beta" suffix
|
version = version.split('b')[0] # Strip off any "beta" suffix
|
||||||
version = tuple(map(int, version.split('.'))) # Break it into a tuple of integers
|
version = tuple(map(int, version.split('.'))) # Break it into a tuple of integers
|
||||||
|
|
||||||
if version < (0, 2, 4):
|
if version < (1, 0, 7):
|
||||||
|
config['settings']['max-deviation'] = 0.001
|
||||||
|
config['settings']['junction-accel'] = 200000
|
||||||
for motor in config['motors']:
|
for motor in config['motors']:
|
||||||
for key in 'max-jerk max-velocity'.split():
|
motor['stall-microstep'] = 8
|
||||||
if key in motor: motor[key] /= 1000
|
motor['stall-current'] = 1
|
||||||
|
motor['max-accel'] = 750
|
||||||
if version < (0, 3, 4):
|
if motor['axis'] == 'X' or motor['axis'] == 'Y':
|
||||||
for motor in config['motors']:
|
motor['search-velocity'] = 1.688
|
||||||
for key in 'max-accel latch-velocity search-velocity'.split():
|
motor['max-velocity'] = 10
|
||||||
if key in motor: motor[key] /= 1000
|
motor['max-jerk'] = 15000
|
||||||
|
motor['zero-backoff'] = 1.5
|
||||||
if version <= (0, 3, 22):
|
if motor['axis'] == 'Z':
|
||||||
if 'tool' in config:
|
motor['search-velocity'] = 0.675
|
||||||
if 'spindle-type' in config['tool']:
|
motor['max-velocity'] = 3
|
||||||
type = config['tool']['spindle-type']
|
motor['max-jerk'] = 1000
|
||||||
if type == 'PWM': type = 'PWM Spindle'
|
motor['zero-backoff'] = 1
|
||||||
if type == 'Huanyang': type = 'Huanyang VFD'
|
|
||||||
config['tool']['tool-type'] = type
|
|
||||||
del config['tool']['spindle-type']
|
|
||||||
|
|
||||||
if 'spin-reversed' in config['tool']:
|
|
||||||
reversed = config['tool']['spin-reversed']
|
|
||||||
config['tool']['tool-reversed'] = reversed
|
|
||||||
del config['tool']['spin-reversed']
|
|
||||||
|
|
||||||
if version <= (0, 4, 6):
|
|
||||||
for motor in config['motors']:
|
|
||||||
if 2 < motor.get('idle-current', 0): motor['idle-current'] = 2
|
|
||||||
if 'enabled' not in motor:
|
|
||||||
motor['enabled'] = motor.get('power-mode', '') != 'disabled'
|
|
||||||
|
|
||||||
config['version'] = self.version
|
config['version'] = self.version
|
||||||
|
|
||||||
|
|||||||
@@ -50,9 +50,15 @@ axis_homing_procedure = '''
|
|||||||
G90 G28.3 %(axis)s[#<_%(axis)s_home_position>]
|
G90 G28.3 %(axis)s[#<_%(axis)s_home_position>]
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
# The stepper drivers have a stall flag that is reset
|
||||||
|
# by moving the motors without a stall condition.
|
||||||
|
# The "wiggle" in the stall procedure is to clear the flag.
|
||||||
|
# This was to correct the issue where the stepper motors
|
||||||
|
# may already be in a stall condition when homing is started.
|
||||||
|
# For example, if a user tried to home twice in a row
|
||||||
|
# the second homing attempt would immediately think it
|
||||||
|
# was stalled if we didn't first back it up a bit
|
||||||
stall_homing_procedure = '''
|
stall_homing_procedure = '''
|
||||||
G91 G1 %(axis)s [#<_%(axis)s_zero_backoff> * -1] F[#<_%(axis)s_search_velocity>]
|
|
||||||
G4 P0.25
|
|
||||||
G91 G1 %(axis)s [#<_%(axis)s_zero_backoff>] F[#<_%(axis)s_search_velocity>]
|
G91 G1 %(axis)s [#<_%(axis)s_zero_backoff>] F[#<_%(axis)s_search_velocity>]
|
||||||
G4 P0.25
|
G4 P0.25
|
||||||
G28.2 %(axis)s0 F[#<_%(axis)s_search_velocity>]
|
G28.2 %(axis)s0 F[#<_%(axis)s_search_velocity>]
|
||||||
@@ -275,11 +281,13 @@ class Mach(Comm):
|
|||||||
# Home axis
|
# Home axis
|
||||||
self.mlog.info('Homing %s axis' % axis)
|
self.mlog.info('Homing %s axis' % axis)
|
||||||
self._begin_cycle('homing')
|
self._begin_cycle('homing')
|
||||||
|
|
||||||
if mode.startswith('stall-'): procedure = stall_homing_procedure
|
if mode.startswith('stall-'): procedure = stall_homing_procedure
|
||||||
else: procedure = axis_homing_procedure
|
else: procedure = axis_homing_procedure
|
||||||
self.planner.mdi(procedure % {'axis': axis}, False)
|
|
||||||
|
|
||||||
# self.planner.mdi(axis_homing_procedure % {'axis': axis}, False)
|
gcode = procedure % {'axis': axis}
|
||||||
|
|
||||||
|
self.planner.mdi(gcode, False)
|
||||||
super().resume()
|
super().resume()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -96,6 +96,12 @@ class Planner():
|
|||||||
'junction-accel': config.get('junction-accel'),
|
'junction-accel': config.get('junction-accel'),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# We place an upper limit of 1000 km/min^3 on jerk for MDI movements
|
||||||
|
if mdi:
|
||||||
|
for axis in 'xyzabc':
|
||||||
|
if axis in cfg['max-jerk']:
|
||||||
|
cfg['max-jerk'][axis] = min(1000 * 1000000, cfg['max-jerk'][axis])
|
||||||
|
|
||||||
if with_limits:
|
if with_limits:
|
||||||
minLimit = state.get_soft_limit_vector('tn', -math.inf)
|
minLimit = state.get_soft_limit_vector('tn', -math.inf)
|
||||||
maxLimit = state.get_soft_limit_vector('tm', math.inf)
|
maxLimit = state.get_soft_limit_vector('tm', math.inf)
|
||||||
|
|||||||
@@ -12,8 +12,6 @@
|
|||||||
"min": 0.001,
|
"min": 0.001,
|
||||||
"max": 100,
|
"max": 100,
|
||||||
"unit": "mm",
|
"unit": "mm",
|
||||||
"iunit": "in",
|
|
||||||
"scale": 25.4,
|
|
||||||
"default": 0.1
|
"default": 0.1
|
||||||
},
|
},
|
||||||
"junction-accel": {
|
"junction-accel": {
|
||||||
@@ -23,8 +21,6 @@
|
|||||||
"min": 10000,
|
"min": 10000,
|
||||||
"max": 100000000,
|
"max": 100000000,
|
||||||
"unit": "mm/min²",
|
"unit": "mm/min²",
|
||||||
"iunit": "in/min²",
|
|
||||||
"scale": 25.4,
|
|
||||||
"default": 200000
|
"default": 200000
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
"probe": {
|
"probe": {
|
||||||
"probe-ydim": 53.975,
|
"probe-ydim": 53.975,
|
||||||
"probe-slow-seek": 25,
|
"probe-slow-seek": 25,
|
||||||
"probe-fast-seek": 100,
|
"probe-fast-seek": 75,
|
||||||
"probe-zdim": 15.4,
|
"probe-zdim": 15.4,
|
||||||
"probe-xdim": 53.975
|
"probe-xdim": 53.975
|
||||||
},
|
},
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
"load-2": "disabled"
|
"load-2": "disabled"
|
||||||
},
|
},
|
||||||
"settings": {
|
"settings": {
|
||||||
"junction-accel": 199999.999,
|
"junction-accel": 200000,
|
||||||
"max-deviation": 0.001,
|
"max-deviation": 0.001,
|
||||||
"units": "METRIC"
|
"units": "METRIC"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
"probe": {
|
"probe": {
|
||||||
"probe-ydim": 53.975,
|
"probe-ydim": 53.975,
|
||||||
"probe-slow-seek": 25,
|
"probe-slow-seek": 25,
|
||||||
"probe-fast-seek": 100,
|
"probe-fast-seek": 75,
|
||||||
"probe-zdim": 15.4,
|
"probe-zdim": 15.4,
|
||||||
"probe-xdim": 53.975
|
"probe-xdim": 53.975
|
||||||
},
|
},
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
"load-2": "disabled"
|
"load-2": "disabled"
|
||||||
},
|
},
|
||||||
"settings": {
|
"settings": {
|
||||||
"junction-accel": 199999.999,
|
"junction-accel": 200000,
|
||||||
"max-deviation": 0.001,
|
"max-deviation": 0.001,
|
||||||
"units": "METRIC"
|
"units": "METRIC"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -120,6 +120,12 @@ tt
|
|||||||
.success
|
.success
|
||||||
background green
|
background green
|
||||||
|
|
||||||
|
.fa
|
||||||
|
font-size 150%
|
||||||
|
|
||||||
|
.modal-mask .fa
|
||||||
|
font-size inherit
|
||||||
|
|
||||||
.fa.error
|
.fa.error
|
||||||
background inherit
|
background inherit
|
||||||
color red
|
color red
|
||||||
@@ -252,6 +258,17 @@ span.unit
|
|||||||
table
|
table
|
||||||
border-collapse collapse
|
border-collapse collapse
|
||||||
|
|
||||||
|
// Make sure buttons don't turn into circles
|
||||||
|
button
|
||||||
|
-webkit-appearance none
|
||||||
|
border-radius 2px
|
||||||
|
border-width 1px
|
||||||
|
border-color darkgrey
|
||||||
|
|
||||||
|
// The jogging buttons, etc.
|
||||||
|
.control-buttons button
|
||||||
|
font-size 150%
|
||||||
|
|
||||||
&:first-child
|
&:first-child
|
||||||
margin 0.5em 0
|
margin 0.5em 0
|
||||||
|
|
||||||
@@ -330,7 +347,6 @@ span.unit
|
|||||||
text-align left
|
text-align left
|
||||||
|
|
||||||
.fa
|
.fa
|
||||||
font-size 140%
|
|
||||||
margin-left 2px
|
margin-left 2px
|
||||||
margin-right 6px
|
margin-right 6px
|
||||||
|
|
||||||
@@ -341,7 +357,6 @@ span.unit
|
|||||||
text-align left
|
text-align left
|
||||||
|
|
||||||
.fa
|
.fa
|
||||||
font-size 140%
|
|
||||||
margin-left 2px
|
margin-left 2px
|
||||||
margin-right 6px
|
margin-right 6px
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user