anpassungen

This commit is contained in:
ChK
2026-04-22 12:17:07 +02:00
parent a634998555
commit 0ba25e10ee
6 changed files with 71 additions and 29 deletions

View File

@@ -15,7 +15,7 @@ function checkGamePad() {
var gp = navigator.getGamepads()[gamePadId]
var buttons = gp.buttons
var xyzSpeed = 10; // 100 geht auch
var xyzSpeed = 10000;
var psi = gp.axes[0];
var z = gp.axes[1];

View File

@@ -11,42 +11,42 @@ document.addEventListener("keydown", (e)=>{
}
else if(e.key==="i"||e.key==="I"){
socket.send('G91 G1 B+0.1 F100');
socket.send('G91 G1 B+0.1 F1000');
}
else if(e.key == 'k' || e.key == 'K'){
socket.send('G91 G1 B-0.1 F100');
socket.send('G91 G1 B-0.1 F1000');
}
else if(e.key == 'l' || e.key == 'L'){
socket.send('G91 G1 A+0.1 F100');
socket.send('G91 G1 A+0.1 F1000');
}
else if(e.key == 'j' || e.key == 'J'){
socket.send('G91 G1 A-0.1 F100');
socket.send('G91 G1 A-0.1 F1000');
}
else if(e.key == 'o' || e.key == 'O'){
socket.send('G91 G1 C+0.1 F100');
socket.send('G91 G1 C+0.1 F1000');
}
else if(e.key == 'u' || e.key == 'U'){
socket.send('G91 G1 C-0.1 F100');
socket.send('G91 G1 C-0.1 F1000');
}
// XYZ Koordinaten
else if(e.key == 'e' || e.key == 'E'){
socket.send('G91 G1 Z+5 F100');
socket.send('G91 G1 Z+5 F1000');
}
else if(e.key == 'd' || e.key == 'D'){
socket.send('G91 G1 Z-5 F100');
socket.send('G91 G1 Z-5 F1000');
}
else if(e.key == 's' || e.key == 'S'){
socket.send('G91 G1 X5 F100');
socket.send('G91 G1 X5 F1000');
}
else if(e.key == 'f' || e.key == 'S'){
socket.send('G91 G1 X-5 F100');
else if(e.key == 'f' || e.key == 'F'){
socket.send('G91 G1 X-5 F1000');
}
else if(e.key == 'r' || e.key == 'R'){
socket.send('G91 G1 Y5 F100');
socket.send('G91 G1 Y5 F1000');
}
else if(e.key == 'w' || e.key == 'W'){
socket.send('G91 G1 Y-5 F100');
socket.send('G91 G1 Y-5 F1000');
}
// File & Log-Operations

View File

@@ -20,31 +20,31 @@
<body>
<div id="topMain">
<h1>Send Keyboard <br/> & Gamepad Data</h1>
<button onclick="socket.sendCommand('G91 G1 Z10 F100');">Up</button>
<button onclick="socket.sendCommand('G91 G1 Z-10 F100');">Down</button>
<button onclick="socket.sendCommand('G91 G1 Z10 F1000');">Up</button>
<button onclick="socket.sendCommand('G91 G1 Z-10 F1000');">Down</button>
</br/>
<button onclick="socket.sendCommand('G91 G1 X10 F100');">Right</button>
<button onclick="socket.sendCommand('G91 G1 X-10 F100');">Left</button>
<button onclick="socket.sendCommand('G91 G1 X10 F1000');">Right</button>
<button onclick="socket.sendCommand('G91 G1 X-10 F1000');">Left</button>
<br/>
<button onclick="socket.sendCommand('G91 G1 Y10 F100');">Forward</button>
<button onclick="socket.sendCommand('G91 G1 Y-10 F100');">Backward</button>
<button onclick="socket.sendCommand('G91 G1 Y10 F1000');">Forward</button>
<button onclick="socket.sendCommand('G91 G1 Y-10 F1000');">Backward</button>
<br/>
<button onclick="socket.sendCommand('M114');">Info</button>
<button onclick="socket.sendCommand('G28');">Null</button>
<br/>
<br/>
<button onclick="socket.sendCommand('G91 G1 A0.1 F100');">a+</button>
<button onclick="socket.sendCommand('G91 G1 A-0.1 F100');">a-</button>
<button onclick="socket.sendCommand('G91 G1 A0.1 F1000');">a+</button>
<button onclick="socket.sendCommand('G91 G1 A-0.1 F1000');">a-</button>
<br/>
<button onclick="socket.sendCommand('G91 G1 B0.1 F100');">B+</button>
<button onclick="socket.sendCommand('G91 G1 B-0.1 F100');">B-</button>
<button onclick="socket.sendCommand('G91 G1 B0.1 F1000');">B+</button>
<button onclick="socket.sendCommand('G91 G1 B-0.1 F1000');">B-</button>
<br/>
<button onclick="socket.sendCommand('G91 G1 C0.1 F100');">C+</button>
<button onclick="socket.sendCommand('G91 G1 C-0.1 F100');">C-</button>
<button onclick="socket.sendCommand('G91 G1 C0.1 F1000');">C+</button>
<button onclick="socket.sendCommand('G91 G1 C-0.1 F1000');">C-</button>
</div>
<br/>
<button onclick="socket.sendCommand('G91 G1 E0.1 F100');">E+</button>
<button onclick="socket.sendCommand('G91 G1 E-0.1 F100');">E-</button>
<button onclick="socket.sendCommand('G91 G1 E0.1 F1000');">E+</button>
<button onclick="socket.sendCommand('G91 G1 E-0.1 F1000');">E-</button>
</div>
<br/>