Changed yz origin to y origin after probing
This commit is contained in:
@@ -58,7 +58,7 @@
|
|||||||
const MoveToZeroDialogProps = writable<MoveToZeroDialogPropsType>();
|
const MoveToZeroDialogProps = writable<MoveToZeroDialogPropsType>();
|
||||||
type MoveToZeroDialogPropsType = {
|
type MoveToZeroDialogPropsType = {
|
||||||
open: boolean;
|
open: boolean;
|
||||||
axes: "xy" | "z" | "a" | "yz";
|
axes: "xy" | "y" | "z" | "a";
|
||||||
};
|
};
|
||||||
|
|
||||||
const ShutdownDialogProps = writable<ShutdownDialogPropsType>();
|
const ShutdownDialogProps = writable<ShutdownDialogPropsType>();
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
import { ControllerMethods } from "$lib/RegisterControllerMethods";
|
import { ControllerMethods } from "$lib/RegisterControllerMethods";
|
||||||
|
|
||||||
export let open;
|
export let open;
|
||||||
export let axes: "xy" | "z" | "a" | "yz";
|
export let axes: "xy" | "y" | "z" | "a";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Dialog
|
<Dialog
|
||||||
|
|||||||
@@ -171,7 +171,7 @@
|
|||||||
|
|
||||||
if (probeType === "xyz" ) {
|
if (probeType === "xyz" ) {
|
||||||
if(isRotaryActive){
|
if(isRotaryActive){
|
||||||
ControllerMethods.gotoZero("yz");
|
ControllerMethods.gotoZero("y");
|
||||||
} else {
|
} else {
|
||||||
ControllerMethods.gotoZero("xy");
|
ControllerMethods.gotoZero("xy");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ interface RegisterableControllerMethods {
|
|||||||
}
|
}
|
||||||
|
|
||||||
interface ControllerMethods extends RegisterableControllerMethods {
|
interface ControllerMethods extends RegisterableControllerMethods {
|
||||||
gotoZero: (axes: "xy" | "z" | "a" | "yz") => void;
|
gotoZero: (axes: "xy" | "y" | "z" | "a") => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export let ControllerMethods: ControllerMethods;
|
export let ControllerMethods: ControllerMethods;
|
||||||
@@ -22,12 +22,16 @@ export function registerControllerMethods(methods: Partial<RegisterableControlle
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function gotoZero(axes: "xy" | "z" | "a" | "yz") {
|
function gotoZero(axes: "xy" | "y" | "z" | "a") {
|
||||||
let axesClause = "";
|
let axesClause = "";
|
||||||
switch (axes.toLowerCase()) {
|
switch (axes.toLowerCase()) {
|
||||||
case "xy":
|
case "xy":
|
||||||
axesClause = "X0Y0";
|
axesClause = "X0Y0";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case "y":
|
||||||
|
axesClause = "Y0";
|
||||||
|
break;
|
||||||
|
|
||||||
case "z":
|
case "z":
|
||||||
axesClause = "Z0";
|
axesClause = "Z0";
|
||||||
@@ -36,10 +40,6 @@ function gotoZero(axes: "xy" | "z" | "a" | "yz") {
|
|||||||
case "a":
|
case "a":
|
||||||
axesClause = "A0";
|
axesClause = "A0";
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "yz":
|
|
||||||
axesClause = "Y0Z0";
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new Error(`Invalid axes: ${axes}`);
|
throw new Error(`Invalid axes: ${axes}`);
|
||||||
|
|||||||
Reference in New Issue
Block a user