mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 01:21:20 -04:00
barss
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
@@ -5,8 +5,8 @@
|
|||||||
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>webui</title>
|
<title>webui</title>
|
||||||
<script type="module" crossorigin src="/assets/index-BouNEyLy.js"></script>
|
<script type="module" crossorigin src="/assets/index-Be8zA8wd.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-BhWEQnjm.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-DkNFeqA8.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
|||||||
@@ -50,8 +50,8 @@ export default function RightPaneTabs({ layout }) {
|
|||||||
<div className="mt-1 space-y-1">
|
<div className="mt-1 space-y-1">
|
||||||
{active === 'telemetry' && (
|
{active === 'telemetry' && (
|
||||||
<div className="space-y-1">
|
<div className="space-y-1">
|
||||||
<TelemetryPanel />
|
|
||||||
<DrivePanel />
|
<DrivePanel />
|
||||||
|
<TelemetryPanel />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
{active === 'room' && (
|
{active === 'room' && (
|
||||||
|
|||||||
@@ -58,6 +58,12 @@ export default function TelemetryPanel() {
|
|||||||
<Metric label="Current" value={formatMetric(current)} />
|
<Metric label="Current" value={formatMetric(current)} />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
<div className="flex gap-0.5 mt-1">
|
||||||
|
<CliffBar value={sensors.cliffLeftSignal} />
|
||||||
|
<CliffBar value={sensors.cliffFrontLeftSignal} />
|
||||||
|
<CliffBar value={sensors.cliffFrontRightSignal} />
|
||||||
|
<CliffBar value={sensors.cliffRightSignal} />
|
||||||
|
</div>
|
||||||
{rawSnippet && (
|
{rawSnippet && (
|
||||||
<pre className="mt-1 overflow-scroll p-1 text-xs text-lime-300">
|
<pre className="mt-1 overflow-scroll p-1 text-xs text-lime-300">
|
||||||
{rawSnippet}
|
{rawSnippet}
|
||||||
@@ -98,6 +104,19 @@ export default function TelemetryPanel() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function CliffBar({ value }) {
|
||||||
|
// Render a small vertical bar; value is clamped to 0-100 for display
|
||||||
|
// const pct = value == null ? 0 : Math.max(0, Math.min(100, value));
|
||||||
|
// goes from 0 to 4095. calculate percentage for height
|
||||||
|
const pct = value == null ? 0 : Math.max(0, Math.min(100, (value / 4095) * 100));
|
||||||
|
const height = `${pct}%`;
|
||||||
|
return (
|
||||||
|
<div className="w-1/4 h-6 bg-gray-800 rounded-sm overflow-hidden">
|
||||||
|
<div className="w-full bg-lime-400" style={{ height }} />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
function Metric({ label, value }) {
|
function Metric({ label, value }) {
|
||||||
return (
|
return (
|
||||||
// <div className="flex items-center justify-between">
|
// <div className="flex items-center justify-between">
|
||||||
|
|||||||
Reference in New Issue
Block a user