hud adjustments

This commit is contained in:
legop3
2026-05-17 13:55:11 -04:00
parent d67c4dd815
commit ba5865c397
7 changed files with 42 additions and 17 deletions
@@ -1,7 +1,7 @@
// Drive Dock Action
// Purpose: Defines the Drive Dock Action module and the local helpers/components used in this file.
// Scope: Keeps behavior unchanged while isolating this concern into a clear, single-responsibility unit.
import { useMemo, useState } from 'react';
import { useEffect, useMemo, useState } from 'react';
import { useControlSystem } from '../../controls/index.js';
import { useTelemetryFrame } from '../../context/TelemetryContext.jsx';
import { formatKeyLabel } from '../../controls/keymapUtils.js';
@@ -138,6 +138,12 @@ export default function DriveDockAction({
const chargeValue = charging ? 'Charging' : docked ? 'Charging soon...' : '—';
const chargeTone = charging ? 'good' : docked ? 'warn' : 'bad';
useEffect(() => {
if (!manualAssistActive) return;
if (!docked) return;
actions.setManualDockAssistActive(false);
}, [actions, docked, manualAssistActive]);
const handleReturnToDrive = async () => {
if (!roverId || pending) return;
setPending('drive');