diff --git a/src/js/control-view.js b/src/js/control-view.js index ad893a0..d69b793 100644 --- a/src/js/control-view.js +++ b/src/js/control-view.js @@ -264,6 +264,11 @@ module.exports = { }, start_probe_test: function(on_finish) { + if (!this.config.settings['probing-prompts']) { + on_finish(); + return; + } + this.show_probe_test_modal = true; Vue.set(this.state, "saw_probe_connected", false); Vue.set(this.state, "on_probe_finish", on_finish); @@ -413,7 +418,9 @@ module.exports = { M2 `); - setTimeout(() => Vue.set(this.state, "wait_for_probing_complete", true), 1000); + if (this.config.settings['probing-prompts']) { + setTimeout(() => Vue.set(this.state, "wait_for_probing_complete", true), 1000); + } }, probe_z() { @@ -443,7 +450,9 @@ module.exports = { M2 `); - setTimeout(() => Vue.set(this.state, "wait_for_probing_complete", true), 1000); + if (this.config.settings['probing-prompts']) { + setTimeout(() => Vue.set(this.state, "wait_for_probing_complete", true), 1000); + } }, jog_fn: function (x_jog,y_jog,z_jog,a_jog) { diff --git a/src/pug/templates/settings-view.pug b/src/pug/templates/settings-view.pug index bd596c7..058e043 100644 --- a/src/pug/templates/settings-view.pug +++ b/src/pug/templates/settings-view.pug @@ -35,6 +35,12 @@ script#settings-view-template(type="text/x-template") | units used in motor configuration. GCode #[tt program-start], | set below, may also change the default machine units. + fieldset + h2 Probing safety prompts + templated-input(name="probing-prompts", + :model.sync="config.settings['probing-prompts']", + :template="template.settings['probing-prompts']") + fieldset h2 Probe Dimensions templated-input(v-for="templ in template.probe", :name="$key", diff --git a/src/py/bbctrl/Config.py b/src/py/bbctrl/Config.py index a8dd66e..bdded41 100644 --- a/src/py/bbctrl/Config.py +++ b/src/py/bbctrl/Config.py @@ -144,6 +144,7 @@ class Config(object): if version < (1, 0, 7): config['settings']['max-deviation'] = 0.001 config['settings']['junction-accel'] = 200000 + config['settings']['probing-prompts'] = True config['probe']['probe-fast-seek'] = 75 config['probe']['probe-slow-seek'] = 25 for motor in config['motors']: diff --git a/src/resources/config-template.json b/src/resources/config-template.json index cdc4d5f..98e5c56 100644 --- a/src/resources/config-template.json +++ b/src/resources/config-template.json @@ -22,6 +22,11 @@ "max": 100000000, "unit": "mm/min²", "default": 200000 + }, + "probing-prompts": { + "help": "Enable or disable safety prompts during and after probing", + "type": "bool", + "default": true } }, "motors": { diff --git a/src/resources/onefinity_machinist_defaults.json b/src/resources/onefinity_machinist_defaults.json index 1fc9a26..d6577e3 100644 --- a/src/resources/onefinity_machinist_defaults.json +++ b/src/resources/onefinity_machinist_defaults.json @@ -29,7 +29,8 @@ "settings": { "junction-accel": 200000, "max-deviation": 0.001, - "units": "METRIC" + "units": "METRIC", + "probing-prompts": true }, "motors": [ { diff --git a/src/resources/onefinity_woodworker_defaults.json b/src/resources/onefinity_woodworker_defaults.json index c6de435..ccfe8bc 100644 --- a/src/resources/onefinity_woodworker_defaults.json +++ b/src/resources/onefinity_woodworker_defaults.json @@ -29,7 +29,8 @@ "settings": { "junction-accel": 200000, "max-deviation": 0.001, - "units": "METRIC" + "units": "METRIC", + "probing-prompts": true }, "motors": [ {