This commit is contained in:
legop3
2026-06-12 12:40:00 -04:00
parent cc06709674
commit bcd54c28e1
9 changed files with 162 additions and 153 deletions
@@ -12,7 +12,7 @@ export default function SpectatorTelemetryOverlay({ sensors, telemetry = null, m
['Voltage', voltageMv != null ? `${(voltageMv / 1000).toFixed(2)} V` : '--'],
['Current', currentMa != null ? `${currentMa} mA` : '--'],
['Charge', batteryChargeMah != null ? `${batteryChargeMah}` : '--'],
['Oi', oiLabel || '--'],
['OI', oiLabel || '--'],
];
const charging = Boolean(chargingLabel && chargingLabel.toLowerCase() !== 'not charging');
const oiNormalized = oiLabel.toLowerCase();
@@ -41,7 +41,7 @@ export default function SpectatorTelemetryOverlay({ sensors, telemetry = null, m
<span className={`rounded px-1.5 py-0.5 ${chargingTone}`}>
{charging ? 'Charging' : docked ? 'Not charging' : 'Not charging'}
</span>
<span className={`rounded px-1.5 py-0.5 ${oiTone}`}>Oi: {oiLabel}</span>
<span className={`rounded px-1.5 py-0.5 ${oiTone}`}>OI: {oiLabel}</span>
</div>
{telemetryEntries.map(([labelText, value]) => (
<span key={labelText} className="flex items-center justify-between gap-0.5">
@@ -32,7 +32,7 @@ function LowBatteryOverlay({ roverId = null, sensors, batteryConfig, compact = f
if (!battery.warnActive && !battery.urgentActive) return null;
const message = battery.urgentActive
? 'Battery very low, dock the rover and charge immediately!!'
? 'BATTERY VERY LOW, DOCK THE ROVER AND CHARGE IMMEDIATELY!!'
: 'Battery low! please dock and charge the rover soon.';
const containerClass = compact ? 'p-2 top-6' : 'p-4 top-10';
@@ -56,7 +56,7 @@ function OvercurrentOverlay({ roverId = null, sensors, overcurrentLimiter = null
<div className="h-full bg-red-700/60" style={{ width: fillWidth }} />
</div>
<div className={`relative z-10 flex h-full w-full flex-col items-center justify-center text-center font-semibold text-white animate-pulse ${textClass} ${padClass}`}>
<div>Overcurrent</div>
<div>OVERCURRENT</div>
<div className={`mt-0 font-medium text-white ${subTextClass}`}>{safeLabels.join(', ')}</div>
</div>
</div>
@@ -59,7 +59,7 @@ function TelemetrySummary({ sensors, voltage, current, batteryTemp, charge, capa
<Metric label="Charge" value={charge != null ? `${charge} mAh` : '--'} />
<Metric label="Capacity" value={capacity != null ? `${capacity} mAh` : '--'} />
<Metric label="Charge" value={chargePct} />
<Metric label="Oi mode" value={oiMode} />
<Metric label="OI mode" value={oiMode} />
<Metric label="Docked" value={docked} />
<Metric label="Charging state" value={charging} />
</div>