GCode Feld
This commit is contained in:
@@ -1,13 +1,11 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
|
|
||||||
fluidnc: {
|
fluidnc: {
|
||||||
host: "fluidncred.local",
|
host: process.env.FluidNcHost || "fluidncred.local",
|
||||||
port: 80,
|
port: Number(process.env.FluidNcPort) || 80,
|
||||||
reconnectDelay: 30000
|
reconnectDelay: 30000
|
||||||
},
|
},
|
||||||
|
|
||||||
server: {
|
server: {
|
||||||
port: 3000
|
port: Number(process.env.PORT) || 3000
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
@@ -69,6 +69,10 @@
|
|||||||
<button onclick="jog('Z', -10)">Z -10</button>
|
<button onclick="jog('Z', -10)">Z -10</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<h2>G‑Code Eingabe</h2>
|
||||||
|
<input id="gcodeInput" type="text" placeholder="G0 X10 Z-5" style="width:250px; padding:5px;">
|
||||||
|
<button onclick="sendGcode()">Senden</button>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
let ws;
|
let ws;
|
||||||
|
|
||||||
@@ -136,6 +140,14 @@
|
|||||||
document.getElementById("posX").textContent = x.toFixed(3);
|
document.getElementById("posX").textContent = x.toFixed(3);
|
||||||
document.getElementById("posZ").textContent = z.toFixed(3);
|
document.getElementById("posZ").textContent = z.toFixed(3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function sendGcode() {
|
||||||
|
const cmd = document.getElementById("gcodeInput").value.trim();
|
||||||
|
if (!cmd) return;
|
||||||
|
ws.send(JSON.stringify({ type: "gcode", cmd }));
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
Reference in New Issue
Block a user