diff --git a/package.json b/package.json index f837bd1..af22757 100644 --- a/package.json +++ b/package.json @@ -5,10 +5,11 @@ "repository": "https://github.com/OneFinityCNC/onefinity", "license": "GPL-3.0+", "dependencies": { - "jshint": "", "browserify": "", - "jstransformer-stylus": "", + "jshint": "", "jstransformer-escape-html": "", + "jstransformer-stylus": "", + "lodash.merge": "4.6.2", "pug-cli": "" } } diff --git a/src/js/admin-general-view.js b/src/js/admin-general-view.js index 59c9f33..2db7e1e 100644 --- a/src/js/admin-general-view.js +++ b/src/js/admin-general-view.js @@ -27,14 +27,19 @@ 'use strict' +const merge = require("lodash.merge"); + +const config_defaults = require("../resources/onefinity_defaults.json"); + +const variant_defaults = { + machinist_x35: require("../resources/onefinity_machinist_x35_defaults.json"), + woodworker_x35: require("../resources/onefinity_woodworker_x35_defaults.json"), + woodworker_x50: require("../resources/onefinity_woodworker_x50_defaults.json"), + journeyman_x50: require("../resources/onefinity_journeyman_x50_defaults.json") +}; + const api = require('./api'); -async function fetchJSON(url, options) { - const response = await fetch(url, options); - - return response.json(); -} - module.exports = { template: '#admin-general-view-template', props: ['config', 'state'], @@ -99,17 +104,11 @@ module.exports = { }, reset: async function () { - const fetchConfig = async () => { - try { - return await fetchJSON(`onefinity_${this.reset_variant}_defaults.json`); - } catch (err) { - api.alert("Invalid default config file"); - console.error('Invalid default config file', err); - return undefined; - } - } - - const config = await fetchConfig(); + const config = merge( + {}, + config_defaults, + variant_defaults[this.reset_variant] + ); try { await api.put('config/save', config) diff --git a/src/js/app.js b/src/js/app.js index 648fc8c..b5d8a18 100644 --- a/src/js/app.js +++ b/src/js/app.js @@ -32,23 +32,23 @@ var cookie = require('./cookie')('bbctrl-'); var Sock = require('./sock'); function is_newer_version(current, latest) { - const pattern = /(\d+)\.(\d+)\.(\d+)(.*)/; - const currentParts = current.match(pattern); - const latestParts = latest.match(pattern); + const pattern = /(\d+)\.(\d+)\.(\d+)(.*)/; + const currentParts = current.match(pattern); + const latestParts = latest.match(pattern); if (!currentParts || !latestParts) { return false; } - // Normal version comparisons - const major = latestParts[1] - currentParts[1]; - const minor = latestParts[2] - currentParts[2]; - const patch = latestParts[3] - currentParts[3]; + // 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) { + // 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: @@ -60,8 +60,8 @@ function is_newer_version(current, latest) { } } -function is_object(o) {return o !== null && typeof o == 'object'} -function is_array(o) {return Array.isArray(o)} +function is_object(o) { return o !== null && typeof o == 'object' } +function is_array(o) { return Array.isArray(o) } function update_array(dst, src) { while (dst.length) dst.pop() @@ -110,7 +110,7 @@ module.exports = new Vue({ modified: false, template: require('../resources/config-template.json'), config: { - settings: {units: 'METRIC'}, + settings: { units: 'METRIC' }, motors: [{}, {}, {}, {}], version: '', full_version: '' @@ -132,7 +132,6 @@ module.exports = new Vue({ checkedUpgrade: false, firmwareName: '', latestVersion: '', - password: '', ipAddress: '0.0.0.0', wifiSSID: '', confirmShutdown: false, @@ -140,10 +139,9 @@ module.exports = new Vue({ } }, - components: { - 'estop': {template: '#estop-template'}, - 'loading-view': {template: '

Loading...

'}, + 'estop': { template: '#estop-template' }, + 'loading-view': { template: '

Loading...

' }, 'control-view': require('./control-view'), 'settings-view': require('./settings-view'), 'motor-view': require('./motor-view'), @@ -151,18 +149,21 @@ module.exports = new Vue({ 'io-view': require('./io-view'), 'admin-general-view': require('./admin-general-view'), 'admin-network-view': require('./admin-network-view'), - 'help-view': {template: '#help-view-template'}, + 'help-view': { template: '#help-view-template' }, 'cheat-sheet-view': { template: '#cheat-sheet-view-template', - data: function () {return {showUnimplemented: false}} + data: function () { return { showUnimplemented: false } } } }, - events: { - 'config-changed': function () {this.modified = true;}, - 'hostname-changed': function (hostname) {this.hostname = hostname}, + 'config-changed': function () { + this.modified = true; + }, + 'hostname-changed': function (hostname) { + this.hostname = hostname + }, send: function (msg) { if (this.status == 'connected') { @@ -171,10 +172,13 @@ module.exports = new Vue({ } }, + connected: function () { + this.update() + }, - connected: function () {this.update()}, - update: function () {this.update()}, - + update: function () { + this.update() + }, check: function () { this.latestVersion = ''; @@ -182,7 +186,7 @@ module.exports = new Vue({ $.ajax({ type: 'GET', url: 'https://raw.githubusercontent.com/OneFinityCNC/onefinity-release/master/latest.txt', - data: {hid: this.state.hid}, + data: { hid: this.state.hid }, cache: false }).done(function (data) { @@ -191,28 +195,25 @@ module.exports = new Vue({ }.bind(this)) }, - upgrade: function () { - this.password = ''; this.confirmUpgrade = true; }, - upload: function (firmware) { this.firmware = firmware; this.firmwareName = firmware.name; - this.password = ''; this.confirmUpload = true; }, - error: function (msg) { // Honor user error blocking if (Date.now() - this.errorTimeoutStart < this.errorTimeout * 1000) return; // Wait at least 1 sec to pop up repeated errors - if (1 < msg.repeat && Date.now() - msg.ts < 1000) return; + if (1 < msg.repeat && Date.now() - msg.ts < 1000) { + return; + } // Popup error dialog this.errorShow = true; @@ -220,75 +221,70 @@ module.exports = new Vue({ } }, - computed: { popupMessages: function () { - var msgs = []; + const msgs = []; - for (var i = 0; i < this.state.messages.length; i++) { - var text = this.state.messages[i].text; - if (!/^#/.test(text)) msgs.push(text); + for (let i = 0; i < this.state.messages.length; i++) { + const text = this.state.messages[i].text; + if (!/^#/.test(text)) { + msgs.push(text); + } } return msgs; } }, - ready: function () { $(window).on('hashchange', this.parse_hash); this.connect(); }, - methods: { - metric: function () {return this.config.settings.units != 'IMPERIAL'}, - + metric: function () { + return this.config.settings.units != 'IMPERIAL' + }, block_error_dialog: function () { this.errorTimeoutStart = Date.now(); this.errorShow = false; }, - toggle_video: function (e) { - if (this.video_size == 'small') this.video_size = 'large'; - else if (this.video_size == 'large') this.video_size = 'small'; + if (this.video_size == 'small') this.video_size = 'large'; + else if (this.video_size == 'large') this.video_size = 'small'; cookie.set('video-size', this.video_size); }, - toggle_crosshair: function (e) { e.preventDefault(); this.crosshair = !this.crosshair; cookie.set('crosshair', this.crosshair); }, - estop: function () { if (this.state.xx == 'ESTOPPED') api.put('clear'); else api.put('estop'); }, - - upgrade_confirmed: function () { + upgrade_confirmed: async function () { this.confirmUpgrade = false; - api.put('upgrade', {password: this.password}).done(function () { + try { + await api.put('upgrade'); this.firmwareUpgrading = true; - - }.bind(this)).fail(function () { - api.alert('Invalid password'); - }.bind(this)) + } catch (err) { + api.alert('Error during upgrade.'); + console.error("Error during upgrade", err); + } }, - upload_confirmed: function () { this.confirmUpload = false; - var form = new FormData(); + const form = new FormData(); form.append('firmware', this.firmware); - if (this.password) form.append('password', this.password); $.ajax({ url: '/api/firmware/update', @@ -300,13 +296,12 @@ module.exports = new Vue({ }).success(function () { this.firmwareUpgrading = true; - - }.bind(this)).error(function () { - api.alert('Invalid password or bad firmware'); + }.bind(this)).error(function (err) { + api.alert('Firmware update failed'); + console.error('Firmware update failed', err); }.bind(this)) }, - show_upgrade: function () { if (!this.latestVersion) return false; return is_newer_version(this.config.version, this.latestVersion); @@ -325,80 +320,61 @@ module.exports = new Vue({ this.$emit('check'); } - this.check_ip_address(); - this.check_ssid(); - //.check_disk_space(); - + this.check_ip_address(); + this.check_ssid(); + //.check_disk_space(); + }.bind(this)) }, - check_ip_address : function() { - $.ajax({ + check_ip_address: function () { + $.ajax({ type: 'GET', url: 'hostinfo.txt', - data: {hid: this.state.hid}, + data: { hid: this.state.hid }, cache: false }).done(function (data) { - console.debug('>', data); - this.ipAddress = 'IP:' + data; - this.$broadcast('ipAddress', data); - }.bind(this)) + console.debug('>', data); + this.ipAddress = 'IP:' + data; + this.$broadcast('ipAddress', data); + }.bind(this)) }, - check_ssid : function() { - $.ajax({ + check_ssid: function () { + $.ajax({ type: 'GET', url: 'ssidinfo.txt', - data: {hid: this.state.hid}, + data: { hid: this.state.hid }, cache: false }).done(function (data) { - console.debug('>', data); - this.wifiSSID = 'SSID:' + data; - this.$broadcast('wifiSSID', data); - }.bind(this)) - }, - -// check_disk_space : function() { -// $.ajax({ -// type: 'GET', -// url: 'diskinfo.txt', -// data: {hid: this.state.hid}, -// cache: false -// -// }).done(function (data) { -// console.debug('>', data); -// this.diskSpace = data; -// this.$broadcast('diskSpace', data); -// }.bind(this)) -// }, - - get_ip_address : function() { - console.debug('get_ip>', this.ipAddress); - return this.ipAddress; + console.debug('>', data); + this.wifiSSID = 'SSID:' + data; + this.$broadcast('wifiSSID', data); + }.bind(this)) }, - get_ssid : function() { - console.debug('get_ssid>', this.wifiSSID); - return this.wifiSSID; + get_ip_address: function () { + console.debug('get_ip>', this.ipAddress); + return this.ipAddress; }, - -// get_disk_space : function() { -// console.debug('get_disk>', this.diskSpace); -// return this.diskSpace; -// }, - - shutdown : function() { + + get_ssid: function () { + console.debug('get_ssid>', this.wifiSSID); + return this.wifiSSID; + }, + + shutdown: function () { this.confirmShutdown = false; api.put('shutdown'); - + }, - - reboot : function() { - this.confirmShutdown = false; - api.put('reboot'); + + reboot: function () { + this.confirmShutdown = false; + api.put('reboot'); }, connect: function () { @@ -456,7 +432,6 @@ module.exports = new Vue({ }; }, - parse_hash: function () { var hash = location.hash.substr(1); @@ -472,7 +447,6 @@ module.exports = new Vue({ this.currentView = parts[0]; }, - save: function () { api.put('config/save', this.config).done(function (data) { this.modified = false; @@ -481,7 +455,6 @@ module.exports = new Vue({ }); }, - close_messages: function (action) { if (action == 'stop') api.put('stop'); if (action == 'continue') api.put('unpause'); diff --git a/src/pug/index.pug b/src/pug/index.pug index 239c1d6..8d0e389 100644 --- a/src/pug/index.pug +++ b/src/pug/index.pug @@ -160,11 +160,6 @@ html(lang="en") | Are you sure you want to upgrade the firmware to version | {{latestVersion}}? - p.pure-control-group - label(for="pass") Password - input(name="pass", v-model="password", type="password", - @keyup.enter="upgrade_confirmed") - div(slot="footer") button.pure-button(@click="confirmUpgrade=false") Cancel button.pure-button.pure-button-primary(@click="upgrade_confirmed") @@ -175,11 +170,6 @@ html(lang="en") div(slot="body") p Are you sure you want to upload firmware #[em {{firmwareName}}]? - p.pure-control-group - label(for="pass") Password - input(name="pass", v-model="password", type="password", - @keyup.enter="upload_confirmed") - div(slot="footer") button.pure-button(@click="confirmUpload=false") Cancel button.pure-button.pure-button-primary(@click="upload_confirmed") @@ -189,7 +179,7 @@ html(lang="en") h3(slot="header") Firmware upgrading div(slot="body") h3 Please wait... - p Loss of power during an upgrade may damage the controller. + p This process should take less than 5 minutes. If it takes longer than this, please restart the controller and try via USB. div(slot="footer") message(v-if="popupMessages.length", :show="true") diff --git a/src/py/bbctrl/Web.py b/src/py/bbctrl/Web.py index 0b05e71..d5a1290 100644 --- a/src/py/bbctrl/Web.py +++ b/src/py/bbctrl/Web.py @@ -26,18 +26,14 @@ ################################################################################ import os -import sys import json import tornado import sockjs.tornado import datetime -import shutil -import tarfile import subprocess import socket -import time from tornado.web import HTTPError -from tornado import web, gen +from tornado import gen import bbctrl @@ -257,14 +253,9 @@ class FirmwareUpdateHandler(bbctrl.APIHandler): def put_ok(self): - if not 'password' in self.request.arguments: - raise HTTPError(401, 'Missing "password"') - if not 'firmware' in self.request.files: raise HTTPError(401, 'Missing "firmware"') - check_password(self.request.arguments['password'][0]) - firmware = self.request.files['firmware'][0] if not os.path.exists('firmware'): os.mkdir('firmware') @@ -278,7 +269,6 @@ class FirmwareUpdateHandler(bbctrl.APIHandler): class UpgradeHandler(bbctrl.APIHandler): def put_ok(self): - check_password(self.json['password']) self.get_ctrl().lcd.goodbye('Upgrading firmware') subprocess.Popen(['/usr/local/bin/upgrade-bbctrl']) diff --git a/src/resources/onefinity_defaults.json b/src/resources/onefinity_defaults.json new file mode 100644 index 0000000..76883f3 --- /dev/null +++ b/src/resources/onefinity_defaults.json @@ -0,0 +1,326 @@ +{ + "tool": { + "tool-reversed": false, + "tool-enable-mode": "disabled", + "tool-direction-mode": "disabled", + "tool-type": "PWM Spindle", + "min-spin": 0, + "max-spin": 255 + }, + "switches": { + "switch-lockout": 250, + "estop": "disabled", + "switch-debounce": 5, + "probe": "normally-open" + }, + "probe": { + "probe-diameter": 6.35, + "probe-ydim": 53.975, + "probe-slow-seek": 25, + "probe-fast-seek": 75, + "probe-zdim": 15.4, + "probe-xdim": 53.975 + }, + "version": "1.0.9", + "outputs": { + "load-1": "disabled", + "fault": "disabled", + "load-2": "disabled" + }, + "settings": { + "junction-accel": 200000, + "max-deviation": 0.05, + "units": "METRIC", + "probing-prompts": true + }, + "motors": [ + { + "latch-velocity": 0.1, + "max-accel": 750, + "max-velocity": 10, + "search-velocity": 1.688, + "travel-per-rev": 10, + "idle-current": 1, + "drive-current": 2.8, + "latch-backoff": 5, + "enabled": true, + "homing-mode": "stall-min", + "reverse": false, + "stall-microstep": 8, + "min-soft-limit": 0, + "max-switch": "disabled", + "step-angle": 1.8, + "stall-current": 1, + "stall-sample-time": 200, + "microsteps": 16, + "stall-volts": 2, + "axis": "X", + "min-switch": "disabled", + "max-jerk": 1000, + "max-soft-limit": 0, + "zero-backoff": 1.5 + }, + { + "latch-velocity": 0.1, + "max-accel": 750, + "max-velocity": 10, + "search-velocity": 1.688, + "travel-per-rev": 10, + "idle-current": 1, + "drive-current": 2.8, + "latch-backoff": 5, + "enabled": true, + "homing-mode": "stall-min", + "reverse": false, + "stall-microstep": 8, + "min-soft-limit": 0, + "max-switch": "disabled", + "step-angle": 1.8, + "stall-current": 1, + "stall-sample-time": 200, + "microsteps": 16, + "stall-volts": 2, + "axis": "Y", + "min-switch": "disabled", + "max-jerk": 1000, + "max-soft-limit": 0, + "zero-backoff": 1.5 + }, + { + "latch-velocity": 0.1, + "max-accel": 750, + "max-velocity": 10, + "search-velocity": 1.688, + "travel-per-rev": 10, + "idle-current": 1, + "drive-current": 2.8, + "latch-backoff": 5, + "enabled": true, + "homing-mode": "stall-min", + "reverse": false, + "stall-microstep": 8, + "min-soft-limit": 0, + "max-switch": "disabled", + "step-angle": 1.8, + "stall-current": 1, + "stall-sample-time": 200, + "microsteps": 16, + "stall-volts": 2, + "axis": "Y", + "min-switch": "disabled", + "max-jerk": 1000, + "max-soft-limit": 0, + "zero-backoff": 1.5 + }, + { + "latch-velocity": 0.1, + "max-accel": 750, + "max-velocity": 3, + "search-velocity": 0.675, + "travel-per-rev": 4, + "idle-current": 1, + "drive-current": 2.8, + "latch-backoff": 5, + "enabled": true, + "homing-mode": "stall-max", + "reverse": true, + "stall-microstep": 8, + "min-soft-limit": -133, + "max-switch": "disabled", + "step-angle": 1.8, + "stall-current": 1, + "stall-sample-time": 200, + "microsteps": 16, + "stall-volts": 2, + "axis": "Z", + "min-switch": "disabled", + "max-jerk": 1000, + "max-soft-limit": 0, + "zero-backoff": 1 + } + ], + "modbus-spindle": { + "baud": "9600", + "multi-write": false, + "regs": [ + { + "reg-type": "disabled", + "reg-value": 0, + "reg-addr": 0 + }, + { + "reg-type": "disabled", + "reg-value": 0, + "reg-addr": 0 + }, + { + "reg-type": "disabled", + "reg-value": 0, + "reg-addr": 0 + }, + { + "reg-type": "disabled", + "reg-value": 0, + "reg-addr": 0 + }, + { + "reg-type": "disabled", + "reg-value": 0, + "reg-addr": 0 + }, + { + "reg-type": "disabled", + "reg-value": 0, + "reg-addr": 0 + }, + { + "reg-type": "disabled", + "reg-value": 0, + "reg-addr": 0 + }, + { + "reg-type": "disabled", + "reg-value": 0, + "reg-addr": 0 + }, + { + "reg-type": "disabled", + "reg-value": 0, + "reg-addr": 0 + }, + { + "reg-type": "disabled", + "reg-value": 0, + "reg-addr": 0 + }, + { + "reg-type": "disabled", + "reg-value": 0, + "reg-addr": 0 + }, + { + "reg-type": "disabled", + "reg-value": 0, + "reg-addr": 0 + }, + { + "reg-type": "disabled", + "reg-value": 0, + "reg-addr": 0 + }, + { + "reg-type": "disabled", + "reg-value": 0, + "reg-addr": 0 + }, + { + "reg-type": "disabled", + "reg-value": 0, + "reg-addr": 0 + }, + { + "reg-type": "disabled", + "reg-value": 0, + "reg-addr": 0 + }, + { + "reg-type": "disabled", + "reg-value": 0, + "reg-addr": 0 + }, + { + "reg-type": "disabled", + "reg-value": 0, + "reg-addr": 0 + }, + { + "reg-type": "disabled", + "reg-value": 0, + "reg-addr": 0 + }, + { + "reg-type": "disabled", + "reg-value": 0, + "reg-addr": 0 + }, + { + "reg-type": "disabled", + "reg-value": 0, + "reg-addr": 0 + }, + { + "reg-type": "disabled", + "reg-value": 0, + "reg-addr": 0 + }, + { + "reg-type": "disabled", + "reg-value": 0, + "reg-addr": 0 + }, + { + "reg-type": "disabled", + "reg-value": 0, + "reg-addr": 0 + }, + { + "reg-type": "disabled", + "reg-value": 0, + "reg-addr": 0 + }, + { + "reg-type": "disabled", + "reg-value": 0, + "reg-addr": 0 + }, + { + "reg-type": "disabled", + "reg-value": 0, + "reg-addr": 0 + }, + { + "reg-type": "disabled", + "reg-value": 0, + "reg-addr": 0 + }, + { + "reg-type": "disabled", + "reg-value": 0, + "reg-addr": 0 + }, + { + "reg-type": "disabled", + "reg-value": 0, + "reg-addr": 0 + }, + { + "reg-type": "disabled", + "reg-value": 0, + "reg-addr": 0 + }, + { + "reg-type": "disabled", + "reg-value": 0, + "reg-addr": 0 + } + ], + "bus-id": "1", + "parity": "None" + }, + "pwm-spindle": { + "pwm-min-duty": 1, + "pwm-inverted": false, + "pwm-max-duty": 99.99, + "pwm-freq": 1000, + "dynamic-power": true, + "rapid-auto-off": true + }, + "admin": { + "auto-check-upgrade": true + }, + "gcode": { + "program-start": "(Runs at program start)\nG90 (Absolute distance mode)\nG17 (Select XY plane)\n", + "tool-change": "(Runs on M6, tool change)\nM70\nG21\nS0\nM0 M6 (MSG, Change tool and attach probe)\nF100\n(probe to minimum z soft limit, which is -10)\nG38.2 Z-10\nG92 Z15.4\ng0 Z30\nM0 (MSG, Remove probe, start spindle)\nM72\n\n", + "program-end": "(Runs on M2, program end)\nM2" + } +} diff --git a/src/resources/onefinity_journeyman_x50_defaults.json b/src/resources/onefinity_journeyman_x50_defaults.json index aa0512c..e573301 100644 --- a/src/resources/onefinity_journeyman_x50_defaults.json +++ b/src/resources/onefinity_journeyman_x50_defaults.json @@ -1,325 +1,14 @@ { - "tool": { - "tool-reversed": false, - "tool-enable-mode": "disabled", - "tool-direction-mode": "disabled", - "tool-type": "PWM Spindle", - "min-spin": 0, - "max-spin": 255 - }, - "switches": { - "switch-lockout": 250, - "estop": "disabled", - "switch-debounce": 5, - "probe": "normally-open" - }, - "probe": { - "probe-ydim": 53.975, - "probe-slow-seek": 25, - "probe-fast-seek": 75, - "probe-zdim": 15.4, - "probe-xdim": 53.975 - }, - "version": "1.0.4", - "outputs": { - "load-1": "disabled", - "fault": "disabled", - "load-2": "disabled" - }, - "settings": { - "junction-accel": 200000, - "max-deviation": 0.05, - "units": "METRIC", - "probing-prompts": true - }, "motors": [ { - "latch-velocity": 0.1, - "max-accel": 750, - "max-velocity": 10, - "search-velocity": 1.688, "travel-per-rev": 16, - "idle-current": 1, - "drive-current": 2.8, - "latch-backoff": 5, - "enabled": true, - "homing-mode": "stall-min", - "reverse": false, - "stall-microstep": 8, - "min-soft-limit": 0, - "max-switch": "disabled", - "step-angle": 1.8, - "stall-current": 1, - "stall-sample-time": 200, - "microsteps": 16, - "stall-volts": 2, - "axis": "X", - "min-switch": "disabled", - "max-jerk": 1000, - "max-soft-limit": 1220, - "zero-backoff": 1.5 + "max-soft-limit": 1220 }, { - "latch-velocity": 0.1, - "max-accel": 750, - "max-velocity": 10, - "search-velocity": 1.688, - "travel-per-rev": 10, - "idle-current": 1, - "drive-current": 2.8, - "latch-backoff": 5, - "enabled": true, - "homing-mode": "stall-min", - "reverse": false, - "stall-microstep": 8, - "min-soft-limit": 0, - "max-switch": "disabled", - "step-angle": 1.8, - "stall-current": 1, - "stall-sample-time": 200, - "microsteps": 16, - "stall-volts": 2, - "axis": "Y", - "min-switch": "disabled", - "max-jerk": 1000, - "max-soft-limit": 816, - "zero-backoff": 1.5 + "max-soft-limit": 816 }, { - "latch-velocity": 0.1, - "max-accel": 750, - "max-velocity": 10, - "search-velocity": 1.688, - "travel-per-rev": 10, - "idle-current": 1, - "drive-current": 2.8, - "latch-backoff": 5, - "enabled": true, - "homing-mode": "stall-min", - "reverse": false, - "stall-microstep": 8, - "min-soft-limit": 0, - "max-switch": "disabled", - "step-angle": 1.8, - "stall-current": 1, - "stall-sample-time": 200, - "microsteps": 16, - "stall-volts": 2, - "axis": "Y", - "min-switch": "disabled", - "max-jerk": 1000, - "max-soft-limit": 816, - "zero-backoff": 1.5 - }, - { - "latch-velocity": 0.1, - "max-accel": 750, - "max-velocity": 3, - "search-velocity": 0.675, - "travel-per-rev": 4, - "idle-current": 1, - "drive-current": 2.8, - "latch-backoff": 5, - "enabled": true, - "homing-mode": "stall-max", - "reverse": true, - "stall-microstep": 8, - "min-soft-limit": -133, - "max-switch": "disabled", - "step-angle": 1.8, - "stall-current": 1, - "stall-sample-time": 200, - "microsteps": 16, - "stall-volts": 2, - "axis": "Z", - "min-switch": "disabled", - "max-jerk": 1000, - "max-soft-limit": 0, - "zero-backoff": 1 + "max-soft-limit": 816 } - ], - "modbus-spindle": { - "baud": "9600", - "multi-write": false, - "regs": [ - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - } - ], - "bus-id": "1", - "parity": "None" - }, - "pwm-spindle": { - "pwm-min-duty": 1, - "pwm-inverted": false, - "pwm-max-duty": 99.99, - "pwm-freq": 1000, - "dynamic-power": true, - "rapid-auto-off": true - }, - "admin": { - "auto-check-upgrade": true - }, - "gcode": { - "program-start": "(Runs at program start)\nG90 (Absolute distance mode)\nG17 (Select XY plane)\n", - "tool-change": "(Runs on M6, tool change)\nM70\nG21\nS0\nM0 M6 (MSG, Change tool and attach probe)\nF100\n(probe to minimum z soft limit, which is -10)\nG38.2 Z-10\nG92 Z15.4\ng0 Z30\nM0 (MSG, Remove probe, start spindle)\nM72\n\n", - "program-end": "(Runs on M2, program end)\nM2" - } + ] } diff --git a/src/resources/onefinity_machinist_x35_defaults.json b/src/resources/onefinity_machinist_x35_defaults.json index 7542227..87ffeeb 100644 --- a/src/resources/onefinity_machinist_x35_defaults.json +++ b/src/resources/onefinity_machinist_x35_defaults.json @@ -1,325 +1,13 @@ { - "tool": { - "tool-reversed": false, - "tool-enable-mode": "disabled", - "tool-direction-mode": "disabled", - "tool-type": "PWM Spindle", - "min-spin": 0, - "max-spin": 255 - }, - "switches": { - "switch-lockout": 250, - "estop": "disabled", - "switch-debounce": 5, - "probe": "normally-open" - }, - "probe": { - "probe-ydim": 53.975, - "probe-slow-seek": 25, - "probe-fast-seek": 75, - "probe-zdim": 15.4, - "probe-xdim": 53.975 - }, - "version": "1.0.4", - "outputs": { - "load-1": "disabled", - "fault": "disabled", - "load-2": "disabled" - }, - "settings": { - "junction-accel": 200000, - "max-deviation": 0.05, - "units": "METRIC", - "probing-prompts": true - }, "motors": [ { - "latch-velocity": 0.1, - "max-accel": 750, - "max-velocity": 10, - "search-velocity": 1.688, - "travel-per-rev": 10, - "idle-current": 1, - "drive-current": 2.8, - "latch-backoff": 5, - "enabled": true, - "homing-mode": "stall-min", - "reverse": false, - "stall-microstep": 8, - "min-soft-limit": 0, - "max-switch": "disabled", - "step-angle": 1.8, - "stall-current": 1, - "stall-sample-time": 200, - "microsteps": 16, - "stall-volts": 2, - "axis": "X", - "min-switch": "disabled", - "max-jerk": 1000, - "max-soft-limit": 410, - "zero-backoff": 1.5 + "max-soft-limit": 410 }, { - "latch-velocity": 0.1, - "max-accel": 750, - "max-velocity": 10, - "search-velocity": 1.688, - "travel-per-rev": 10, - "idle-current": 1, - "drive-current": 2.8, - "latch-backoff": 5, - "enabled": true, - "homing-mode": "stall-min", - "reverse": false, - "stall-microstep": 8, - "min-soft-limit": 0, - "max-switch": "disabled", - "step-angle": 1.8, - "stall-current": 1, - "stall-sample-time": 200, - "microsteps": 16, - "stall-volts": 2, - "axis": "Y", - "min-switch": "disabled", - "max-jerk": 1000, - "max-soft-limit": 410, - "zero-backoff": 1.5 + "max-soft-limit": 410 }, { - "latch-velocity": 0.1, - "max-accel": 750, - "max-velocity": 10, - "search-velocity": 1.688, - "travel-per-rev": 10, - "idle-current": 1, - "drive-current": 2.8, - "latch-backoff": 5, - "enabled": true, - "homing-mode": "stall-min", - "reverse": false, - "stall-microstep": 8, - "min-soft-limit": 0, - "max-switch": "disabled", - "step-angle": 1.8, - "stall-current": 1, - "stall-sample-time": 200, - "microsteps": 16, - "stall-volts": 2, - "axis": "Y", - "min-switch": "disabled", - "max-jerk": 1000, - "max-soft-limit": 410, - "zero-backoff": 1.5 - }, - { - "latch-velocity": 0.1, - "max-accel": 750, - "max-velocity": 3, - "search-velocity": 0.675, - "travel-per-rev": 4, - "idle-current": 1, - "drive-current": 2.8, - "latch-backoff": 5, - "enabled": true, - "homing-mode": "stall-max", - "reverse": true, - "stall-microstep": 8, - "min-soft-limit": -133, - "max-switch": "disabled", - "step-angle": 1.8, - "stall-current": 1, - "stall-sample-time": 200, - "microsteps": 16, - "stall-volts": 2, - "axis": "Z", - "min-switch": "disabled", - "max-jerk": 1000, - "max-soft-limit": 0, - "zero-backoff": 1 + "max-soft-limit": 410 } - ], - "modbus-spindle": { - "baud": "9600", - "multi-write": false, - "regs": [ - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - } - ], - "bus-id": "1", - "parity": "None" - }, - "pwm-spindle": { - "pwm-min-duty": 1, - "pwm-inverted": false, - "pwm-max-duty": 99.99, - "pwm-freq": 1000, - "dynamic-power": true, - "rapid-auto-off": true - }, - "admin": { - "auto-check-upgrade": true - }, - "gcode": { - "program-start": "(Runs at program start)\nG90 (Absolute distance mode)\nG17 (Select XY plane)\n", - "tool-change": "(Runs on M6, tool change)\nM70\nG21\nS0\nM0 M6 (MSG, Change tool and attach probe)\nF100\n(probe to minimum z soft limit, which is -10)\nG38.2 Z-10\nG92 Z15.4\ng0 Z30\nM0 (MSG, Remove probe, start spindle)\nM72\n\n", - "program-end": "(Runs on M2, program end)\nM2" - } + ] } diff --git a/src/resources/onefinity_woodworker_x35_defaults.json b/src/resources/onefinity_woodworker_x35_defaults.json index bca8fc7..655e054 100644 --- a/src/resources/onefinity_woodworker_x35_defaults.json +++ b/src/resources/onefinity_woodworker_x35_defaults.json @@ -1,325 +1,13 @@ { - "tool": { - "tool-reversed": false, - "tool-enable-mode": "disabled", - "tool-direction-mode": "disabled", - "tool-type": "PWM Spindle", - "min-spin": 0, - "max-spin": 255 - }, - "switches": { - "switch-lockout": 250, - "estop": "disabled", - "switch-debounce": 5, - "probe": "normally-open" - }, - "probe": { - "probe-ydim": 53.975, - "probe-slow-seek": 25, - "probe-fast-seek": 75, - "probe-zdim": 15.4, - "probe-xdim": 53.975 - }, - "version": "1.0.4", - "outputs": { - "load-1": "disabled", - "fault": "disabled", - "load-2": "disabled" - }, - "settings": { - "junction-accel": 200000, - "max-deviation": 0.05, - "units": "METRIC", - "probing-prompts": true - }, "motors": [ { - "latch-velocity": 0.1, - "max-accel": 750, - "max-velocity": 10, - "search-velocity": 1.688, - "travel-per-rev": 10, - "idle-current": 1, - "drive-current": 2.8, - "latch-backoff": 5, - "enabled": true, - "homing-mode": "stall-min", - "reverse": false, - "stall-microstep": 8, - "min-soft-limit": 0, - "max-switch": "disabled", - "step-angle": 1.8, - "stall-current": 1, - "stall-sample-time": 200, - "microsteps": 16, - "stall-volts": 2, - "axis": "X", - "min-switch": "disabled", - "max-jerk": 1000, - "max-soft-limit": 816, - "zero-backoff": 1.5 + "max-soft-limit": 816 }, { - "latch-velocity": 0.1, - "max-accel": 750, - "max-velocity": 10, - "search-velocity": 1.688, - "travel-per-rev": 10, - "idle-current": 1, - "drive-current": 2.8, - "latch-backoff": 5, - "enabled": true, - "homing-mode": "stall-min", - "reverse": false, - "stall-microstep": 8, - "min-soft-limit": 0, - "max-switch": "disabled", - "step-angle": 1.8, - "stall-current": 1, - "stall-sample-time": 200, - "microsteps": 16, - "stall-volts": 2, - "axis": "Y", - "min-switch": "disabled", - "max-jerk": 1000, - "max-soft-limit": 816, - "zero-backoff": 1.5 + "max-soft-limit": 816 }, { - "latch-velocity": 0.1, - "max-accel": 750, - "max-velocity": 10, - "search-velocity": 1.688, - "travel-per-rev": 10, - "idle-current": 1, - "drive-current": 2.8, - "latch-backoff": 5, - "enabled": true, - "homing-mode": "stall-min", - "reverse": false, - "stall-microstep": 8, - "min-soft-limit": 0, - "max-switch": "disabled", - "step-angle": 1.8, - "stall-current": 1, - "stall-sample-time": 200, - "microsteps": 16, - "stall-volts": 2, - "axis": "Y", - "min-switch": "disabled", - "max-jerk": 1000, - "max-soft-limit": 816, - "zero-backoff": 1.5 - }, - { - "latch-velocity": 0.1, - "max-accel": 750, - "max-velocity": 3, - "search-velocity": 0.675, - "travel-per-rev": 4, - "idle-current": 1, - "drive-current": 2.8, - "latch-backoff": 5, - "enabled": true, - "homing-mode": "stall-max", - "reverse": true, - "stall-microstep": 8, - "min-soft-limit": -133, - "max-switch": "disabled", - "step-angle": 1.8, - "stall-current": 1, - "stall-sample-time": 200, - "microsteps": 16, - "stall-volts": 2, - "axis": "Z", - "min-switch": "disabled", - "max-jerk": 1000, - "max-soft-limit": 0, - "zero-backoff": 1 + "max-soft-limit": 816 } - ], - "modbus-spindle": { - "baud": "9600", - "multi-write": false, - "regs": [ - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - } - ], - "bus-id": "1", - "parity": "None" - }, - "pwm-spindle": { - "pwm-min-duty": 1, - "pwm-inverted": false, - "pwm-max-duty": 99.99, - "pwm-freq": 1000, - "dynamic-power": true, - "rapid-auto-off": true - }, - "admin": { - "auto-check-upgrade": true - }, - "gcode": { - "program-start": "(Runs at program start)\nG90 (Absolute distance mode)\nG17 (Select XY plane)\n", - "tool-change": "(Runs on M6, tool change)\nM70\nG21\nS0\nM0 M6 (MSG, Change tool and attach probe)\nF100\n(probe to minimum z soft limit, which is -10)\nG38.2 Z-10\nG92 Z15.4\ng0 Z30\nM0 (MSG, Remove probe, start spindle)\nM72\n\n", - "program-end": "(Runs on M2, program end)\nM2" - } + ] } diff --git a/src/resources/onefinity_woodworker_x50_defaults.json b/src/resources/onefinity_woodworker_x50_defaults.json index 6ddeb1a..99d70a9 100644 --- a/src/resources/onefinity_woodworker_x50_defaults.json +++ b/src/resources/onefinity_woodworker_x50_defaults.json @@ -1,325 +1,14 @@ { - "tool": { - "tool-reversed": false, - "tool-enable-mode": "disabled", - "tool-direction-mode": "disabled", - "tool-type": "PWM Spindle", - "min-spin": 0, - "max-spin": 255 - }, - "switches": { - "switch-lockout": 250, - "estop": "disabled", - "switch-debounce": 5, - "probe": "normally-open" - }, - "probe": { - "probe-ydim": 53.975, - "probe-slow-seek": 25, - "probe-fast-seek": 75, - "probe-zdim": 15.4, - "probe-xdim": 53.975 - }, - "version": "1.0.4", - "outputs": { - "load-1": "disabled", - "fault": "disabled", - "load-2": "disabled" - }, - "settings": { - "junction-accel": 200000, - "max-deviation": 0.05, - "units": "METRIC", - "probing-prompts": true - }, "motors": [ { - "latch-velocity": 0.1, - "max-accel": 750, - "max-velocity": 10, - "search-velocity": 1.688, "travel-per-rev": 16, - "idle-current": 1, - "drive-current": 2.8, - "latch-backoff": 5, - "enabled": true, - "homing-mode": "stall-min", - "reverse": false, - "stall-microstep": 8, - "min-soft-limit": 0, - "max-switch": "disabled", - "step-angle": 1.8, - "stall-current": 1, - "stall-sample-time": 200, - "microsteps": 16, - "stall-volts": 2, - "axis": "X", - "min-switch": "disabled", - "max-jerk": 1000, - "max-soft-limit": 816, - "zero-backoff": 1.5 + "max-soft-limit": 816 }, { - "latch-velocity": 0.1, - "max-accel": 750, - "max-velocity": 10, - "search-velocity": 1.688, - "travel-per-rev": 10, - "idle-current": 1, - "drive-current": 2.8, - "latch-backoff": 5, - "enabled": true, - "homing-mode": "stall-min", - "reverse": false, - "stall-microstep": 8, - "min-soft-limit": 0, - "max-switch": "disabled", - "step-angle": 1.8, - "stall-current": 1, - "stall-sample-time": 200, - "microsteps": 16, - "stall-volts": 2, - "axis": "Y", - "min-switch": "disabled", - "max-jerk": 1000, - "max-soft-limit": 816, - "zero-backoff": 1.5 + "max-soft-limit": 816 }, { - "latch-velocity": 0.1, - "max-accel": 750, - "max-velocity": 10, - "search-velocity": 1.688, - "travel-per-rev": 10, - "idle-current": 1, - "drive-current": 2.8, - "latch-backoff": 5, - "enabled": true, - "homing-mode": "stall-min", - "reverse": false, - "stall-microstep": 8, - "min-soft-limit": 0, - "max-switch": "disabled", - "step-angle": 1.8, - "stall-current": 1, - "stall-sample-time": 200, - "microsteps": 16, - "stall-volts": 2, - "axis": "Y", - "min-switch": "disabled", - "max-jerk": 1000, - "max-soft-limit": 816, - "zero-backoff": 1.5 - }, - { - "latch-velocity": 0.1, - "max-accel": 750, - "max-velocity": 3, - "search-velocity": 0.675, - "travel-per-rev": 4, - "idle-current": 1, - "drive-current": 2.8, - "latch-backoff": 5, - "enabled": true, - "homing-mode": "stall-max", - "reverse": true, - "stall-microstep": 8, - "min-soft-limit": -133, - "max-switch": "disabled", - "step-angle": 1.8, - "stall-current": 1, - "stall-sample-time": 200, - "microsteps": 16, - "stall-volts": 2, - "axis": "Z", - "min-switch": "disabled", - "max-jerk": 1000, - "max-soft-limit": 0, - "zero-backoff": 1 + "max-soft-limit": 816 } - ], - "modbus-spindle": { - "baud": "9600", - "multi-write": false, - "regs": [ - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - }, - { - "reg-type": "disabled", - "reg-value": 0, - "reg-addr": 0 - } - ], - "bus-id": "1", - "parity": "None" - }, - "pwm-spindle": { - "pwm-min-duty": 1, - "pwm-inverted": false, - "pwm-max-duty": 99.99, - "pwm-freq": 1000, - "dynamic-power": true, - "rapid-auto-off": true - }, - "admin": { - "auto-check-upgrade": true - }, - "gcode": { - "program-start": "(Runs at program start)\nG90 (Absolute distance mode)\nG17 (Select XY plane)\n", - "tool-change": "(Runs on M6, tool change)\nM70\nG21\nS0\nM0 M6 (MSG, Change tool and attach probe)\nF100\n(probe to minimum z soft limit, which is -10)\nG38.2 Z-10\nG92 Z15.4\ng0 Z30\nM0 (MSG, Remove probe, start spindle)\nM72\n\n", - "program-end": "(Runs on M2, program end)\nM2" - } + ] } diff --git a/src/stylus/style.styl b/src/stylus/style.styl index 31808b7..7acd5e1 100644 --- a/src/stylus/style.styl +++ b/src/stylus/style.styl @@ -995,12 +995,12 @@ tt.save width 98% .reset-variants - padding-left 40px - padding-bottom 20px - display grid - grid-template-rows repeat(4, auto) - grid-template-columns min-content auto - grid-gap 20px 10px + padding-left 40px + padding-bottom 20px + display grid + grid-template-rows repeat(4, auto) + grid-template-columns min-content auto + grid-gap 20px 10px input[type="radio"] width 30px