Merge branch '1.0.7-devel' of https://github.com/OneFinityCNC/onefinity-firmware into improve-button-layout

This commit is contained in:
David Carley
2021-03-10 10:29:03 -08:00
20 changed files with 267 additions and 72 deletions

View File

@@ -114,7 +114,11 @@ module.exports = new Vue({
motors: [{}, {}, {}, {}],
version: '<loading>'
},
state: {messages: []},
state: {
messages: [],
wait_for_probing_complete: false,
show_probe_complete_modal: false
},
video_size: cookie.get('video-size', 'small'),
crosshair: cookie.get('crosshair', 'false') != 'false',
errorTimeout: 30,

View File

@@ -36,6 +36,12 @@ module.exports = {
type: Boolean,
required: true,
twoWay: true
},
class: {
type: String,
required: false,
twoWay: false
}
}
}

View File

@@ -27,23 +27,12 @@
var orbit = require('./orbit');
var cookie = require('./cookie')('bbctrl-');
var api = require('./api');
var font = require('./helvetiker_regular.typeface.json')
function get(obj, name, defaultValue) {
return typeof obj[name] == 'undefined' ? defaultValue : obj[name];
}
var surfaceModes = ['cut', 'wire', 'solid', 'off'];
module.exports = {
template: '#path-viewer-template',
props: ['toolpath'],
data: function () {
return {
enabled: false,
@@ -62,7 +51,22 @@ module.exports = {
computed: {
target: function () {return $(this.$el).find('.path-viewer-content')[0]}
target: function () {
return $(this.$el).find('.path-viewer-content')[0]
},
webglAvailable: function() {
// Create canvas element. The canvas is not added to the
// document itself, so it is never displayed in the
// browser window.
const canvas = document.createElement("canvas");
// Get WebGLRenderingContext from canvas element.
const gl = canvas.getContext("webgl") || canvas.getContext("experimental-webgl");
// Report the result.
return gl && gl instanceof WebGLRenderingContext;
}
},
@@ -122,6 +126,10 @@ module.exports = {
methods: {
update: function () {
if (!this.webglAvailable) {
return;
}
if (!this.state.selected) {
this.dirty = true;
this.scene = new THREE.Scene();
@@ -269,6 +277,10 @@ module.exports = {
graphics: function () {
if (!this.webglAvailable) {
return;
}
try {
// Renderer
this.renderer = new THREE.WebGLRenderer({antialias: true, alpha: true});
@@ -280,6 +292,7 @@ module.exports = {
console.log('WebGL not supported: ', e);
return;
}
this.enabled = true;
// Camera

View File

@@ -175,10 +175,14 @@ script#control-view-template(type="text/x-template")
button#jog_button_large(style="height:100px;width:100px", @click=`set_jog_incr('large')`) 100
tr
td(style="height:100px", align="center", colspan="2")
button(style="height:100px;width:200px", :class="state['pw'] ? '' : 'load-on'", @click=`start_probe_test(() => { show_tool_diameter_modal = true })`)
button(:class="state['pw'] ? '' : 'load-on'",
style="height:100px;width:200px",
@click=`start_probe_test(() => { show_tool_diameter_modal = true })`)
| Probe XYZ
td(style="height:100px", align="center", colspan="2")
button(style="height:100px;width:200px", :class="state['pw'] ? '' : 'load-on'", @click=`start_probe_test(probe_z)`)
button(:class="state['pw'] ? '' : 'load-on'",
style="height:100px;width:200px",
@click=`start_probe_test(probe_z)`)
| Probe Z
td(style="vertical-align: top;")

View File

@@ -26,7 +26,7 @@
//-/////////////////////////////////////////////////////////////////////////////
script#message-template(type="text/x-template")
.modal-mask(v-if="show")
.modal-mask(v-if="show", :class="class")
.modal-wrapper
.modal-container
.modal-header

View File

@@ -147,11 +147,13 @@ class Config(object):
for motor in config['motors']:
motor['stall-microstep'] = 8
motor['stall-current'] = 1
motor['idle-current'] = 1
motor['max-accel'] = 750
motor['latch-backoff'] = 5
if motor['axis'] == 'X' or motor['axis'] == 'Y':
motor['search-velocity'] = 1.688
motor['max-velocity'] = 10
motor['max-jerk'] = 15000
motor['max-jerk'] = 1000
motor['zero-backoff'] = 1.5
if motor['axis'] == 'Z':
motor['search-velocity'] = 0.675

View File

@@ -170,7 +170,7 @@ class Log(object):
if self.path is None: return
if self.f is not None: self.f.close()
self._rotate(self.path)
self.f = open(self.path, 'w')
self.f = open(self.path, 'a')
self.bytes_written = 0

View File

@@ -38,9 +38,9 @@
"max-velocity": 10,
"search-velocity": 1.688,
"travel-per-rev": 10,
"idle-current": 0.5,
"idle-current": 1,
"drive-current": 2.8,
"latch-backoff": 5.001,
"latch-backoff": 5,
"enabled": true,
"homing-mode": "stall-min",
"reverse": false,
@@ -48,7 +48,7 @@
"min-soft-limit": 0,
"max-switch": "disabled",
"step-angle": 1.8,
"stall-current": 1.0,
"stall-current": 1,
"stall-sample-time": 200,
"microsteps": 16,
"stall-volts": 2,
@@ -64,9 +64,9 @@
"max-velocity": 10,
"search-velocity": 1.688,
"travel-per-rev": 10,
"idle-current": 0.5,
"idle-current": 1,
"drive-current": 2.8,
"latch-backoff": 5.001,
"latch-backoff": 5,
"enabled": true,
"homing-mode": "stall-min",
"reverse": false,
@@ -86,29 +86,29 @@
},
{
"latch-velocity": 0.1,
"max-accel": 10,
"max-velocity": 17,
"search-velocity": 0.5,
"max-accel": 750,
"max-velocity": 10,
"search-velocity": 1.688,
"travel-per-rev": 10,
"idle-current": 0.5,
"idle-current": 1,
"drive-current": 2.8,
"latch-backoff": 5,
"enabled": true,
"homing-mode": "manual",
"homing-mode": "stall-min",
"reverse": false,
"stall-microstep": 8,
"min-soft-limit": 0,
"max-switch": "disabled",
"step-angle": 1.8,
"stall-current": 1.5,
"stall-sample-time": 50,
"stall-current": 1,
"stall-sample-time": 200,
"microsteps": 16,
"stall-volts": 6,
"stall-volts": 2,
"axis": "Y",
"min-switch": "disabled",
"max-jerk": 50,
"max-soft-limit": 752,
"zero-backoff": 1
"max-jerk": 1000,
"max-soft-limit": 410,
"zero-backoff": 1.5
},
{
"latch-velocity": 0.1,
@@ -116,9 +116,9 @@
"max-velocity": 3,
"search-velocity": 0.675,
"travel-per-rev": 4,
"idle-current": 0.5,
"idle-current": 1,
"drive-current": 2.8,
"latch-backoff": 5.001,
"latch-backoff": 5,
"enabled": true,
"homing-mode": "stall-max",
"reverse": true,

View File

@@ -38,9 +38,9 @@
"max-velocity": 10,
"search-velocity": 1.688,
"travel-per-rev": 10,
"idle-current": 0.5,
"idle-current": 1,
"drive-current": 2.8,
"latch-backoff": 5.001,
"latch-backoff": 5,
"enabled": true,
"homing-mode": "stall-min",
"reverse": false,
@@ -64,9 +64,9 @@
"max-velocity": 10,
"search-velocity": 1.688,
"travel-per-rev": 10,
"idle-current": 0.5,
"idle-current": 1,
"drive-current": 2.8,
"latch-backoff": 5.001,
"latch-backoff": 5,
"enabled": true,
"homing-mode": "stall-min",
"reverse": false,
@@ -86,29 +86,29 @@
},
{
"latch-velocity": 0.1,
"max-accel": 10,
"max-velocity": 17,
"search-velocity": 0.5,
"max-accel": 750,
"max-velocity": 10,
"search-velocity": 1.688,
"travel-per-rev": 10,
"idle-current": 0.5,
"idle-current": 1,
"drive-current": 2.8,
"latch-backoff": 5,
"enabled": true,
"homing-mode": "manual",
"homing-mode": "stall-min",
"reverse": false,
"stall-microstep": 8,
"min-soft-limit": 0,
"max-switch": "disabled",
"step-angle": 1.8,
"stall-current": 1.5,
"stall-sample-time": 50,
"stall-current": 1,
"stall-sample-time": 200,
"microsteps": 16,
"stall-volts": 6,
"stall-volts": 2,
"axis": "Y",
"min-switch": "disabled",
"max-jerk": 50,
"max-soft-limit": 752,
"zero-backoff": 1
"max-jerk": 1000,
"max-soft-limit": 816,
"zero-backoff": 1.5
},
{
"latch-velocity": 0.1,
@@ -116,9 +116,9 @@
"max-velocity": 3,
"search-velocity": 0.675,
"travel-per-rev": 4,
"idle-current": 0.5,
"idle-current": 1,
"drive-current": 2.8,
"latch-backoff": 5.001,
"latch-backoff": 5,
"enabled": true,
"homing-mode": "stall-max",
"reverse": true,