diff --git a/src/resources/config-template.json b/src/resources/config-template.json
index 6661cf5..99cbd15 100644
--- a/src/resources/config-template.json
+++ b/src/resources/config-template.json
@@ -24,6 +24,11 @@
"unit": "mm/min²",
"default": 200000
},
+ "probing-prompts": {
+ "help": "Enable or disable safety prompts during and after probing",
+ "type": "bool",
+ "default": true
+ },
"gamepad-default-type": {
"help": "When a gamepad is not recognized, treat it as the selected type of gamepad.",
"type": "enum",
diff --git a/src/svelte-components/src/components/ConfigTemplatedInput.svelte b/src/svelte-components/src/components/ConfigTemplatedInput.svelte
index 78957cb..49b1a60 100644
--- a/src/svelte-components/src/components/ConfigTemplatedInput.svelte
+++ b/src/svelte-components/src/components/ConfigTemplatedInput.svelte
@@ -22,6 +22,21 @@
scale?: number;
};
+ const namesByKey = {
+ "gamepad-default-type": "Default type",
+ "probing-prompts": "Show safety prompts",
+ "probe-xdim": "Probe block width",
+ "probe-ydim": "Probe block length",
+ "probe-zdim": "Probe block height",
+ "probe-fast-seek": "Fast seek speed",
+ "probe-slow-seek": "Slow seek speed",
+ "program-start": "On program start",
+ "tool-change": "On tool change",
+ "program-end": "On program end",
+ "max-deviation": "Maximum deviation",
+ "junction-accel": "Junction acceleration",
+ };
+
export let key: string;
let keyParts: string[];
let template: Template;
@@ -33,7 +48,7 @@
onMount(() => {
keyParts = (key || "").split(".");
template = getTemplate();
- name = keyParts[keyParts.length - 1];
+ name = namesByKey[keyParts.at(-1)] || keyParts.at(-1);
title = getTitle();
value = getValue();
});
@@ -81,7 +96,7 @@
target = target[part];
}
- const value = coerceValue(event.target.value);
+ const value = getValueFromElement(event.target);
target[keyParts[keyParts.length - 1]] = value;
return config;
@@ -90,14 +105,17 @@
ControllerMethods.dispatch("config-changed");
}
- function coerceValue(value) {
+ function getValueFromElement(element) {
switch (template.type) {
case "float":
case "int":
- return Number(value);
+ return Number(element.value);
+
+ case "bool":
+ return element.checked;
default:
- return value;
+ return element.value;
}
}
@@ -138,7 +156,12 @@
{/each}
{:else if template.type === "bool"}
-
+
{:else if template.type === "float"}
+
+ Attach the probe magnet to the collet, then touch the probe + block to the bit. +
+ {#if probeType === "xyz"} + Place the probe block face up, on the lower-left corner + of your workpiece. + {:else} + Place the probe block face down, with the bit above the + recess. + {/if} +
Probing in progress...
Could not find the probe block during probing!
Make sure the tip of the bit is less than {metric @@ -368,7 +381,7 @@ above the probe block, and try again.
{:else} - Don't forget to put away the probe! +Don't forget to put away the probe!