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

16
.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,16 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Attach to Node (Docker)",
"type": "node",
"request": "attach",
"address": "localhost",
"port": 9229,
"localRoot": "${workspaceFolder}",
"remoteRoot": "/app",
"restart": true,
"timeout": 10000
}
]
}

View File

@@ -21,7 +21,9 @@ function setupCommandForwarding(wssInput, targetUrl) {
targetSocket.on("message", (msg) => { targetSocket.on("message", (msg) => {
const data = msg.toString(); const data = msg.toString();
console.log("⬅️ Message from target:", data); if (data !== "Ping") {
console.log("⬅️ Message from target:", data);
}
// Broadcast to all connected browsers // Broadcast to all connected browsers
for (const client of clients) { for (const client of clients) {
if (client.readyState === WebSocket.OPEN) { if (client.readyState === WebSocket.OPEN) {

View File

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

View File

@@ -11,42 +11,42 @@ document.addEventListener("keydown", (e)=>{
} }
else if(e.key==="i"||e.key==="I"){ 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'){ 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'){ 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'){ 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'){ 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'){ 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 // XYZ Koordinaten
else if(e.key == 'e' || e.key == 'E'){ 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'){ 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'){ 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'){ else if(e.key == 'f' || e.key == 'F'){
socket.send('G91 G1 X-5 F100'); socket.send('G91 G1 X-5 F1000');
} }
else if(e.key == 'r' || e.key == 'R'){ 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'){ 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 // File & Log-Operations

View File

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

View File

@@ -0,0 +1,24 @@
● xrdp.service - xrdp daemon
Loaded: loaded (]8;;file://ThinkCentre/usr/lib/systemd/system/xrdp.service/usr/lib/systemd/system/xrdp.service]8;;; enabled; preset: enabled)
Active: active (running) since Fri 2026-04-03 22:00:58 CEST; 59s ago
Docs: ]8;;man:xrdp(8)man:xrdp(8)]8;;
]8;;man:xrdp.ini(5)man:xrdp.ini(5)]8;;
Process: 332591 ExecStartPre=/bin/sh /usr/share/xrdp/socksetup (code=exited, status=0/SUCCESS)
Process: 332599 ExecStart=/usr/sbin/xrdp $XRDP_OPTIONS (code=exited, status=0/SUCCESS)
Main PID: 332601 (xrdp)
Tasks: 1 (limit: 28461)
Memory: 872.0K (peak: 9.1M)
CPU: 142ms
CGroup: /system.slice/xrdp.service
└─332601 /usr/sbin/xrdp
Apr 03 22:01:24 ThinkCentre xrdp[333590]: [INFO ] sending login info to session manager. Please wait...
Apr 03 22:01:24 ThinkCentre xrdp[333590]: [ERROR] dynamic_monitor_open_response: error
Apr 03 22:01:24 ThinkCentre xrdp[333590]: [ERROR] xrdp_rdp_recv: xrdp_channel_process failed
Apr 03 22:01:24 ThinkCentre xrdp[333590]: [INFO ] xrdp_wm_log_msg: login successful for user chk on display 11
Apr 03 22:01:24 ThinkCentre xrdp[333590]: [INFO ] login successful for user chk on display 11
Apr 03 22:01:24 ThinkCentre xrdp[333590]: [INFO ] loaded module 'libxup.so' ok, interface size 10296, version 4
Apr 03 22:01:24 ThinkCentre xrdp[333590]: [INFO ] started connecting
Apr 03 22:01:24 ThinkCentre xrdp[333590]: [INFO ] lib_mod_connect: connecting via UNIX socket
Apr 03 22:01:24 ThinkCentre xrdp[333590]: [INFO ] lib_mod_log_peer: xrdp_pid=333590 connected to X11rdp_pid=333597 X11rdp_uid=1000 X11rdp_gid=1000 client_ip=::ffff:172.21.0.13 client_port=49702
Apr 03 22:01:24 ThinkCentre xrdp[333590]: [INFO ] connected ok