mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 01:21:20 -04:00
lidar adjustmentses
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -11,8 +11,8 @@
|
|||||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||||
<meta name="apple-mobile-web-app-title" content="Multi Roomba Rover" />
|
<meta name="apple-mobile-web-app-title" content="Multi Roomba Rover" />
|
||||||
<title>Multi Roomba Rover</title>
|
<title>Multi Roomba Rover</title>
|
||||||
<script type="module" crossorigin src="/assets/index-CZ7Wc8AL.js"></script>
|
<script type="module" crossorigin src="/assets/index-zn-QfvQ7.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-BNzmusoM.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-DmVJMLH1.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
const { spawn } = require('child_process');
|
const { spawn } = require('child_process');
|
||||||
const EventEmitter = require('events');
|
const EventEmitter = require('events');
|
||||||
|
|
||||||
const POLL_INTERVAL_MS = 10000;
|
const POLL_INTERVAL_MS = 1000;
|
||||||
const SCAN_TIMEOUT_MS = 6000;
|
const SCAN_TIMEOUT_MS = 2000;
|
||||||
const RECONNECT_DELAY_MS = 5000;
|
const RECONNECT_DELAY_MS = 5000;
|
||||||
|
|
||||||
function parsePayloadLine(line) {
|
function parsePayloadLine(line) {
|
||||||
|
|||||||
@@ -132,7 +132,7 @@ export default function VipNeatoCard({
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="grid grid-cols-1 lg:grid-cols-2 gap-0.5">
|
<div className="grid grid-cols-1 lg:grid-cols-[minmax(0,0.95fr)_minmax(0,1.05fr)] gap-0.5">
|
||||||
<div className="surface-muted grid gap-0.5">
|
<div className="surface-muted grid gap-0.5">
|
||||||
<p className="text-xs text-slate-300 text-center">Controls</p>
|
<p className="text-xs text-slate-300 text-center">Controls</p>
|
||||||
<button
|
<button
|
||||||
@@ -198,54 +198,66 @@ export default function VipNeatoCard({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="surface-muted grid gap-0.5">
|
<div className="grid gap-0.5">
|
||||||
<p className="text-xs text-slate-300 text-center">Robot Status</p>
|
<div className="surface-muted grid gap-0.5">
|
||||||
<div className="rounded-md bg-slate-800 px-1 py-0.5">
|
<p className="text-xs text-slate-300 text-center">Robot Status</p>
|
||||||
<div className="text-[0.72rem] text-slate-300">Robot state (raw)</div>
|
<div className="grid grid-cols-1 xl:grid-cols-[minmax(0,1fr)_minmax(13rem,15rem)] gap-0.5 items-start">
|
||||||
<div className="font-mono text-sm text-slate-100 break-all">{robotStateRaw}</div>
|
<div className="grid gap-0.5">
|
||||||
</div>
|
<div className="rounded-md bg-slate-800 px-1 py-0.5">
|
||||||
<div className="rounded-md bg-slate-800 px-1 py-0.5">
|
<div className="text-[0.72rem] text-slate-300">Robot state (raw)</div>
|
||||||
<div className="text-[0.72rem] text-slate-300">Basic state</div>
|
<div className="font-mono text-sm text-slate-100 break-all">{robotStateRaw}</div>
|
||||||
<div className="font-mono text-sm text-slate-100 break-all">{primaryState}</div>
|
</div>
|
||||||
</div>
|
<div className="rounded-md bg-slate-800 px-1 py-0.5">
|
||||||
<div className="rounded-md bg-slate-800 px-1 py-0.5">
|
<div className="text-[0.72rem] text-slate-300">Basic state</div>
|
||||||
<div className="text-[0.72rem] text-slate-300">UI state</div>
|
<div className="font-mono text-sm text-slate-100 break-all">{primaryState}</div>
|
||||||
<div className="font-mono text-sm text-slate-100 break-all">{uiStateLabel}</div>
|
</div>
|
||||||
</div>
|
<div className="rounded-md bg-slate-800 px-1 py-0.5">
|
||||||
<div className="rounded-md bg-slate-800 px-1 py-0.5">
|
<div className="text-[0.72rem] text-slate-300">UI state</div>
|
||||||
<div className="text-[0.72rem] text-slate-300">Robot error</div>
|
<div className="font-mono text-sm text-slate-100 break-all">{uiStateLabel}</div>
|
||||||
<div className="font-mono text-sm text-slate-100 break-all">{robotError}</div>
|
</div>
|
||||||
</div>
|
<div className="rounded-md bg-slate-800 px-1 py-0.5">
|
||||||
<div className="rounded-md bg-slate-800 px-1 py-0.5">
|
<div className="text-[0.72rem] text-slate-300">Robot error</div>
|
||||||
<div className="text-[0.72rem] text-slate-300">Robot alert</div>
|
<div className="font-mono text-sm text-slate-100 break-all">{robotError}</div>
|
||||||
<div className="font-mono text-sm text-slate-100 break-all">{robotAlert}</div>
|
</div>
|
||||||
</div>
|
<div className="rounded-md bg-slate-800 px-1 py-0.5">
|
||||||
</div>
|
<div className="text-[0.72rem] text-slate-300">Robot alert</div>
|
||||||
</div>
|
<div className="font-mono text-sm text-slate-100 break-all">{robotAlert}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="surface-muted grid gap-0.5">
|
<div className="rounded-md border border-emerald-900 bg-black p-0.5">
|
||||||
<p className="text-xs text-slate-300 text-center">Lidar</p>
|
<div className="mb-0.25 text-center text-[0.72rem] uppercase tracking-[0.18em] text-emerald-400">
|
||||||
<div className="rounded-md bg-slate-800 p-0.5">
|
Lidar
|
||||||
{lidarDots ? (
|
</div>
|
||||||
<svg viewBox="0 0 220 220" className="w-full max-w-[26rem] mx-auto">
|
<div className="aspect-square rounded-md border border-emerald-950 bg-[radial-gradient(circle_at_center,rgba(34,197,94,0.14),rgba(0,0,0,0.96)_68%)] p-0.25">
|
||||||
<circle cx="110" cy="110" r="92" fill="none" stroke="#475569" strokeWidth="1" />
|
{lidarDots ? (
|
||||||
<circle cx="110" cy="110" r="61" fill="none" stroke="#334155" strokeWidth="1" />
|
<svg viewBox="0 0 220 220" className="h-full w-full">
|
||||||
<circle cx="110" cy="110" r="31" fill="none" stroke="#1e293b" strokeWidth="1" />
|
<circle cx="110" cy="110" r="92" fill="none" stroke="#14532d" strokeWidth="1.2" />
|
||||||
<line x1="110" y1="18" x2="110" y2="202" stroke="#334155" strokeWidth="1" />
|
<circle cx="110" cy="110" r="61" fill="none" stroke="#166534" strokeWidth="1" />
|
||||||
<line x1="18" y1="110" x2="202" y2="110" stroke="#334155" strokeWidth="1" />
|
<circle cx="110" cy="110" r="31" fill="none" stroke="#15803d" strokeWidth="0.9" />
|
||||||
<circle cx="110" cy="110" r="4" fill="#e2e8f0" />
|
<line x1="110" y1="18" x2="110" y2="202" stroke="#14532d" strokeWidth="1" />
|
||||||
<polyline
|
<line x1="18" y1="110" x2="202" y2="110" stroke="#14532d" strokeWidth="1" />
|
||||||
points={lidarDots}
|
<line x1="45" y1="45" x2="175" y2="175" stroke="#0f3d22" strokeWidth="0.8" />
|
||||||
fill="none"
|
<line x1="175" y1="45" x2="45" y2="175" stroke="#0f3d22" strokeWidth="0.8" />
|
||||||
stroke="#38bdf8"
|
<circle cx="110" cy="110" r="4" fill="#86efac" />
|
||||||
strokeWidth="1.5"
|
<polyline
|
||||||
strokeLinejoin="round"
|
points={lidarDots}
|
||||||
strokeLinecap="round"
|
fill="none"
|
||||||
/>
|
stroke="#22c55e"
|
||||||
</svg>
|
strokeWidth="1.4"
|
||||||
) : (
|
strokeLinejoin="round"
|
||||||
<div className="py-3 text-center text-xs text-slate-400">Waiting for lidar scan...</div>
|
strokeLinecap="round"
|
||||||
)}
|
/>
|
||||||
|
</svg>
|
||||||
|
) : (
|
||||||
|
<div className="flex h-full items-center justify-center text-center text-xs text-emerald-500/80">
|
||||||
|
Waiting for scan
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user