Gui angepasst

This commit is contained in:
2026-05-22 08:28:44 +02:00
parent aad90a5def
commit 8deca0528b
6 changed files with 1114 additions and 965 deletions
+47 -566
View File
@@ -5,554 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>ExoMy // Ground Control</title>
<script type="text/javascript" src="./vendor/roslib.min.js"></script>
<style>
:root {
--bg: #05080F;
--pri: #0088FF;
--sec: #FF8C00;
--ok: #00ff91;
--warn: #FFB300;
--txt: rgba(0,255,145,.8);
--txt2: rgba(0,210,130,.38);
--panel: #070D18;
--border: rgba(0,255,145,.12);
--mono: "Consolas", "Cascadia Code", "Cascadia Mono", "Courier New", monospace;
--disp: "Consolas", "Cascadia Code", "Cascadia Mono", "Courier New", monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; overflow: hidden; }
body {
font-family: var(--mono);
background-color: var(--bg);
background-image:
linear-gradient(rgba(0,255,145,.04) 1px, transparent 1px),
linear-gradient(90deg, rgba(0,255,145,.04) 1px, transparent 1px);
background-size: 32px 32px;
color: var(--txt);
display: flex;
flex-direction: column;
}
header {
height: 52px;
background: linear-gradient(135deg, #060D1A 0%, #0C1C38 100%);
border-bottom: 2px solid var(--pri);
box-shadow: 0 2px 24px rgba(0,136,255,.28);
display: flex;
align-items: center;
padding: 0 16px;
gap: 14px;
flex-shrink: 0;
z-index: 100;
}
.hdr-icon { width: 32px; height: 32px; flex-shrink: 0; }
.hdr-title {
font-family: var(--disp);
font-weight: 700;
font-size: 14px;
color: #fff;
letter-spacing: 5px;
text-transform: uppercase;
white-space: nowrap;
}
.hdr-title em { font-style: normal; color: var(--pri); }
.hdr-div { width: 1px; height: 28px; background: rgba(255,255,255,.12); flex-shrink: 0; }
.hdr-badge {
font-size: 7px;
color: var(--pri);
border: 1px solid rgba(0,136,255,.5);
padding: 2px 8px;
letter-spacing: 2.5px;
text-transform: uppercase;
white-space: nowrap;
}
.hdr-gap { flex: 1; }
.mission-ok {
display: flex;
align-items: center;
gap: 6px;
font-size: 8px;
color: var(--ok);
letter-spacing: 2px;
text-transform: uppercase;
}
.pulse-dot {
width: 7px;
height: 7px;
border-radius: 50%;
background: var(--ok);
animation: pdot 2s ease-in-out infinite;
box-shadow: 0 0 0 0 rgba(0,200,83,.5);
}
@keyframes pdot {
0% { box-shadow: 0 0 0 0 rgba(0,200,83,.5); }
70% { box-shadow: 0 0 0 7px rgba(0,200,83,0); }
100% { box-shadow: 0 0 0 0 rgba(0,200,83,0); }
}
.hdr-clocks { display: flex; gap: 16px; }
.hdr-clk { display: flex; flex-direction: column; align-items: flex-end; }
.hdr-clk-lbl {
font-size: 7px;
color: rgba(255,255,255,.35);
letter-spacing: 2px;
text-transform: uppercase;
}
.hdr-clk-val {
font-family: var(--disp);
font-weight: 700;
font-size: 14px;
color: #fff;
letter-spacing: 3px;
line-height: 1.1;
}
.hdr-clk-val.ora { color: var(--sec); }
.panel {
position: relative;
background:
linear-gradient(rgba(0,255,145,.55),rgba(0,255,145,.55)) 0 0 / 14px 1px no-repeat,
linear-gradient(rgba(0,255,145,.55),rgba(0,255,145,.55)) 0 0 / 1px 14px no-repeat,
linear-gradient(rgba(0,255,145,.55),rgba(0,255,145,.55)) 100% 0 / 14px 1px no-repeat,
linear-gradient(rgba(0,255,145,.55),rgba(0,255,145,.55)) 100% 0 / 1px 14px no-repeat,
linear-gradient(rgba(0,255,145,.55),rgba(0,255,145,.55)) 0 100% / 14px 1px no-repeat,
linear-gradient(rgba(0,255,145,.55),rgba(0,255,145,.55)) 0 100% / 1px 14px no-repeat,
linear-gradient(rgba(0,255,145,.55),rgba(0,255,145,.55)) 100% 100% / 14px 1px no-repeat,
linear-gradient(rgba(0,255,145,.55),rgba(0,255,145,.55)) 100% 100% / 1px 14px no-repeat,
#070D18;
border: 1px solid rgba(0,255,145,.1);
box-shadow: 0 0 24px rgba(0,0,0,.5), inset 0 0 40px rgba(0,255,145,.018);
}
.p-hdr {
display: flex;
align-items: center;
gap: 7px;
padding: 7px 12px;
border-bottom: 1px solid rgba(0,255,145,.08);
background: linear-gradient(90deg, rgba(0,255,145,.05) 0%, transparent 100%);
}
.p-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 6px var(--ok); flex-shrink: 0; }
.p-lbl { font-size: 8px; letter-spacing: 3px; color: rgba(0,255,145,.7); text-transform: uppercase; font-weight: bold; }
.p-tag { margin-left: auto; font-size: 7px; color: rgba(0,255,145,.25); letter-spacing: 1px; }
.main {
flex: 1;
display: grid;
grid-template-columns: 1fr clamp(230px, 28vw, 330px);
gap: clamp(6px, 1vw, 12px);
padding: clamp(6px, 1vw, 12px);
min-height: 0;
overflow: hidden;
}
.col-l, .col-r {
display: flex;
flex-direction: column;
gap: clamp(6px, 1vw, 12px);
min-height: 0;
}
#drive-panel,
#stat-panel { flex-shrink: 0; }
.drive-btns { display: flex; gap: 8px; padding: 10px 12px; }
.dbtn {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
padding: 12px 6px;
border: 1px solid rgba(0,255,145,.18);
background: rgba(0,255,145,.03);
color: rgba(0,255,145,.35);
font-family: var(--mono);
font-size: 11px;
letter-spacing: 2px;
text-transform: uppercase;
cursor: pointer;
transition: all .18s ease;
}
.dbtn:hover {
border-color: rgba(0,255,145,.5);
color: rgba(0,255,145,.8);
background: rgba(0,255,145,.07);
}
.dbtn.active {
border-color: rgba(0,255,145,.7);
background: rgba(0,255,145,.1);
color: #00ff91;
box-shadow: 0 0 20px rgba(0,255,145,.25), inset 0 0 14px rgba(0,255,145,.06);
}
@keyframes mode-flash {
0% { box-shadow: 0 0 0px rgba(0,255,145,0), background-color: var(--pri); }
30% { box-shadow: 0 0 28px rgba(0,255,145,.9), background-color: #00ff91; }
100% { box-shadow: 0 0 24px rgba(0,136,255,.45), background-color: var(--pri); }
}
.dbtn.flash { animation: mode-flash .5s ease-out forwards; }
#cam-panel { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.cam-port {
flex: 1;
position: relative;
overflow: hidden;
background: #0C0E14;
min-height: 0;
}
#video_output {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
object-fit: cover;
background: #05070d;
z-index: 1;
}
.c-vignette {
position: absolute;
inset: 0;
pointer-events: none;
z-index: 6;
background: radial-gradient(ellipse at 50% 50%, transparent 52%, rgba(0,0,0,.58) 100%);
}
.c-xhair {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 180px;
height: 180px;
z-index: 10;
pointer-events: none;
}
@keyframes xh-spin { to { transform: rotate(360deg); } }
@keyframes xh-pulse {
0% { transform: scale(1); opacity: .7; }
100% { transform: scale(2.8); opacity: 0; }
}
.xh-rot { animation: xh-spin 14s linear infinite; transform-box: fill-box; transform-origin: center; }
.xh-rot-rev { animation: xh-spin 8s linear infinite reverse; transform-box: fill-box; transform-origin: center; }
.xh-pulse { animation: xh-pulse 2.5s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.c-rec {
position: absolute;
top: 13px;
left: 50%;
transform: translateX(-50%);
display: flex;
align-items: center;
gap: 5px;
font-size: 8px;
color: rgba(255,55,55,.9);
letter-spacing: 2px;
z-index: 10;
}
.c-rec-dot {
width: 6px;
height: 6px;
border-radius: 50%;
background: #FF3333;
animation: blink 1.1s step-end infinite;
}
@keyframes blink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }
.c-tl, .c-tr, .c-bl, .c-br {
position: absolute;
z-index: 10;
font-size: 9px;
color: rgba(0,255,145,.72);
letter-spacing: 1px;
line-height: 1.9;
pointer-events: none;
}
.c-tl { top: 13px; left: 13px; }
.c-tr { top: 13px; right: 13px; text-align: right; }
.c-bl { bottom: 13px; left: 13px; }
.c-br { bottom: 13px; right: 13px; text-align: right; }
/* ── STAT PANEL ─────────────────────────────────────── */
.stat-list {
display: flex;
flex-direction: column;
background: #040810;
position: relative;
overflow: hidden;
}
.stat-list::before {
content: "";
position: absolute;
inset: 0;
background: repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(0,255,145,.012) 3px, rgba(0,255,145,.012) 4px);
pointer-events: none;
z-index: 0;
}
.ss-hdr {
display: flex;
align-items: center;
gap: 7px;
padding: 5px 10px 4px;
background: rgba(0,255,145,.035);
border-top: 1px solid rgba(0,255,145,.1);
border-bottom: 1px solid rgba(0,255,145,.05);
position: relative;
z-index: 1;
}
.ss-hdr-line {
flex: 1;
height: 1px;
background: repeating-linear-gradient(90deg, rgba(0,255,145,.22) 0, rgba(0,255,145,.22) 3px, transparent 3px, transparent 6px);
}
.ss-hdr-txt {
font-size: 6px;
letter-spacing: 4px;
color: rgba(0,255,145,.45);
text-transform: uppercase;
}
.sr {
display: flex;
align-items: center;
padding: 4px 10px;
gap: 7px;
border-bottom: 1px solid rgba(0,255,145,.04);
position: relative;
z-index: 1;
transition: background .1s;
}
.sr:hover { background: rgba(0,255,145,.02); }
.sr-led {
width: 6px;
height: 6px;
border-radius: 50%;
flex-shrink: 0;
border: 1px solid rgba(0,255,145,.15);
background: #0a1408;
}
.sr-led.led-ok { background: #00ff91; border-color: #00ff91; box-shadow: 0 0 5px #00ff91, 0 0 12px rgba(0,255,145,.55); }
.sr-led.led-warn { background: #FF8C00; border-color: #FF8C00; box-shadow: 0 0 5px #FF8C00, 0 0 12px rgba(255,140,0,.5); }
.sr-led.led-blue { background: #0088FF; border-color: #0088FF; box-shadow: 0 0 5px #0088FF, 0 0 12px rgba(0,136,255,.5); }
.sr-led.led-off { background: #0d1208; border-color: rgba(0,255,145,.08); box-shadow: none; }
.sr-key {
font-size: 7px;
letter-spacing: 2px;
color: rgba(0,210,130,.4);
text-transform: uppercase;
min-width: 52px;
flex-shrink: 0;
}
.sr-val {
font-size: 9px;
font-weight: 700;
letter-spacing: .8px;
margin-left: auto;
color: rgba(0,255,145,.85);
text-align: right;
}
.sr-val.b { color: #55CCFF; }
.sr-val.g { color: #00ff91; }
.sr-val.o { color: #FF8C00; }
.sr-val.alert { color: #FF3333; animation: uv-blink .9s step-end infinite; }
.sr-val.warntext { color: #FF8C00; }
/* legacy compat */
.sval.g { color: var(--ok); }
.sval.o { color: var(--sec); }
.sval.b { color: var(--pri); }
.sval.alert { color: #D50000; animation: uv-blink .9s step-end infinite; }
.sval.warntext { color: var(--sec); }
.sval-conn { display: flex; align-items: center; gap: 5px; color: rgba(0,255,145,.85); font-size: 9px; }
/* Gauge rows */
.sr-gauge { padding-bottom: 6px; }
.gauge {
flex: 1;
height: 8px;
background: rgba(0,255,145,.04);
border: 1px solid rgba(0,255,145,.14);
position: relative;
overflow: hidden;
}
.gauge::after {
content: "";
position: absolute;
inset: 0;
background: repeating-linear-gradient(90deg, transparent 0, transparent 8px, rgba(4,8,16,.88) 8px, rgba(4,8,16,.88) 9px);
z-index: 2;
pointer-events: none;
}
.gauge-fill {
height: 100%;
width: 0%;
position: relative;
z-index: 1;
transition: width .6s cubic-bezier(.25,.46,.45,.94);
}
.gauge-cpu .gauge-fill { background: linear-gradient(90deg, rgba(0,160,90,.65), rgba(0,255,145,.9)); box-shadow: 2px 0 14px rgba(0,255,145,.45); }
.gauge-temp .gauge-fill { background: linear-gradient(90deg, rgba(180,60,0,.7), rgba(255,160,0,.9)); box-shadow: 2px 0 14px rgba(255,140,0,.45); }
.gauge-mem .gauge-fill { background: linear-gradient(90deg, rgba(0,70,180,.65), rgba(0,160,255,.9)); box-shadow: 2px 0 14px rgba(0,136,255,.45); }
.gauge-num {
font-size: 8px;
font-weight: 700;
min-width: 36px;
text-align: right;
letter-spacing: .5px;
}
.gauge-cpu .gauge-num { color: rgba(0,255,145,.7); }
.gauge-temp .gauge-num { color: rgba(255,160,0,.8); }
.gauge-mem .gauge-num { color: rgba(0,180,255,.8); }
@keyframes uv-blink {
0%, 100% { opacity: 1; }
50% { opacity: 0.2; }
}
#joy-panel .p-hdr { padding: 14px 12px; }
.mode-toggle { display: flex; gap: 2px; margin-left: auto; }
.mtbtn {
font-family: var(--mono);
font-size: 8px;
letter-spacing: 1.5px;
padding: 6px 14px;
border: 1px solid rgba(0,255,145,.18);
background: transparent;
color: rgba(0,255,145,.35);
cursor: pointer;
transition: all .15s;
text-transform: uppercase;
}
.mtbtn.active { background: rgba(0,255,145,.1); color: #00ff91; border-color: rgba(0,255,145,.5); box-shadow: 0 0 12px rgba(0,255,145,.2); }
#joy-panel { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.joy-area,
.dpad-wrap {
flex: 1;
align-items: center;
justify-content: center;
gap: 10px;
padding: 12px;
min-height: 0;
overflow: hidden;
}
.joy-area { display: flex; flex-direction: column; }
.joy-base {
width: min(calc(100% - 28px), 40vh, 200px);
height: min(calc(100% - 28px), 40vh, 200px);
border-radius: 50%;
background: radial-gradient(circle, rgba(0,255,145,.06) 0%, rgba(0,255,145,.01) 60%, rgba(0,255,145,.03) 100%);
border: 1.5px solid rgba(0,255,145,.22);
box-shadow: inset 0 0 32px rgba(0,255,145,.04), 0 0 20px rgba(0,0,0,.4);
position: relative;
touch-action: none;
user-select: none;
cursor: grab;
}
.joy-base:active { cursor: grabbing; }
.jg-h, .jg-v { position: absolute; background: rgba(0,255,145,.1); }
.jg-h { top: 50%; left: 11%; right: 11%; height: 1px; transform: translateY(-50%); }
.jg-v { left: 50%; top: 11%; bottom: 11%; width: 1px; transform: translateX(-50%); }
.jring {
position: absolute;
border-radius: 50%;
border: 1px solid rgba(0,255,145,.09);
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
.jr1 { width: 58px; height: 58px; }
.jr2 { width: 116px; height: 116px; }
.joy-thumb {
position: absolute;
width: 58px;
height: 58px;
border-radius: 50%;
background: radial-gradient(circle at 36% 32%, rgba(0,255,145,.9), rgba(0,180,100,.7), rgba(0,80,40,.8));
border: 2px solid rgba(0,255,145,.5);
box-shadow: 0 4px 20px rgba(0,255,145,.4), 0 0 0 4px rgba(0,255,145,.08);
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
pointer-events: none;
}
.joy-thumb::after {
content: "";
position: absolute;
top: 9px;
left: 9px;
width: 9px;
height: 9px;
border-radius: 50%;
background: rgba(255,255,255,.35);
}
.dpad-wrap { display: none; flex-direction: column; }
.dpad-wrap.visible { display: flex; }
.dpad-grid {
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: repeat(3, 1fr);
gap: 5px;
width: min(156px, calc(100% - 28px));
aspect-ratio: 1;
}
.dpad-btn {
background: rgba(0,255,145,.03);
border: 1px solid rgba(0,255,145,.15);
color: rgba(0,255,145,.35);
font-size: 15px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: all .1s;
touch-action: none;
user-select: none;
border-radius: 2px;
}
.dpad-btn:hover { border-color: rgba(0,255,145,.45); color: rgba(0,255,145,.8); background: rgba(0,255,145,.07); }
.dpad-btn.pressed {
background: rgba(0,255,145,.12);
border-color: rgba(0,255,145,.7);
color: #00ff91;
box-shadow: 0 0 16px rgba(0,255,145,.3);
}
.dpad-mid {
background: rgba(0,255,145,.02);
border: 1px solid rgba(0,255,145,.08);
border-radius: 2px;
}
.dpad-diag { font-size: 12px; opacity: .75; }
.dpad-diag:hover { opacity: 1; }
.dpad-diag.pressed { opacity: 1; }
.joy-vals { display: flex; gap: 22px; }
.joy-ax { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.joy-ax-n { font-size: 7px; letter-spacing: 2px; color: rgba(0,255,145,.35); text-transform: uppercase; }
.joy-ax-v {
font-family: var(--disp);
font-weight: 700;
font-size: 14px;
color: rgba(0,255,145,.8);
min-width: 56px;
text-align: center;
letter-spacing: 2px;
}
.admin-link {
color: rgba(0,255,145,.35);
text-decoration: none;
font-size: 8px;
letter-spacing: 2px;
text-transform: uppercase;
}
.admin-link:hover { color: rgba(0,255,145,.8); }
@media (max-width: 980px) {
body { overflow-y: auto; }
html, body { overflow-x: hidden; }
.main {
grid-template-columns: 1fr;
overflow: visible;
}
.drive-btns { flex-direction: column; }
}
</style>
<link rel="stylesheet" href="./index.css">
</head>
<body>
<header>
@@ -592,20 +45,6 @@ header {
<div class="main">
<div class="col-l">
<div class="panel" id="drive-panel">
<div class="p-hdr">
<div class="p-dot"></div>
<span class="p-lbl">Fahrmodus</span>
<span class="p-tag">Mode Select</span>
</div>
<div class="drive-btns">
<button class="dbtn active" data-mode="ackermann" data-button="1">Ackermann</button>
<button class="dbtn" data-mode="turn-on-point" data-button="0">Turn on Point</button>
<button class="dbtn" data-mode="crab" data-button="3">Crab</button>
<button class="dbtn" id="motor-toggle">Motoren</button>
</div>
</div>
<div class="panel" id="cam-panel">
<div class="p-hdr">
<div class="p-dot"></div>
@@ -613,6 +52,7 @@ header {
<span class="p-tag">Live Stream</span>
</div>
<div class="cam-port">
<div class="cam-frame" id="video_frame">
<img id="video_output" alt="Kamerabild vom ExoMy" />
<div class="c-rec"><div class="c-rec-dot"></div>LIVE</div>
<div class="c-tl">
@@ -666,8 +106,8 @@ header {
<circle cx="0" cy="0" r="1" fill="rgba(255,255,255,.7)"/>
</svg>
</div>
<div class="c-vignette"></div>
</div>
</div>
</div>
</div>
@@ -708,17 +148,17 @@ header {
<div class="sr sr-gauge gauge-cpu">
<span class="sr-key">CPU</span>
<div class="gauge"><div class="gauge-fill" id="bar-cpu" style="width:0%"></div></div>
<div class="gauge"><div class="gauge-fill" id="bar-cpu"></div></div>
<span class="gauge-num" id="val-cpu">--</span>
</div>
<div class="sr sr-gauge gauge-temp">
<span class="sr-key">Temp</span>
<div class="gauge"><div class="gauge-fill" id="bar-temp" style="width:0%"></div></div>
<div class="gauge"><div class="gauge-fill" id="bar-temp"></div></div>
<span class="gauge-num" id="val-temp">--</span>
</div>
<div class="sr sr-gauge gauge-mem">
<span class="sr-key">RAM</span>
<div class="gauge"><div class="gauge-fill" id="bar-mem" style="width:0%"></div></div>
<div class="gauge"><div class="gauge-fill" id="bar-mem"></div></div>
<span class="gauge-num" id="val-mem">--</span>
</div>
@@ -762,6 +202,12 @@ header {
<button class="mtbtn" id="mt-dpad">D-Pad</button>
</div>
</div>
<div class="drive-inline">
<button class="dbtn active" data-mode="ackermann" data-button="1">ACK</button>
<button class="dbtn" data-mode="turn-on-point" data-button="0">TOP</button>
<button class="dbtn" data-mode="crab" data-button="3">CRAB</button>
<button class="dbtn" id="motor-toggle">MOT</button>
</div>
<div class="joy-area" id="joy-area">
<div class="joy-base" id="jbase">
@@ -1139,6 +585,34 @@ function clearDpad() {
resetAxes();
}
function updateCameraFrameLayout() {
var port = document.querySelector(".cam-port");
var frame = document.getElementById("video_frame");
var video = document.getElementById("video_output");
if (!port || !frame) return;
var portWidth = port.clientWidth;
var portHeight = port.clientHeight;
if (!portWidth || !portHeight) return;
var videoWidth = (video && video.naturalWidth) || 1280;
var videoHeight = (video && video.naturalHeight) || 720;
var aspectRatio = videoWidth / videoHeight;
var frameWidth = portWidth;
var frameHeight = frameWidth / aspectRatio;
if (frameHeight > portHeight) {
frameHeight = portHeight;
frameWidth = frameHeight * aspectRatio;
}
frame.style.width = frameWidth + "px";
frame.style.height = frameHeight + "px";
frame.style.left = ((portWidth - frameWidth) / 2) + "px";
frame.style.top = ((portHeight - frameHeight) / 2) + "px";
frame.style.setProperty("--cam-scale", Math.max(0.55, Math.min(1.1, frameWidth / 640)).toFixed(3));
}
window.addEventListener("load", function () {
setText("cam-host", hostUrl);
updateModeDisplay();
@@ -1155,10 +629,16 @@ window.addEventListener("load", function () {
video.src = "//" + hostUrl + ":8083/stream.mjpg";
video.addEventListener("load", function () {
setText("cam-state", "Online");
updateCameraFrameLayout();
});
video.addEventListener("error", function () {
setText("cam-state", "Fehler");
});
updateCameraFrameLayout();
window.addEventListener("resize", updateCameraFrameLayout);
window.addEventListener("orientationchange", function () {
window.setTimeout(updateCameraFrameLayout, 80);
});
ros = new ROSLIB.Ros({
url: "ws://" + hostUrl + ":9090"
@@ -1293,3 +773,4 @@ window.addEventListener("load", function () {
</script>
</body>
</html>