diff --git a/src/js/control-view.js b/src/js/control-view.js index 02153c0..da1e56f 100644 --- a/src/js/control-view.js +++ b/src/js/control-view.js @@ -267,6 +267,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); 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 ab557a8..7c03e0c 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 for motor in config['motors']: motor['stall-microstep'] = 8 motor['stall-current'] = 1 diff --git a/src/resources/config-template.json b/src/resources/config-template.json index a2368bc..3c3efc8 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": [ {