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