Brought back "disable safety prompts" for probing
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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}
|
||||
</select>
|
||||
{:else if template.type === "bool"}
|
||||
<input {name} type="checkbox" bind:value on:input={onChange} />
|
||||
<input
|
||||
{name}
|
||||
type="checkbox"
|
||||
checked={value}
|
||||
on:change={onChange}
|
||||
/>
|
||||
{:else if template.type === "float"}
|
||||
<input
|
||||
{name}
|
||||
|
||||
@@ -14,9 +14,10 @@
|
||||
<ScreenRotationDialog bind:open={showScreenRotationDialog} />
|
||||
<SetTimeDialog bind:open={showSetTimeDialog} />
|
||||
|
||||
<h1>Settings</h1>
|
||||
<div class="settings-view">
|
||||
<h1>Settings</h1>
|
||||
|
||||
<div class="pure-form pure-form-aligned">
|
||||
<div class="pure-form pure-form-aligned">
|
||||
<h2>User Interface</h2>
|
||||
<fieldset>
|
||||
<div class="pure-control-group">
|
||||
@@ -47,16 +48,23 @@
|
||||
<h2>Gamepads / Joypads</h2>
|
||||
<fieldset>
|
||||
<ConfigTemplatedInput key={`settings.gamepad-default-type`} />
|
||||
<div class="tip">
|
||||
If your gamepad doesn't work as expected, try one of the other
|
||||
types.
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<p>
|
||||
If you have a gamepad that is not officially supported, and doesn't seem
|
||||
to be working right, try changing <tt>gamepad-default-type</tt> to one of
|
||||
the other types.
|
||||
</p>
|
||||
|
||||
<h2>Probing</h2>
|
||||
<fieldset>
|
||||
<h2>Probe Dimensions</h2>
|
||||
<ConfigTemplatedInput key={`settings.probing-prompts`} />
|
||||
<div class="tip">
|
||||
Onefinity highly recommends that you keep the safety prompts
|
||||
enabled. If you choose to live dangerously, and disable the
|
||||
safety prompts, Onefinity cannot be held responsible.
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
{#each Object.keys(configTemplate.probe) as key}
|
||||
{#if key !== "probe-diameter"}
|
||||
<ConfigTemplatedInput key={`probe.${key}`} />
|
||||
@@ -74,35 +82,48 @@
|
||||
<h2>Path Accuracy</h2>
|
||||
<fieldset>
|
||||
<ConfigTemplatedInput key={`settings.max-deviation`} />
|
||||
</fieldset>
|
||||
|
||||
<p>
|
||||
Lower <tt>max-deviation</tt> to follow the programmed path more precisely
|
||||
but at a slower speed.
|
||||
</p>
|
||||
<div class="tip">
|
||||
Lower the maximum deviation to follow the programmed path more
|
||||
precisely but at a slower speed.
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<div class="tip">
|
||||
In order to improve traversal speed, the path planner may merge
|
||||
consecutive moves or round off sharp corners if doing so would deviate
|
||||
from the program path by less than <tt>max-deviation</tt>.
|
||||
</p>
|
||||
consecutive moves or round off sharp corners if doing so would
|
||||
deviate from the program path by less than the maximum
|
||||
deviation.
|
||||
</div>
|
||||
|
||||
<p>
|
||||
<div class="tip">
|
||||
GCode commands
|
||||
<a href={`${gcodeURL}#gcode:g61`} target="_blank">G61, G61.1</a>
|
||||
and <a href={`${gcodeURL}#gcode:g64`} target="_blank"> G64</a> also affect
|
||||
path planning accuracy.
|
||||
</p>
|
||||
and <a href={`${gcodeURL}#gcode:g64`} target="_blank">G64</a> also
|
||||
affect path planning accuracy.
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<h2>Cornering Speed (Advanced)</h2>
|
||||
<fieldset>
|
||||
<ConfigTemplatedInput key={`settings.junction-accel`} />
|
||||
<div class="tip">
|
||||
Junction acceleration limits the cornering speed the planner
|
||||
will allow. Increasing this value will allow for faster
|
||||
traversal of corners but may cause the planner to violate axis
|
||||
jerk limits and stall the motors. Use with caution.
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<p>
|
||||
Junction acceleration limits the cornering speed the planner will allow.
|
||||
Increasing this value will allow for faster traversal of corners but may
|
||||
cause the planner to violate axis jerk limits and stall the motors. Use
|
||||
with caution.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
.settings-view {
|
||||
.tip {
|
||||
margin-left: 210px;
|
||||
margin-bottom: 15px;
|
||||
font-style: italic;
|
||||
font-size: 90%;
|
||||
line-height: 1.5;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -105,10 +105,14 @@
|
||||
$probingActive = true;
|
||||
assertValidProbeType();
|
||||
|
||||
$probingFailed = false;
|
||||
|
||||
const enableSafety = $Config.settings["probing-prompts"];
|
||||
|
||||
steps = [
|
||||
"CheckProbe",
|
||||
enableSafety ? "CheckProbe" : undefined,
|
||||
probeType === "xyz" ? "BitDimensions" : undefined,
|
||||
"PlaceProbeBlock",
|
||||
enableSafety ? "PlaceProbeBlock" : undefined,
|
||||
"Probe",
|
||||
"Done",
|
||||
].filter<Step>(isStep);
|
||||
@@ -163,6 +167,10 @@
|
||||
) {
|
||||
currentStep = nextStep;
|
||||
|
||||
if (!steps.includes(currentStep)) {
|
||||
return;
|
||||
}
|
||||
|
||||
clearFlags();
|
||||
updateButtons();
|
||||
|
||||
@@ -184,7 +192,6 @@
|
||||
$cancelled = false;
|
||||
$probeContacted = false;
|
||||
$probingStarted = false;
|
||||
$probingFailed = false;
|
||||
$probingComplete = false;
|
||||
$userAcknowledged = false;
|
||||
}
|
||||
@@ -310,10 +317,12 @@
|
||||
{/each}
|
||||
</ul>
|
||||
</div>
|
||||
<p style="width: 100%">
|
||||
<div style="width: 100%">
|
||||
{#if currentStep === "CheckProbe"}
|
||||
<p>
|
||||
Attach the probe magnet to the collet, then touch the probe
|
||||
block to the bit.
|
||||
</p>
|
||||
|
||||
<Icon
|
||||
data={probeType === "xyz" ? CheckXYZ : CheckZ}
|
||||
@@ -334,13 +343,15 @@
|
||||
|
||||
<Icon data={BitDiameter} size="150px" class="probe-icon-svg" />
|
||||
{:else if currentStep === "PlaceProbeBlock"}
|
||||
<p>
|
||||
{#if probeType === "xyz"}
|
||||
Place the probe block face up, on the lower-left corner of
|
||||
your workpiece.
|
||||
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}
|
||||
</p>
|
||||
|
||||
<Icon
|
||||
data={probeType === "xyz" ? PlaceXYZ : PlaceZ}
|
||||
@@ -354,12 +365,14 @@
|
||||
'Next'.
|
||||
</p>
|
||||
{:else if currentStep === "Probe"}
|
||||
Probing in progress...
|
||||
<p>Probing in progress...</p>
|
||||
|
||||
<LinearProgress indeterminate />
|
||||
{:else if currentStep === "Done"}
|
||||
{#if $probingFailed}
|
||||
Could not find the probe block during probing!
|
||||
<h3>Emergency Stop!</h3>
|
||||
|
||||
<p>Could not find the probe block during probing!</p>
|
||||
|
||||
<p>
|
||||
Make sure the tip of the bit is less than {metric
|
||||
@@ -368,7 +381,7 @@
|
||||
above the probe block, and try again.
|
||||
</p>
|
||||
{:else}
|
||||
Don't forget to put away the probe!
|
||||
<p>Don't forget to put away the probe!</p>
|
||||
|
||||
<Icon
|
||||
data={probeType === "xyz" ? PutAwayXYZ : PutAwayZ}
|
||||
@@ -384,7 +397,7 @@
|
||||
{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
</Content>
|
||||
|
||||
<Actions>
|
||||
|
||||
Reference in New Issue
Block a user