mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 01:21:20 -04:00
guh
This commit is contained in:
@@ -5,3 +5,6 @@
|
||||
- https://www.thingiverse.com/thing:2873677
|
||||
- https://www.printables.com/model/356894-raspberry-camera-module-with-automatic-ir-cut-swit
|
||||
- https://www.thingiverse.com/thing:4514531
|
||||
|
||||
## spectator page
|
||||
- video does not load in spectator page in admin mode
|
||||
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" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>webui</title>
|
||||
<script type="module" crossorigin src="/assets/index-CbBQ197T.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-DkvQkTlU.css">
|
||||
<script type="module" crossorigin src="/assets/index-DgFhO08o.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-66RVFCl0.css">
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
@@ -42,14 +42,14 @@ export default function AuthPanel() {
|
||||
{loading ? 'Logging in…' : 'Login'}
|
||||
</button>
|
||||
</form>
|
||||
<div className="flex gap-0.5 text-sm">
|
||||
{/* <div className="flex gap-0.5 text-sm">
|
||||
<button type="button" onClick={() => setRole('user')} className="flex-1 button-dark">
|
||||
Driver
|
||||
</button>
|
||||
<button type="button" onClick={() => setRole('spectator')} className="flex-1 button-dark">
|
||||
Spectator
|
||||
</button>
|
||||
</div>
|
||||
</div> */}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -76,6 +76,7 @@ export default function TelemetryPanel() {
|
||||
<CliffBar value={sensors.cliffFrontRightSignal} />
|
||||
<CliffBar value={sensors.cliffRightSignal} />
|
||||
</div>
|
||||
<MotorCurrentBar label="Left Wheel" value={sensors.wheelLeftCurrentMa} overcurrent={sensors.wheelOverCurrents.leftWheel}/>
|
||||
</>
|
||||
|
||||
)}
|
||||
@@ -143,3 +144,19 @@ function Metric({ label, value }) {
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
// a reusable motor current bar, with overcurrent coloring. Use the overcurrent from sensors for each motor.
|
||||
// include a label to indicate which motor it is, with the label to the left of the bar
|
||||
function MotorCurrentBar({ label, value, overcurrent }) {
|
||||
const pct = value == null ? 0 : Math.max(0, Math.min(100, (value / 5000) * 100));
|
||||
const height = `${pct}%`;
|
||||
const barColor = overcurrent ? 'bg-red-500' : 'bg-emerald-500';
|
||||
return (
|
||||
<div className="flex items-center gap-0.5">
|
||||
<span className="text-sm text-slate-200">{label}</span>
|
||||
<div className="surface-muted h-6 w-20">
|
||||
<div className={barColor} style={{ height }} />
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user