visualizer-components 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +90 -0
- package/dist/assets/RudderIcon.d.ts +23 -0
- package/dist/assets/RudderIcon.d.ts.map +1 -0
- package/dist/assets/RudderIcon.js +23 -0
- package/dist/assets/RudderIcon.js.map +1 -0
- package/dist/assets/svgSources.d.ts +18 -0
- package/dist/assets/svgSources.d.ts.map +1 -0
- package/dist/assets/svgSources.js +18 -0
- package/dist/assets/svgSources.js.map +1 -0
- package/dist/components/Joystick.d.ts +23 -0
- package/dist/components/Joystick.d.ts.map +1 -0
- package/dist/components/Joystick.js +114 -0
- package/dist/components/Joystick.js.map +1 -0
- package/dist/components/TelemetryDashboard.d.ts +31 -0
- package/dist/components/TelemetryDashboard.d.ts.map +1 -0
- package/dist/components/TelemetryDashboard.js +127 -0
- package/dist/components/TelemetryDashboard.js.map +1 -0
- package/dist/components/controls/ControlOverlay.d.ts +64 -0
- package/dist/components/controls/ControlOverlay.d.ts.map +1 -0
- package/dist/components/controls/ControlOverlay.js +88 -0
- package/dist/components/controls/ControlOverlay.js.map +1 -0
- package/dist/components/controls/ControlsDrawer.d.ts +37 -0
- package/dist/components/controls/ControlsDrawer.d.ts.map +1 -0
- package/dist/components/controls/ControlsDrawer.js +93 -0
- package/dist/components/controls/ControlsDrawer.js.map +1 -0
- package/dist/components/controls/ForceVectorsPanel.d.ts +37 -0
- package/dist/components/controls/ForceVectorsPanel.d.ts.map +1 -0
- package/dist/components/controls/ForceVectorsPanel.js +76 -0
- package/dist/components/controls/ForceVectorsPanel.js.map +1 -0
- package/dist/components/controls/InfoPopover.d.ts +34 -0
- package/dist/components/controls/InfoPopover.d.ts.map +1 -0
- package/dist/components/controls/InfoPopover.js +41 -0
- package/dist/components/controls/InfoPopover.js.map +1 -0
- package/dist/components/controls/Legend.d.ts +29 -0
- package/dist/components/controls/Legend.d.ts.map +1 -0
- package/dist/components/controls/Legend.js +74 -0
- package/dist/components/controls/Legend.js.map +1 -0
- package/dist/components/controls/MobileBottomNav.d.ts +17 -0
- package/dist/components/controls/MobileBottomNav.d.ts.map +1 -0
- package/dist/components/controls/MobileBottomNav.js +46 -0
- package/dist/components/controls/MobileBottomNav.js.map +1 -0
- package/dist/components/hud/SceneHUD.d.ts +100 -0
- package/dist/components/hud/SceneHUD.d.ts.map +1 -0
- package/dist/components/hud/SceneHUD.js +216 -0
- package/dist/components/hud/SceneHUD.js.map +1 -0
- package/dist/components/hud/telemetry/Batteries.d.ts +40 -0
- package/dist/components/hud/telemetry/Batteries.d.ts.map +1 -0
- package/dist/components/hud/telemetry/Batteries.js +137 -0
- package/dist/components/hud/telemetry/Batteries.js.map +1 -0
- package/dist/components/hud/telemetry/Compass.d.ts +2 -0
- package/dist/components/hud/telemetry/Compass.d.ts.map +1 -0
- package/dist/components/hud/telemetry/Compass.js +147 -0
- package/dist/components/hud/telemetry/Compass.js.map +1 -0
- package/dist/components/hud/telemetry/Log.d.ts +2 -0
- package/dist/components/hud/telemetry/Log.d.ts.map +1 -0
- package/dist/components/hud/telemetry/Log.js +65 -0
- package/dist/components/hud/telemetry/Log.js.map +1 -0
- package/dist/components/hud/telemetry/Map.d.ts +4 -0
- package/dist/components/hud/telemetry/Map.d.ts.map +1 -0
- package/dist/components/hud/telemetry/Map.js +293 -0
- package/dist/components/hud/telemetry/Map.js.map +1 -0
- package/dist/components/hud/telemetry/PowerRudderPanel.d.ts +2 -0
- package/dist/components/hud/telemetry/PowerRudderPanel.d.ts.map +1 -0
- package/dist/components/hud/telemetry/PowerRudderPanel.js +115 -0
- package/dist/components/hud/telemetry/PowerRudderPanel.js.map +1 -0
- package/dist/components/hud/telemetry/RadiusVisualizer.d.ts +63 -0
- package/dist/components/hud/telemetry/RadiusVisualizer.d.ts.map +1 -0
- package/dist/components/hud/telemetry/RadiusVisualizer.js +139 -0
- package/dist/components/hud/telemetry/RadiusVisualizer.js.map +1 -0
- package/dist/components/hud/telemetry/RadiusVisualizerPanel.d.ts +31 -0
- package/dist/components/hud/telemetry/RadiusVisualizerPanel.d.ts.map +1 -0
- package/dist/components/hud/telemetry/RadiusVisualizerPanel.js +37 -0
- package/dist/components/hud/telemetry/RadiusVisualizerPanel.js.map +1 -0
- package/dist/components/hud/telemetry/ShipRudderVisualizer.d.ts +43 -0
- package/dist/components/hud/telemetry/ShipRudderVisualizer.d.ts.map +1 -0
- package/dist/components/hud/telemetry/ShipRudderVisualizer.js +121 -0
- package/dist/components/hud/telemetry/ShipRudderVisualizer.js.map +1 -0
- package/dist/components/hud/telemetry/ShipRudderVisualizerPanel.d.ts +26 -0
- package/dist/components/hud/telemetry/ShipRudderVisualizerPanel.d.ts.map +1 -0
- package/dist/components/hud/telemetry/ShipRudderVisualizerPanel.js +29 -0
- package/dist/components/hud/telemetry/ShipRudderVisualizerPanel.js.map +1 -0
- package/dist/components/hud/telemetry/SignalLog.d.ts +7 -0
- package/dist/components/hud/telemetry/SignalLog.d.ts.map +1 -0
- package/dist/components/hud/telemetry/SignalLog.js +28 -0
- package/dist/components/hud/telemetry/SignalLog.js.map +1 -0
- package/dist/components/hud/telemetry/SignalStrength.d.ts +9 -0
- package/dist/components/hud/telemetry/SignalStrength.d.ts.map +1 -0
- package/dist/components/hud/telemetry/SignalStrength.js +53 -0
- package/dist/components/hud/telemetry/SignalStrength.js.map +1 -0
- package/dist/components/hud/telemetry/Speedometer.d.ts +2 -0
- package/dist/components/hud/telemetry/Speedometer.d.ts.map +1 -0
- package/dist/components/hud/telemetry/Speedometer.js +70 -0
- package/dist/components/hud/telemetry/Speedometer.js.map +1 -0
- package/dist/components/hud/telemetry/Task.d.ts +2 -0
- package/dist/components/hud/telemetry/Task.d.ts.map +1 -0
- package/dist/components/hud/telemetry/Task.js +61 -0
- package/dist/components/hud/telemetry/Task.js.map +1 -0
- package/dist/components/hud/telemetry/TaskData.d.ts +2 -0
- package/dist/components/hud/telemetry/TaskData.d.ts.map +1 -0
- package/dist/components/hud/telemetry/TaskData.js +62 -0
- package/dist/components/hud/telemetry/TaskData.js.map +1 -0
- package/dist/components/hud/telemetry/index.d.ts +40 -0
- package/dist/components/hud/telemetry/index.d.ts.map +1 -0
- package/dist/components/hud/telemetry/index.js +40 -0
- package/dist/components/hud/telemetry/index.js.map +1 -0
- package/dist/components/hud/telemetry/powerColor.d.ts +16 -0
- package/dist/components/hud/telemetry/powerColor.d.ts.map +1 -0
- package/dist/components/hud/telemetry/powerColor.js +15 -0
- package/dist/components/hud/telemetry/powerColor.js.map +1 -0
- package/dist/components/scenes/MappingScene.d.ts +19 -0
- package/dist/components/scenes/MappingScene.d.ts.map +1 -0
- package/dist/components/scenes/MappingScene.js +353 -0
- package/dist/components/scenes/MappingScene.js.map +1 -0
- package/dist/components/scenes/SceneCanvas.d.ts +96 -0
- package/dist/components/scenes/SceneCanvas.d.ts.map +1 -0
- package/dist/components/scenes/SceneCanvas.js +151 -0
- package/dist/components/scenes/SceneCanvas.js.map +1 -0
- package/dist/components/scenes/SceneRenderer.d.ts +16 -0
- package/dist/components/scenes/SceneRenderer.d.ts.map +1 -0
- package/dist/components/scenes/SceneRenderer.js +60 -0
- package/dist/components/scenes/SceneRenderer.js.map +1 -0
- package/dist/components/scenes/TelemetryScene.d.ts +6 -0
- package/dist/components/scenes/TelemetryScene.d.ts.map +1 -0
- package/dist/components/scenes/TelemetryScene.js +6 -0
- package/dist/components/scenes/TelemetryScene.js.map +1 -0
- package/dist/components/svg/CompassRose.d.ts +129 -0
- package/dist/components/svg/CompassRose.d.ts.map +1 -0
- package/dist/components/svg/CompassRose.js +221 -0
- package/dist/components/svg/CompassRose.js.map +1 -0
- package/dist/connection/config.d.ts +41 -0
- package/dist/connection/config.d.ts.map +1 -0
- package/dist/connection/config.js +44 -0
- package/dist/connection/config.js.map +1 -0
- package/dist/contexts/SceneContext.d.ts +35 -0
- package/dist/contexts/SceneContext.d.ts.map +1 -0
- package/dist/contexts/SceneContext.js +24 -0
- package/dist/contexts/SceneContext.js.map +1 -0
- package/dist/hooks/useAutoPathAnimation.d.ts +22 -0
- package/dist/hooks/useAutoPathAnimation.d.ts.map +1 -0
- package/dist/hooks/useAutoPathAnimation.js +102 -0
- package/dist/hooks/useAutoPathAnimation.js.map +1 -0
- package/dist/hooks/useLayoutConfig.d.ts +29 -0
- package/dist/hooks/useLayoutConfig.d.ts.map +1 -0
- package/dist/hooks/useLayoutConfig.js +30 -0
- package/dist/hooks/useLayoutConfig.js.map +1 -0
- package/dist/hooks/useSceneContext.d.ts +64 -0
- package/dist/hooks/useSceneContext.d.ts.map +1 -0
- package/dist/hooks/useSceneContext.js +37 -0
- package/dist/hooks/useSceneContext.js.map +1 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +57 -0
- package/dist/index.js.map +1 -0
- package/dist/providers/TelemetryProvider.d.ts +27 -0
- package/dist/providers/TelemetryProvider.d.ts.map +1 -0
- package/dist/providers/TelemetryProvider.js +50 -0
- package/dist/providers/TelemetryProvider.js.map +1 -0
- package/dist/providers/TelemetryThemeProvider.d.ts +25 -0
- package/dist/providers/TelemetryThemeProvider.d.ts.map +1 -0
- package/dist/providers/TelemetryThemeProvider.js +54 -0
- package/dist/providers/TelemetryThemeProvider.js.map +1 -0
- package/dist/store/actions/connectionActions.d.ts +39 -0
- package/dist/store/actions/connectionActions.d.ts.map +1 -0
- package/dist/store/actions/connectionActions.js +162 -0
- package/dist/store/actions/connectionActions.js.map +1 -0
- package/dist/store/actions/fetchTelemetry.d.ts +51 -0
- package/dist/store/actions/fetchTelemetry.d.ts.map +1 -0
- package/dist/store/actions/fetchTelemetry.js +135 -0
- package/dist/store/actions/fetchTelemetry.js.map +1 -0
- package/dist/store/index.d.ts +23 -0
- package/dist/store/index.d.ts.map +1 -0
- package/dist/store/index.js +22 -0
- package/dist/store/index.js.map +1 -0
- package/dist/store/slices/connectionSlice.d.ts +15 -0
- package/dist/store/slices/connectionSlice.d.ts.map +1 -0
- package/dist/store/slices/connectionSlice.js +39 -0
- package/dist/store/slices/connectionSlice.js.map +1 -0
- package/dist/store/slices/discoveredGridSlice.d.ts +168 -0
- package/dist/store/slices/discoveredGridSlice.d.ts.map +1 -0
- package/dist/store/slices/discoveredGridSlice.js +146 -0
- package/dist/store/slices/discoveredGridSlice.js.map +1 -0
- package/dist/store/slices/sceneSlice.d.ts +185 -0
- package/dist/store/slices/sceneSlice.d.ts.map +1 -0
- package/dist/store/slices/sceneSlice.js +95 -0
- package/dist/store/slices/sceneSlice.js.map +1 -0
- package/dist/store/slices/simulationSlice.d.ts +87 -0
- package/dist/store/slices/simulationSlice.d.ts.map +1 -0
- package/dist/store/slices/simulationSlice.js +55 -0
- package/dist/store/slices/simulationSlice.js.map +1 -0
- package/dist/store/slices/telemetrySlice.d.ts +10 -0
- package/dist/store/slices/telemetrySlice.d.ts.map +1 -0
- package/dist/store/slices/telemetrySlice.js +88 -0
- package/dist/store/slices/telemetrySlice.js.map +1 -0
- package/dist/store/slices/videoSlice.d.ts +12 -0
- package/dist/store/slices/videoSlice.d.ts.map +1 -0
- package/dist/store/slices/videoSlice.js +27 -0
- package/dist/store/slices/videoSlice.js.map +1 -0
- package/dist/store/slices/visualizationSlice.d.ts +152 -0
- package/dist/store/slices/visualizationSlice.d.ts.map +1 -0
- package/dist/store/slices/visualizationSlice.js +58 -0
- package/dist/store/slices/visualizationSlice.js.map +1 -0
- package/dist/store/store.d.ts +61 -0
- package/dist/store/store.d.ts.map +1 -0
- package/dist/store/store.js +78 -0
- package/dist/store/store.js.map +1 -0
- package/dist/theme/index.d.ts +14 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +14 -0
- package/dist/theme/index.js.map +1 -0
- package/dist/theme/lightTheme.d.ts +151 -0
- package/dist/theme/lightTheme.d.ts.map +1 -0
- package/dist/theme/lightTheme.js +194 -0
- package/dist/theme/lightTheme.js.map +1 -0
- package/dist/theme/telemetryTheme.d.ts +90 -0
- package/dist/theme/telemetryTheme.d.ts.map +1 -0
- package/dist/theme/telemetryTheme.js +157 -0
- package/dist/theme/telemetryTheme.js.map +1 -0
- package/dist/types/detectedObjectsTypes.d.ts +18 -0
- package/dist/types/detectedObjectsTypes.d.ts.map +1 -0
- package/dist/types/detectedObjectsTypes.js +8 -0
- package/dist/types/detectedObjectsTypes.js.map +1 -0
- package/dist/types/index.d.ts +16 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +16 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/ros.d.ts +87 -0
- package/dist/types/ros.d.ts.map +1 -0
- package/dist/types/ros.js +17 -0
- package/dist/types/ros.js.map +1 -0
- package/dist/types/statusTypes.d.ts +81 -0
- package/dist/types/statusTypes.d.ts.map +1 -0
- package/dist/types/statusTypes.js +52 -0
- package/dist/types/statusTypes.js.map +1 -0
- package/dist/types/taskTypes.d.ts +65 -0
- package/dist/types/taskTypes.d.ts.map +1 -0
- package/dist/types/taskTypes.js +18 -0
- package/dist/types/taskTypes.js.map +1 -0
- package/dist/types/telemetryInterfaces.d.ts +81 -0
- package/dist/types/telemetryInterfaces.d.ts.map +1 -0
- package/dist/types/telemetryInterfaces.js +30 -0
- package/dist/types/telemetryInterfaces.js.map +1 -0
- package/dist/utils/basestation.d.ts +7 -0
- package/dist/utils/basestation.d.ts.map +1 -0
- package/dist/utils/basestation.js +49 -0
- package/dist/utils/basestation.js.map +1 -0
- package/dist/utils/batteryUtil.d.ts +8 -0
- package/dist/utils/batteryUtil.d.ts.map +1 -0
- package/dist/utils/batteryUtil.js +32 -0
- package/dist/utils/batteryUtil.js.map +1 -0
- package/dist/utils/telemetry/index.d.ts +13 -0
- package/dist/utils/telemetry/index.d.ts.map +1 -0
- package/dist/utils/telemetry/index.js +13 -0
- package/dist/utils/telemetry/index.js.map +1 -0
- package/dist/utils/telemetry/telemetryFactory.d.ts +48 -0
- package/dist/utils/telemetry/telemetryFactory.d.ts.map +1 -0
- package/dist/utils/telemetry/telemetryFactory.js +390 -0
- package/dist/utils/telemetry/telemetryFactory.js.map +1 -0
- package/package.json +91 -0
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file SceneHUD.tsx
|
|
3
|
+
* @description Heads-up display (HUD) for the map visualizer.
|
|
4
|
+
* Renamed from MapHUD.tsx. Tab switching now uses sceneSlice instead of activeTab integer.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* This component provides a heads-up display (HUD) for the map visualizer, including tabs for switching between different scenes, status badges for connection and simulation mode, a title and legend block, a joystick for manual control, a toolbar with various controls, a fullscreen button, and a connecting spinner overlay.
|
|
8
|
+
* It uses Material-UI components for styling and layout, and interacts with the Redux store to read and update the application state.
|
|
9
|
+
* The HUD is responsive to desktop and mobile views, showing or hiding certain elements based on the current mode.
|
|
10
|
+
* @see {@link Tabs}, {@link StatusBadges}, {@link Title}, {@link JoystickHUD}, {@link Toolbar}, {@link LegendPanel}, {@link ConnectingOverlay}
|
|
11
|
+
* @author Carson Fujita
|
|
12
|
+
* @license MIT
|
|
13
|
+
*/
|
|
14
|
+
import { type JSX } from 'react';
|
|
15
|
+
import { InteractiveCompass } from '../svg/CompassRose';
|
|
16
|
+
import { type JoyState } from '../Joystick';
|
|
17
|
+
/**
|
|
18
|
+
* @component Tabs
|
|
19
|
+
* @description Renders tabs for switching between different scenes in the visualizer.
|
|
20
|
+
* @remarks
|
|
21
|
+
* This component displays a set of tabs that allow users to switch between different scenes in the visualizer. It is only visible in desktop mode and uses the Redux store to manage the active scene state.
|
|
22
|
+
* @see {@link setActiveScene} for updating the active scene in the Redux store.
|
|
23
|
+
* @example
|
|
24
|
+
* <Tabs />
|
|
25
|
+
*/
|
|
26
|
+
export declare function Tabs(): JSX.Element | null;
|
|
27
|
+
/**
|
|
28
|
+
* @component StatusBadges
|
|
29
|
+
* @description Renders badges indicating the connection status and simulation mode.
|
|
30
|
+
* @remarks
|
|
31
|
+
* This component displays badges that indicate the current connection status (LIVE, CONNECTING, SIM) and the simulation
|
|
32
|
+
* mode (AUTO or MANUAL). It uses the Redux store to read the current connection status and simulation mode, and provides a button to toggle between automatic and manual simulation modes when in SIM mode.
|
|
33
|
+
* @see {@link setSimMode} for updating the simulation mode in the Redux store.
|
|
34
|
+
* @example
|
|
35
|
+
* <StatusBadges />
|
|
36
|
+
*/
|
|
37
|
+
export declare function StatusBadges(): JSX.Element;
|
|
38
|
+
/**
|
|
39
|
+
* @component Title
|
|
40
|
+
* @description Renders the title and legend block for the visualizer.
|
|
41
|
+
* @remarks
|
|
42
|
+
* This component displays the title of the visualizer and, if in desktop mode and the legend is enabled,
|
|
43
|
+
* an accordion containing the legend for the current scene. It uses the Redux store to determine the active scene
|
|
44
|
+
* and whether to show the legend.
|
|
45
|
+
* @see {@link Legend} for the legend component.
|
|
46
|
+
*/
|
|
47
|
+
export declare function Title(): JSX.Element | null;
|
|
48
|
+
/**
|
|
49
|
+
* @interface JoystickHUDProps
|
|
50
|
+
* @description Properties for the {@link JoystickHUD} component.
|
|
51
|
+
* @see {@link JoystickHUD}
|
|
52
|
+
* @property {JoyState} joy - Current state of the joystick.
|
|
53
|
+
* @property {number} lw - Left wheel speed.
|
|
54
|
+
* @property {number} rw - Right wheel speed.
|
|
55
|
+
* @property {(j: JoyState) => void} onJoyChange - Callback function to handle joystick state changes.
|
|
56
|
+
*/
|
|
57
|
+
export interface JoystickHUDProps {
|
|
58
|
+
joy: JoyState;
|
|
59
|
+
lw: number;
|
|
60
|
+
rw: number;
|
|
61
|
+
onJoyChange: (j: JoyState) => void;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* @component JoystickHUD
|
|
65
|
+
* @description Renders a joystick HUD for manual control in landscape fullscreen mode.
|
|
66
|
+
* @remarks
|
|
67
|
+
* This component displays a joystick HUD that allows users to manually control the system in landscape fullscreen mode. It shows the current state of the joystick and the speeds of the left and right wheels. The component uses the provided callback function to handle changes in the joystick state.
|
|
68
|
+
* @see {@link Joystick} for the underlying joystick component.
|
|
69
|
+
*/
|
|
70
|
+
export declare function JoystickHUD({ joy, lw, rw, onJoyChange }: JoystickHUDProps): JSX.Element;
|
|
71
|
+
/**
|
|
72
|
+
* @component Toolbar
|
|
73
|
+
* @description Renders a toolbar with various controls for the visualizer.
|
|
74
|
+
* @remarks
|
|
75
|
+
* This component displays a toolbar in the top-right corner of the visualizer, containing buttons for resetting the view, toggling follow mode, opening the controls drawer, and showing information about the visualizer. It uses Material-UI components for styling and layout, and interacts with the Redux store to read and update the application state.
|
|
76
|
+
* @see {@link InfoPopover} for the information popover component.
|
|
77
|
+
* @see {@link useSceneContext} for accessing scene context values.
|
|
78
|
+
* @see {@link useHudBtnSx} for button styling.
|
|
79
|
+
* @example
|
|
80
|
+
* <Toolbar />
|
|
81
|
+
*/
|
|
82
|
+
export declare function Toolbar(): JSX.Element;
|
|
83
|
+
/**
|
|
84
|
+
* @component LegendPanel
|
|
85
|
+
* @description Renders a fullscreen toggle button in the bottom-right corner of the visualizer.
|
|
86
|
+
* @remarks
|
|
87
|
+
* This component displays a button that allows users to toggle fullscreen mode for the visualizer. It uses the scene context to determine whether the visualizer is currently in fullscreen mode and provides a callback function to toggle the state.
|
|
88
|
+
* @see {@link useSceneContext} for accessing scene context values.
|
|
89
|
+
*/
|
|
90
|
+
export declare function LegendPanel(): JSX.Element;
|
|
91
|
+
/**
|
|
92
|
+
* @component ConnectingOverlay
|
|
93
|
+
* @description Renders a semi-transparent overlay with the animated connecting porthole when the connection status is "connecting".
|
|
94
|
+
* @remarks
|
|
95
|
+
* This component displays a semi-transparent overlay with the self-animating `connecting.svg` porthole in the center of the visualizer when the connection status is "connecting". It uses the Redux store to read the current connection status and conditionally renders the overlay based on that state.
|
|
96
|
+
* @see {@link useAppSelector} for accessing Redux store state.
|
|
97
|
+
*/
|
|
98
|
+
export declare function ConnectingOverlay(): JSX.Element | null;
|
|
99
|
+
export { InteractiveCompass };
|
|
100
|
+
//# sourceMappingURL=SceneHUD.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SceneHUD.d.ts","sourceRoot":"","sources":["../../../src/components/hud/SceneHUD.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAc,EAA4B,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAmBlE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAiB,EAAE,KAAK,QAAQ,EAAE,MAAM,aAAa,CAAC;AAkBtD;;;;;;;;GAQG;AACH,wBAAgB,IAAI,IAAI,GAAG,CAAC,OAAO,GAAG,IAAI,CAmCzC;AAID;;;;;;;;;GASG;AACH,wBAAgB,YAAY,IAAI,GAAG,CAAC,OAAO,CAqE1C;AAID;;;;;;;;GAQG;AACH,wBAAgB,KAAK,IAAI,GAAG,CAAC,OAAO,GAAG,IAAI,CAwC1C;AAID;;;;;;;;GAQG;AACH,MAAM,WAAW,gBAAgB;IAC7B,GAAG,EAAE,QAAQ,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,CAAC,CAAC,EAAE,QAAQ,KAAK,IAAI,CAAC;CACtC;AAED;;;;;;GAMG;AACH,wBAAgB,WAAW,CAAC,EAAE,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,gBAAgB,GAAG,GAAG,CAAC,OAAO,CAMvF;AAID;;;;;;;;;;GAUG;AACH,wBAAgB,OAAO,IAAI,GAAG,CAAC,OAAO,CAkDrC;AAID;;;;;;GAMG;AACH,wBAAgB,WAAW,IAAI,GAAG,CAAC,OAAO,CAgBzC;AAID;;;;;;GAMG;AACH,wBAAgB,iBAAiB,IAAI,GAAG,CAAC,OAAO,GAAG,IAAI,CAYtD;AAGD,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* @file SceneHUD.tsx
|
|
4
|
+
* @description Heads-up display (HUD) for the map visualizer.
|
|
5
|
+
* Renamed from MapHUD.tsx. Tab switching now uses sceneSlice instead of activeTab integer.
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* This component provides a heads-up display (HUD) for the map visualizer, including tabs for switching between different scenes, status badges for connection and simulation mode, a title and legend block, a joystick for manual control, a toolbar with various controls, a fullscreen button, and a connecting spinner overlay.
|
|
9
|
+
* It uses Material-UI components for styling and layout, and interacts with the Redux store to read and update the application state.
|
|
10
|
+
* The HUD is responsive to desktop and mobile views, showing or hiding certain elements based on the current mode.
|
|
11
|
+
* @see {@link Tabs}, {@link StatusBadges}, {@link Title}, {@link JoystickHUD}, {@link Toolbar}, {@link LegendPanel}, {@link ConnectingOverlay}
|
|
12
|
+
* @author Carson Fujita
|
|
13
|
+
* @license MIT
|
|
14
|
+
*/
|
|
15
|
+
import React, { useMemo, startTransition } from 'react';
|
|
16
|
+
import { Box, Tabs as MuiTabs, Tab, Stack, Chip, Button, Tooltip, Accordion, AccordionSummary, AccordionDetails, Typography, IconButton, useTheme, alpha, } from '@mui/material';
|
|
17
|
+
import TuneIcon from '@mui/icons-material/Tune';
|
|
18
|
+
import RestartAltIcon from '@mui/icons-material/RestartAlt';
|
|
19
|
+
import FullscreenIcon from '@mui/icons-material/Fullscreen';
|
|
20
|
+
import FullscreenExitIcon from '@mui/icons-material/FullscreenExit';
|
|
21
|
+
import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
|
|
22
|
+
import ExpandLessIcon from '@mui/icons-material/ExpandLess';
|
|
23
|
+
import GpsFixedIcon from '@mui/icons-material/GpsFixed';
|
|
24
|
+
import GpsNotFixedIcon from '@mui/icons-material/GpsNotFixed';
|
|
25
|
+
import { useAppSelector, useAppDispatch } from '../../store';
|
|
26
|
+
import { setSimMode } from '../../store/slices/simulationSlice';
|
|
27
|
+
import { setActiveScene, selectActiveTabIndex, selectActiveScene, selectRegisteredScenes } from '../../store/slices/sceneSlice';
|
|
28
|
+
import { useSceneContext } from '../../hooks/useSceneContext';
|
|
29
|
+
import { Legend } from '../controls/Legend';
|
|
30
|
+
import { InfoPopover } from '../controls/InfoPopover';
|
|
31
|
+
import { InteractiveCompass } from '../svg/CompassRose';
|
|
32
|
+
import Joystick, {} from '../Joystick';
|
|
33
|
+
import { connectingSvgUrl as connectingSvg } from '../../assets/svgSources';
|
|
34
|
+
function useHudBtnSx() {
|
|
35
|
+
const theme = useTheme();
|
|
36
|
+
return useMemo(() => ({
|
|
37
|
+
width: 40,
|
|
38
|
+
height: 40,
|
|
39
|
+
bgcolor: alpha(theme.palette.scene.skyDark, 0.9),
|
|
40
|
+
border: '1px solid',
|
|
41
|
+
borderColor: 'divider',
|
|
42
|
+
backdropFilter: 'blur(4px)',
|
|
43
|
+
'&:hover': { bgcolor: theme.palette.scene.skyMid },
|
|
44
|
+
}), [theme.palette.scene.skyDark, theme.palette.scene.skyMid]);
|
|
45
|
+
}
|
|
46
|
+
// ─── Tabs (desktop only) ──────────────────────────────────────────────────────
|
|
47
|
+
/**
|
|
48
|
+
* @component Tabs
|
|
49
|
+
* @description Renders tabs for switching between different scenes in the visualizer.
|
|
50
|
+
* @remarks
|
|
51
|
+
* This component displays a set of tabs that allow users to switch between different scenes in the visualizer. It is only visible in desktop mode and uses the Redux store to manage the active scene state.
|
|
52
|
+
* @see {@link setActiveScene} for updating the active scene in the Redux store.
|
|
53
|
+
* @example
|
|
54
|
+
* <Tabs />
|
|
55
|
+
*/
|
|
56
|
+
export function Tabs() {
|
|
57
|
+
const theme = useTheme();
|
|
58
|
+
const dispatch = useAppDispatch();
|
|
59
|
+
const activeTabIndex = useAppSelector(selectActiveTabIndex);
|
|
60
|
+
const scenes = useAppSelector(selectRegisteredScenes);
|
|
61
|
+
const { isDesktopMode } = useSceneContext();
|
|
62
|
+
if (!isDesktopMode)
|
|
63
|
+
return null;
|
|
64
|
+
return (_jsx(Box, { sx: { position: 'absolute', top: 0, left: 0, zIndex: 10 }, children: _jsx(MuiTabs, { value: activeTabIndex, onChange: (_, i) => startTransition(() => { dispatch(setActiveScene(scenes[i]?.id ?? 'mapping')); }), sx: {
|
|
65
|
+
bgcolor: alpha(theme.palette.scene.skyDark, 0.85),
|
|
66
|
+
backdropFilter: 'blur(12px)',
|
|
67
|
+
borderRadius: '0 0 8px 0',
|
|
68
|
+
border: `1px solid ${alpha(theme.palette.common.white, 0.1)}`,
|
|
69
|
+
boxShadow: theme.shadows[10],
|
|
70
|
+
minHeight: 0,
|
|
71
|
+
'& .MuiTabs-indicator': { backgroundColor: theme.palette.water.highlight },
|
|
72
|
+
'& .MuiTab-root': { minHeight: 40, py: 1 },
|
|
73
|
+
}, children: scenes.map(s => (_jsx(Tab, { label: s.displayName, sx: { color: theme.palette.gui.muted, '&.Mui-selected': { color: theme.palette.water.highlight }, fontSize: '0.75rem' } }, s.id))) }) }));
|
|
74
|
+
}
|
|
75
|
+
// ─── Connection + sim mode badges ────────────────────────────────────────────
|
|
76
|
+
/**
|
|
77
|
+
* @component StatusBadges
|
|
78
|
+
* @description Renders badges indicating the connection status and simulation mode.
|
|
79
|
+
* @remarks
|
|
80
|
+
* This component displays badges that indicate the current connection status (LIVE, CONNECTING, SIM) and the simulation
|
|
81
|
+
* mode (AUTO or MANUAL). It uses the Redux store to read the current connection status and simulation mode, and provides a button to toggle between automatic and manual simulation modes when in SIM mode.
|
|
82
|
+
* @see {@link setSimMode} for updating the simulation mode in the Redux store.
|
|
83
|
+
* @example
|
|
84
|
+
* <StatusBadges />
|
|
85
|
+
*/
|
|
86
|
+
export function StatusBadges() {
|
|
87
|
+
const theme = useTheme();
|
|
88
|
+
const dispatch = useAppDispatch();
|
|
89
|
+
const connectionStatus = useAppSelector(state => state.connection.status);
|
|
90
|
+
const simMode = useAppSelector(state => state.simulation.simMode);
|
|
91
|
+
const { isDesktopMode } = useSceneContext();
|
|
92
|
+
const isConnected = connectionStatus === 'connected';
|
|
93
|
+
const autoSimActive = !isConnected && simMode === 'automatic';
|
|
94
|
+
return (_jsxs(Stack, { direction: "row", spacing: 0.5, sx: { position: 'absolute', top: isDesktopMode ? 48 : 8, left: 8, zIndex: 10 }, children: [_jsx(Chip, { size: "small", label: isConnected ? 'LIVE' : connectionStatus === 'connecting' ? 'CONNECTING' : 'SIM', sx: {
|
|
95
|
+
pointerEvents: 'none',
|
|
96
|
+
bgcolor: isConnected
|
|
97
|
+
? alpha(theme.palette.status.primary.autonomous, 0.15)
|
|
98
|
+
: connectionStatus === 'connecting'
|
|
99
|
+
? alpha(theme.palette.sim.connecting, 0.15)
|
|
100
|
+
: alpha(theme.palette.map.drag, 0.15),
|
|
101
|
+
color: isConnected
|
|
102
|
+
? theme.palette.status.primary.autonomous
|
|
103
|
+
: connectionStatus === 'connecting'
|
|
104
|
+
? theme.palette.sim.connecting
|
|
105
|
+
: theme.palette.map.drag,
|
|
106
|
+
border: `1px solid ${isConnected
|
|
107
|
+
? theme.palette.status.primary.autonomous
|
|
108
|
+
: connectionStatus === 'connecting'
|
|
109
|
+
? theme.palette.sim.connecting
|
|
110
|
+
: theme.palette.map.drag}`,
|
|
111
|
+
fontSize: '0.6rem',
|
|
112
|
+
fontWeight: 800,
|
|
113
|
+
height: 20,
|
|
114
|
+
letterSpacing: '0.06em',
|
|
115
|
+
} }), !isConnected && (_jsx(Tooltip, { title: autoSimActive ? 'Switch to manual control' : 'Switch to automatic path', placement: "right", children: _jsx(Button, { size: "small", variant: "outlined", onClick: () => dispatch(setSimMode(autoSimActive ? 'manual' : 'automatic')), sx: {
|
|
116
|
+
height: 20,
|
|
117
|
+
minWidth: 0,
|
|
118
|
+
px: 1,
|
|
119
|
+
py: 0,
|
|
120
|
+
lineHeight: 1,
|
|
121
|
+
fontSize: '0.6rem',
|
|
122
|
+
fontWeight: 800,
|
|
123
|
+
letterSpacing: '0.06em',
|
|
124
|
+
borderRadius: '10px',
|
|
125
|
+
borderColor: autoSimActive ? theme.palette.sim.auto : theme.palette.sim.manual,
|
|
126
|
+
color: autoSimActive ? theme.palette.sim.auto : theme.palette.sim.manual,
|
|
127
|
+
bgcolor: autoSimActive ? alpha(theme.palette.sim.auto, 0.15) : alpha(theme.palette.sim.manual, 0.15),
|
|
128
|
+
'&:hover': {
|
|
129
|
+
bgcolor: autoSimActive ? alpha(theme.palette.sim.auto, 0.28) : alpha(theme.palette.sim.manual, 0.28),
|
|
130
|
+
borderColor: autoSimActive ? theme.palette.sim.auto : theme.palette.sim.manual,
|
|
131
|
+
},
|
|
132
|
+
}, children: autoSimActive ? 'AUTO' : 'MAN' }) }))] }));
|
|
133
|
+
}
|
|
134
|
+
// ─── Title + Legend block (bottom-left) ──────────────────────────────────────
|
|
135
|
+
/**
|
|
136
|
+
* @component Title
|
|
137
|
+
* @description Renders the title and legend block for the visualizer.
|
|
138
|
+
* @remarks
|
|
139
|
+
* This component displays the title of the visualizer and, if in desktop mode and the legend is enabled,
|
|
140
|
+
* an accordion containing the legend for the current scene. It uses the Redux store to determine the active scene
|
|
141
|
+
* and whether to show the legend.
|
|
142
|
+
* @see {@link Legend} for the legend component.
|
|
143
|
+
*/
|
|
144
|
+
export function Title() {
|
|
145
|
+
const theme = useTheme();
|
|
146
|
+
const { isDesktopMode, hasJoystick } = useSceneContext();
|
|
147
|
+
const activeSceneId = useAppSelector(selectActiveScene);
|
|
148
|
+
const showLegend = useAppSelector(state => state.visualization.showLegend);
|
|
149
|
+
if (hasJoystick)
|
|
150
|
+
return null;
|
|
151
|
+
return (_jsxs(Box, { sx: { position: 'absolute', bottom: { xs: 16, md: 24 }, left: { xs: 16, md: 24 }, zIndex: 10, maxWidth: 260 }, children: [isDesktopMode && showLegend && (_jsx(Box, { sx: { mb: 1.5 }, children: _jsxs(Accordion, { defaultExpanded: true, sx: { display: 'flex', flexDirection: 'column-reverse', bgcolor: alpha(theme.palette.scene.skyDark, 0.85), color: theme.palette.common.white, backdropFilter: 'blur(12px)', backgroundImage: 'none', border: `1px solid ${alpha(theme.palette.common.white, 0.1)}`, borderRadius: '8px !important', boxShadow: theme.shadows[10], '&:before': { display: 'none' } }, children: [_jsx(AccordionSummary, { expandIcon: _jsx(ExpandLessIcon, { sx: { color: theme.palette.common.white } }), sx: { '& .MuiAccordionSummary-content': { my: 1 } }, children: _jsx(Typography, { variant: "caption", sx: { fontWeight: 800, textTransform: 'uppercase', letterSpacing: '0.05em', color: theme.palette.primary.light }, children: "System Legend" }) }), _jsx(AccordionDetails, { sx: { p: 2 }, children: _jsx(Legend, { variant: activeSceneId === 'forces' ? 'forces' : 'mapping', disablePaper: true, hideTitle: true }) })] }) })), _jsxs(Box, { sx: { pointerEvents: 'none' }, children: [_jsx(Typography, { variant: isDesktopMode ? 'h6' : 'subtitle1', sx: { fontWeight: 800, color: theme.palette.common.white, textShadow: `0 2px 4px ${alpha(theme.palette.common.black, 0.5)}`, lineHeight: 1.2 }, children: "System Visualizer v2" }), _jsx(Typography, { variant: "caption", sx: { color: theme.palette.gui.muted, textShadow: `0 1px 2px ${alpha(theme.palette.common.black, 0.5)}`, display: 'block' }, children: "Global-Local Coordinate Mapping" })] })] }));
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* @component JoystickHUD
|
|
155
|
+
* @description Renders a joystick HUD for manual control in landscape fullscreen mode.
|
|
156
|
+
* @remarks
|
|
157
|
+
* This component displays a joystick HUD that allows users to manually control the system in landscape fullscreen mode. It shows the current state of the joystick and the speeds of the left and right wheels. The component uses the provided callback function to handle changes in the joystick state.
|
|
158
|
+
* @see {@link Joystick} for the underlying joystick component.
|
|
159
|
+
*/
|
|
160
|
+
export function JoystickHUD({ joy, lw, rw, onJoyChange }) {
|
|
161
|
+
return (_jsx(Box, { sx: { position: 'absolute', bottom: 16, left: 16, zIndex: 20 }, children: _jsx(Joystick, { joy: joy, lw: lw, rw: rw, onJoyChange: onJoyChange, size: 180 }) }));
|
|
162
|
+
}
|
|
163
|
+
// ─── Toolbar (top-right) ──────────────────────────────────────────────────────
|
|
164
|
+
/**
|
|
165
|
+
* @component Toolbar
|
|
166
|
+
* @description Renders a toolbar with various controls for the visualizer.
|
|
167
|
+
* @remarks
|
|
168
|
+
* This component displays a toolbar in the top-right corner of the visualizer, containing buttons for resetting the view, toggling follow mode, opening the controls drawer, and showing information about the visualizer. It uses Material-UI components for styling and layout, and interacts with the Redux store to read and update the application state.
|
|
169
|
+
* @see {@link InfoPopover} for the information popover component.
|
|
170
|
+
* @see {@link useSceneContext} for accessing scene context values.
|
|
171
|
+
* @see {@link useHudBtnSx} for button styling.
|
|
172
|
+
* @example
|
|
173
|
+
* <Toolbar />
|
|
174
|
+
*/
|
|
175
|
+
export function Toolbar() {
|
|
176
|
+
const theme = useTheme();
|
|
177
|
+
const showControls = useAppSelector(state => state.visualization.showControls);
|
|
178
|
+
const activeSceneId = useAppSelector(selectActiveScene);
|
|
179
|
+
const { viewOffset, userScale, resetView, onOpenControlsDrawer, followLocalGrid, onToggleFollowLocalGrid } = useSceneContext();
|
|
180
|
+
const hudBtnSx = useHudBtnSx();
|
|
181
|
+
const [infoAnchor, setInfoAnchor] = React.useState(null);
|
|
182
|
+
const hasViewMoved = viewOffset.x !== 0 || viewOffset.y !== 0 || userScale !== 1;
|
|
183
|
+
return (_jsxs(_Fragment, { children: [_jsxs(Stack, { direction: "row", spacing: 1, sx: { position: 'absolute', top: 16, right: 16, zIndex: 20 }, children: [_jsx(Tooltip, { title: "Reset view", placement: "bottom", children: _jsx(IconButton, { onClick: resetView, sx: { ...hudBtnSx, color: hasViewMoved && !followLocalGrid ? theme.palette.sim.manual : theme.palette.gui.muted }, children: _jsx(RestartAltIcon, { fontSize: "small" }) }) }), activeSceneId === 'mapping' && (_jsx(Tooltip, { title: followLocalGrid ? 'Stop following vessel' : 'Follow vessel', placement: "bottom", children: _jsx(IconButton, { onClick: onToggleFollowLocalGrid, sx: { ...hudBtnSx, color: followLocalGrid ? theme.palette.status.primary.autonomous : theme.palette.gui.muted }, children: followLocalGrid ? _jsx(GpsFixedIcon, { fontSize: "small" }) : _jsx(GpsNotFixedIcon, { fontSize: "small" }) }) })), showControls && (_jsx(Tooltip, { title: "Controls", placement: "bottom", children: _jsx(IconButton, { onClick: onOpenControlsDrawer, sx: { ...hudBtnSx, color: theme.palette.water.highlight }, children: _jsx(TuneIcon, { fontSize: "small" }) }) })), _jsx(Tooltip, { title: "About this visualizer", placement: "bottom", children: _jsx(IconButton, { onClick: (e) => setInfoAnchor(infoAnchor ? null : e.currentTarget), sx: { ...hudBtnSx, color: infoAnchor ? theme.palette.water.highlight : theme.palette.gui.muted }, children: _jsx(InfoOutlinedIcon, { fontSize: "small" }) }) })] }), _jsx(InfoPopover, { anchor: infoAnchor, onClose: () => setInfoAnchor(null) })] }));
|
|
184
|
+
}
|
|
185
|
+
// ─── Fullscreen button (bottom-right) ────────────────────────────────────────
|
|
186
|
+
/**
|
|
187
|
+
* @component LegendPanel
|
|
188
|
+
* @description Renders a fullscreen toggle button in the bottom-right corner of the visualizer.
|
|
189
|
+
* @remarks
|
|
190
|
+
* This component displays a button that allows users to toggle fullscreen mode for the visualizer. It uses the scene context to determine whether the visualizer is currently in fullscreen mode and provides a callback function to toggle the state.
|
|
191
|
+
* @see {@link useSceneContext} for accessing scene context values.
|
|
192
|
+
*/
|
|
193
|
+
export function LegendPanel() {
|
|
194
|
+
const theme = useTheme();
|
|
195
|
+
const { isFullscreen, onToggleFullscreen } = useSceneContext();
|
|
196
|
+
const hudBtnSx = useHudBtnSx();
|
|
197
|
+
return (_jsx(Box, { sx: { position: 'absolute', bottom: 16, right: 16, zIndex: 20 }, children: _jsx(IconButton, { onClick: onToggleFullscreen, sx: { ...hudBtnSx, color: isFullscreen ? theme.palette.water.highlight : theme.palette.gui.muted }, title: isFullscreen ? 'Exit Fullscreen' : 'Fullscreen (landscape)', children: isFullscreen ? _jsx(FullscreenExitIcon, { fontSize: "small" }) : _jsx(FullscreenIcon, { fontSize: "small" }) }) }));
|
|
198
|
+
}
|
|
199
|
+
// ─── Connecting spinner overlay ───────────────────────────────────────────────
|
|
200
|
+
/**
|
|
201
|
+
* @component ConnectingOverlay
|
|
202
|
+
* @description Renders a semi-transparent overlay with the animated connecting porthole when the connection status is "connecting".
|
|
203
|
+
* @remarks
|
|
204
|
+
* This component displays a semi-transparent overlay with the self-animating `connecting.svg` porthole in the center of the visualizer when the connection status is "connecting". It uses the Redux store to read the current connection status and conditionally renders the overlay based on that state.
|
|
205
|
+
* @see {@link useAppSelector} for accessing Redux store state.
|
|
206
|
+
*/
|
|
207
|
+
export function ConnectingOverlay() {
|
|
208
|
+
const theme = useTheme();
|
|
209
|
+
const connectionStatus = useAppSelector(state => state.connection.status);
|
|
210
|
+
if (connectionStatus !== 'connecting')
|
|
211
|
+
return null;
|
|
212
|
+
return (_jsx(Box, { sx: { position: 'absolute', inset: 0, zIndex: 19, display: 'flex', alignItems: 'center', justifyContent: 'center', bgcolor: alpha(theme.palette.scene.skyDark, 0.55), backdropFilter: 'blur(4px)' }, children: _jsx(Box, { component: "img", src: connectingSvg, alt: "Connecting to ASV", sx: { width: 160, height: 160 } }) }));
|
|
213
|
+
}
|
|
214
|
+
// Re-export InteractiveCompass for any consumers that import it from here
|
|
215
|
+
export { InteractiveCompass };
|
|
216
|
+
//# sourceMappingURL=SceneHUD.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SceneHUD.js","sourceRoot":"","sources":["../../../src/components/hud/SceneHUD.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,eAAe,EAAY,MAAM,OAAO,CAAC;AAClE,OAAO,EACH,GAAG,EAAE,IAAI,IAAI,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,gBAAgB,EACpF,gBAAgB,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,KAAK,GAC5D,MAAM,eA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AAC,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,cAAc,EAAE,WAAW,EAAE,YAEpM,KAAC,GAAG,IAAC,SAAS,EAAC,KAAK,EAAC,GAAG,EAAE,aAAa,EAAE,GAAG,EAAC,mBAAmB,EAAC,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,GAAI,GAClG,CACT,CAAC;AACN,CAAC;AAED,0EAA0E;AAC1E,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file Batteries.tsx
|
|
3
|
+
* @description Shows battery information for the ASV. It displays two battery
|
|
4
|
+
* levels: one for the motors and one for the power system.
|
|
5
|
+
*
|
|
6
|
+
* @author Carson Fujita
|
|
7
|
+
* @license MIT
|
|
8
|
+
*
|
|
9
|
+
* @remarks
|
|
10
|
+
* - Display motor battery level as a percentage with a visual indicator
|
|
11
|
+
* (e.g., battery icon).
|
|
12
|
+
* - Display power system battery level as a percentage with a visual indicator
|
|
13
|
+
* (e.g., battery icon).
|
|
14
|
+
* - Use color coding to indicate battery status
|
|
15
|
+
* (green = good, yellow = warning, red = critical).
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```tsx
|
|
19
|
+
* <Batteries />
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* Displays the battery levels for the ASV's motors and power system.
|
|
24
|
+
*
|
|
25
|
+
* @author Carson Fujita
|
|
26
|
+
* @returns A React element that displays the battery levels for the ASV's motors and power system.
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* - The component uses the `useSelector` hook to access the motor and power battery levels from the Redux store.
|
|
30
|
+
* - It calculates the average battery level for both the motors and power system.
|
|
31
|
+
* - The battery levels are displayed as percentages with corresponding battery icons that visually represent the charge level.
|
|
32
|
+
* - Color coding is used to indicate the status of the batteries (green for good, yellow for warning, red for critical).
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```tsx
|
|
36
|
+
* <Batteries />
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export default function Batteries(): import("react").JSX.Element;
|
|
40
|
+
//# sourceMappingURL=Batteries.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Batteries.d.ts","sourceRoot":"","sources":["../../../../src/components/hud/telemetry/Batteries.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAiCH;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,gCA2GhC"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* @file Batteries.tsx
|
|
4
|
+
* @description Shows battery information for the ASV. It displays two battery
|
|
5
|
+
* levels: one for the motors and one for the power system.
|
|
6
|
+
*
|
|
7
|
+
* @author Carson Fujita
|
|
8
|
+
* @license MIT
|
|
9
|
+
*
|
|
10
|
+
* @remarks
|
|
11
|
+
* - Display motor battery level as a percentage with a visual indicator
|
|
12
|
+
* (e.g., battery icon).
|
|
13
|
+
* - Display power system battery level as a percentage with a visual indicator
|
|
14
|
+
* (e.g., battery icon).
|
|
15
|
+
* - Use color coding to indicate battery status
|
|
16
|
+
* (green = good, yellow = warning, red = critical).
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* <Batteries />
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
/*
|
|
24
|
+
MIT License
|
|
25
|
+
|
|
26
|
+
Copyright (c) 2026 HumberASV
|
|
27
|
+
Copyright (c) 2026 Carson Fujita
|
|
28
|
+
|
|
29
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
30
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
31
|
+
in the Software without restriction, including without limitation the rights
|
|
32
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
33
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
34
|
+
furnished to do so, subject to the following conditions:
|
|
35
|
+
|
|
36
|
+
The above copyright notice and this permission notice shall be included in all
|
|
37
|
+
copies or substantial portions of the Software.
|
|
38
|
+
|
|
39
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
40
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
41
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
42
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
43
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
44
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
45
|
+
SOFTWARE.
|
|
46
|
+
*/
|
|
47
|
+
import { useSelector } from "react-redux";
|
|
48
|
+
import { Box, Typography, useTheme } from "@mui/material";
|
|
49
|
+
import { batteryIconFor } from "../../../utils/batteryUtil";
|
|
50
|
+
/**
|
|
51
|
+
* Displays the battery levels for the ASV's motors and power system.
|
|
52
|
+
*
|
|
53
|
+
* @author Carson Fujita
|
|
54
|
+
* @returns A React element that displays the battery levels for the ASV's motors and power system.
|
|
55
|
+
*
|
|
56
|
+
* @remarks
|
|
57
|
+
* - The component uses the `useSelector` hook to access the motor and power battery levels from the Redux store.
|
|
58
|
+
* - It calculates the average battery level for both the motors and power system.
|
|
59
|
+
* - The battery levels are displayed as percentages with corresponding battery icons that visually represent the charge level.
|
|
60
|
+
* - Color coding is used to indicate the status of the batteries (green for good, yellow for warning, red for critical).
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```tsx
|
|
64
|
+
* <Batteries />
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
export default function Batteries() {
|
|
68
|
+
const theme = useTheme();
|
|
69
|
+
const motorBatteries = useSelector((state) => state.telemetry.battery.motors);
|
|
70
|
+
const powerBatteries = useSelector((state) => state.telemetry.battery.primary);
|
|
71
|
+
const getBatteryColor = (level) => {
|
|
72
|
+
if (level > 60)
|
|
73
|
+
return theme.palette.success.main;
|
|
74
|
+
if (level > 30)
|
|
75
|
+
return theme.palette.warning.main;
|
|
76
|
+
return theme.palette.error.main;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* The battery card component displays a single battery level with an icon and percentage text.
|
|
80
|
+
* It uses absolute positioning to overlay the percentage text on top of the battery icon,
|
|
81
|
+
* and it applies color coding based on the battery level.
|
|
82
|
+
* @param props {@link BatteryCardProps} containing the battery level and optional transformY for positioning
|
|
83
|
+
* @returns the battery card component
|
|
84
|
+
*/
|
|
85
|
+
const BatteryCard = (props) => {
|
|
86
|
+
const { level, transformY } = props;
|
|
87
|
+
const Icon = batteryIconFor(level);
|
|
88
|
+
const color = getBatteryColor(level);
|
|
89
|
+
return (_jsxs(Box, { sx: {
|
|
90
|
+
position: "relative",
|
|
91
|
+
display: "flex",
|
|
92
|
+
alignItems: "center",
|
|
93
|
+
justifyContent: "center",
|
|
94
|
+
//Fixed height and width to prevent layout shift
|
|
95
|
+
height: "80px",
|
|
96
|
+
width: "80px",
|
|
97
|
+
backgroundColor: theme.palette.telemetry?.background.empty,
|
|
98
|
+
border: theme.palette.telemetry?.border.lightest
|
|
99
|
+
}, children: [_jsx(Icon, { sx: {
|
|
100
|
+
fontSize: 80,
|
|
101
|
+
padding: 0,
|
|
102
|
+
margin: 0,
|
|
103
|
+
color,
|
|
104
|
+
position: "absolute",
|
|
105
|
+
top: "50%",
|
|
106
|
+
left: "50%",
|
|
107
|
+
transform: "translate(-50%, -50%) rotate(90deg)" + (transformY ? ` translateX(${transformY})` : ""),
|
|
108
|
+
transformOrigin: "center center",
|
|
109
|
+
} }), _jsxs(Typography, { variant: "caption", sx: {
|
|
110
|
+
position: "absolute",
|
|
111
|
+
inset: 0,
|
|
112
|
+
width: "100%",
|
|
113
|
+
height: "100%",
|
|
114
|
+
display: "flex",
|
|
115
|
+
alignItems: "center",
|
|
116
|
+
justifyContent: "center",
|
|
117
|
+
textAlign: "center",
|
|
118
|
+
fontSize: "15px",
|
|
119
|
+
transform: transformY ? `translateY(${transformY})` : "none",
|
|
120
|
+
fontWeight: 700,
|
|
121
|
+
color: theme.palette.text.primary,
|
|
122
|
+
lineHeight: 1,
|
|
123
|
+
pointerEvents: "none",
|
|
124
|
+
zIndex: 1,
|
|
125
|
+
}, children: [Math.round(level), "%"] })] }));
|
|
126
|
+
};
|
|
127
|
+
return (_jsx(Box, { sx: { position: "relative", maxWidth: "80px", maxHeight: "100px", height: "100%", margin: "0 auto", padding: 1 }, children: _jsxs(Box, { sx: {
|
|
128
|
+
position: "relative",
|
|
129
|
+
zIndex: 1,
|
|
130
|
+
display: "flex",
|
|
131
|
+
flexDirection: "column",
|
|
132
|
+
gap: 0.25,
|
|
133
|
+
alignItems: "center",
|
|
134
|
+
justifyContent: "center",
|
|
135
|
+
}, children: [_jsx(BatteryCard, { level: motorBatteries, transformY: "-25%" }), _jsx(BatteryCard, { level: powerBatteries, transformY: "-75%" })] }) }));
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=Batteries.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Batteries.js","sourceRoot":"","sources":["../../../../src/components/hud/telemetry/Batteries.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH;;;;;;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