import { useDriveControl } from '../context/DriveControlContext.jsx'; import { useTelemetryFrame } from '../context/TelemetryContext.jsx'; export default function DrivePanel() { const { roverId, runStartDockFull, seekDock } = useDriveControl(); const frame = useTelemetryFrame(roverId); const sensors = frame?.sensors || {}; const drivingMode = (sensors.oiMode?.label || '').toLowerCase() === 'full'; const docked = Boolean(sensors.chargingSources?.homeBase); const charging = Boolean( sensors.chargingState?.label && sensors.chargingState.label.toLowerCase() !== 'not charging', ); return (
Drive control {roverId ? `Rover ${roverId}` : 'unassigned'}
); } function ActionCard({ title, description, statuses, tone, onClick, disabled, footnote }) { const baseColor = tone === 'indigo' ? 'bg-indigo-600' : 'bg-emerald-600'; return ( ); }