GCode Feld
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
module.exports = {
|
||||
|
||||
fluidnc: {
|
||||
host: "fluidncred.local",
|
||||
port: 80,
|
||||
host: process.env.FluidNcHost || "fluidncred.local",
|
||||
port: Number(process.env.FluidNcPort) || 80,
|
||||
reconnectDelay: 30000
|
||||
},
|
||||
|
||||
server: {
|
||||
port: 3000
|
||||
port: Number(process.env.PORT) || 3000
|
||||
}
|
||||
|
||||
};
|
||||
@@ -69,6 +69,10 @@
|
||||
<button onclick="jog('Z', -10)">Z -10</button>
|
||||
</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>
|
||||
let ws;
|
||||
|
||||
@@ -136,6 +140,14 @@
|
||||
document.getElementById("posX").textContent = x.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>
|
||||
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user