GCode Feld
This commit is contained in:
@@ -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