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,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file ShipRudderVisualizerPanel.tsx
|
|
3
|
+
* @description Redux-connected wrapper around {@link ShipRudderVisualizer}.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* Selects port/starboard motor power from `telemetry.motors` and the rudder
|
|
7
|
+
* angle from `telemetry.rudder`. Follows the same panel pattern as the other
|
|
8
|
+
* hud/telemetry components.
|
|
9
|
+
*
|
|
10
|
+
* @author Carson Fujita
|
|
11
|
+
* @license MIT
|
|
12
|
+
*/
|
|
13
|
+
import React from 'react';
|
|
14
|
+
/** Properties for the {@link ShipRudderVisualizerPanel} component. */
|
|
15
|
+
export interface ShipRudderVisualizerPanelProps {
|
|
16
|
+
/** Maximum rudder deflection in degrees. Defaults to 30. */
|
|
17
|
+
maxRudderDeg?: number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* @function ShipRudderVisualizerPanel
|
|
21
|
+
* @description Feeds live telemetry (motor power, rudder angle) into the
|
|
22
|
+
* presentational {@link ShipRudderVisualizer}.
|
|
23
|
+
*/
|
|
24
|
+
export declare const ShipRudderVisualizerPanel: React.FC<ShipRudderVisualizerPanelProps>;
|
|
25
|
+
export default ShipRudderVisualizerPanel;
|
|
26
|
+
//# sourceMappingURL=ShipRudderVisualizerPanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShipRudderVisualizerPanel.d.ts","sourceRoot":"","sources":["../../../../src/components/hud/telemetry/ShipRudderVisualizerPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,sEAAsE;AACtE,MAAM,WAAW,8BAA8B;IAC3C,4DAA4D;IAC5D,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,EAAE,KAAK,CAAC,EAAE,CAAC,8BAA8B,CAa9E,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* @file ShipRudderVisualizerPanel.tsx
|
|
4
|
+
* @description Redux-connected wrapper around {@link ShipRudderVisualizer}.
|
|
5
|
+
*
|
|
6
|
+
* @remarks
|
|
7
|
+
* Selects port/starboard motor power from `telemetry.motors` and the rudder
|
|
8
|
+
* angle from `telemetry.rudder`. Follows the same panel pattern as the other
|
|
9
|
+
* hud/telemetry components.
|
|
10
|
+
*
|
|
11
|
+
* @author Carson Fujita
|
|
12
|
+
* @license MIT
|
|
13
|
+
*/
|
|
14
|
+
import React from 'react';
|
|
15
|
+
import { useSelector } from 'react-redux';
|
|
16
|
+
import ShipRudderVisualizer from './ShipRudderVisualizer';
|
|
17
|
+
/**
|
|
18
|
+
* @function ShipRudderVisualizerPanel
|
|
19
|
+
* @description Feeds live telemetry (motor power, rudder angle) into the
|
|
20
|
+
* presentational {@link ShipRudderVisualizer}.
|
|
21
|
+
*/
|
|
22
|
+
export const ShipRudderVisualizerPanel = ({ maxRudderDeg }) => {
|
|
23
|
+
const portPower = useSelector((state) => state.telemetry.motors.left);
|
|
24
|
+
const stbdPower = useSelector((state) => state.telemetry.motors.right);
|
|
25
|
+
const rudderAngle = useSelector((state) => state.telemetry.rudder.angle);
|
|
26
|
+
return (_jsx(ShipRudderVisualizer, { portPower: portPower, stbdPower: stbdPower, rudderAngle: rudderAngle, maxRudderDeg: maxRudderDeg }));
|
|
27
|
+
};
|
|
28
|
+
export default ShipRudderVisualizerPanel;
|
|
29
|
+
//# sourceMappingURL=ShipRudderVisualizerPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShipRudderVisualizerPanel.js","sourceRoot":"","sources":["../../../../src/components/hud/telemetry/ShipRudderVisualizerPanel.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,oBAAoB,MAAM,wBAAwB,CAAC;AAQ1D;;;;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAA6C,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE;IACpG,MAAM,SAAS,GAAG,WAAW,CAAC,CAAC,KAAgB,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACjF,MAAM,SAAS,GAAG,WAAW,CAAC,CAAC,KAAgB,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAClF,MAAM,WAAW,GAAG,WAAW,CAAC,CAAC,KAAgB,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAEpF,OAAO,CACH,KAAC,oBAAoB,IACjB,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,EACxB,YAAY,EAAE,YAAY,GAC5B,CACL,CAAC;AACN,CAAC,CAAC;AAEF,eAAe,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignalLog.d.ts","sourceRoot":"","sources":["../../../../src/components/hud/telemetry/SignalLog.tsx"],"names":[],"mappings":"AAWA,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CA2C7E,CAAA;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* @file SignalLog.tsx
|
|
4
|
+
* @description Displays the recent task logs along with the current signal strength.
|
|
5
|
+
* The signal strength is visually represented by a colored icon and percentage.
|
|
6
|
+
*/
|
|
7
|
+
import { Box, Typography } from "@mui/material";
|
|
8
|
+
import SignalCellularAltIcon from "@mui/icons-material/SignalCellularAlt";
|
|
9
|
+
import { useSelector } from "react-redux";
|
|
10
|
+
import { useMemo } from "react";
|
|
11
|
+
const SignalLog = ({ width, height, textAlign }) => {
|
|
12
|
+
const align = textAlign || "left";
|
|
13
|
+
const signalStrength = useSelector((state) => state.telemetry.signal.strength);
|
|
14
|
+
const taskLog = useSelector((state) => state.telemetry.task.log);
|
|
15
|
+
const recentLogs = useMemo(() => [...taskLog].reverse().slice(0, 10), [taskLog]);
|
|
16
|
+
const getSignalColor = () => {
|
|
17
|
+
if (signalStrength > 75)
|
|
18
|
+
return "#10b981";
|
|
19
|
+
if (signalStrength > 50)
|
|
20
|
+
return "#eab308";
|
|
21
|
+
if (signalStrength > 25)
|
|
22
|
+
return "#f97316";
|
|
23
|
+
return "#ef4444";
|
|
24
|
+
};
|
|
25
|
+
return (_jsxs(Box, { sx: { width, height, display: "flex", flexDirection: "column", gap: 1 }, children: [_jsxs(Box, { sx: { display: "flex", alignItems: "center", justifyContent: "space-between", px: 1 }, children: [_jsx(Typography, { variant: "subtitle2", sx: { color: "#9ca3af", fontWeight: 700 }, children: "Log" }), _jsxs(Box, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [_jsx(SignalCellularAltIcon, { sx: { color: getSignalColor(), fontSize: 20 } }), _jsxs(Typography, { variant: "caption", sx: { color: getSignalColor(), fontWeight: 700 }, children: [Math.round(signalStrength), "%"] })] })] }), _jsx(Box, { sx: { flex: 1, overflow: "auto", px: 1 }, children: recentLogs.length > 0 ? (recentLogs.map((log, idx) => (_jsxs(Typography, { variant: "body2", sx: { color: "#e6eef8", fontSize: 12, mb: 0.5, textAlign: align }, children: ["\u2022 ", log] }, idx)))) : (_jsx(Typography, { variant: "body2", sx: { color: "#9ca3af", fontSize: 12 }, children: "No log entries" })) })] }));
|
|
26
|
+
};
|
|
27
|
+
export default SignalLog;
|
|
28
|
+
//# sourceMappingURL=SignalLog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignalLog.js","sourceRoot":"","sources":["../../../../src/components/hud/telemetry/SignalLog.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AACH,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,qBAAqB,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAEhC,MAAM,SAAS,GAAmE,CAAC,EAAC,KAAK,EAAE,MAAM,EAAE,SAAS,EAAC,EAAE,EAAE;IAC/G,MAAM,KAAK,GAAG,SAAS,IAAI,MAAM,CAAC;IAClC,MAAM,cAAc,GAAG,WAAW,CAAC,CAAC,KAAgB,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC1F,MAAM,OAAO,GAAG,WAAW,CAAC,CAAC,KAAgB,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAE5E,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEjF,MAAM,cAAc,GAAG,GAAG,EAAE;QAC1B,IAAI,cAAc,GAAG,EAAE;YAAE,OAAO,SAAS,CAAC;QAC1C,IAAI,cAAc,GAAG,EAAE;YAAE,OAAO,SAAS,CAAC;QAC1C,IAAI,cAAc,GAAG,EAAE;YA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EAAE,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,wBAClG,GAAG,KADS,GAAG,CAEP,CACd,CAAC,CACH,CAAC,CAAC,CAAC,CACF,KAAC,UAAU,IAAC,OAAO,EAAC,OAAO,EAAC,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,+BAErD,CACd,GACG,IACF,CACP,CAAC;AACJ,CAAC,CAAA;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file SignalStrength.tsx
|
|
3
|
+
* @description A component that visually represents the current signal strength using bars and an optional percentage value.
|
|
4
|
+
*/
|
|
5
|
+
export default function SignalStrength({ size, showValue }: {
|
|
6
|
+
size?: number;
|
|
7
|
+
showValue?: boolean;
|
|
8
|
+
}): import("react").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=SignalStrength.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignalStrength.d.ts","sourceRoot":"","sources":["../../../../src/components/hud/telemetry/SignalStrength.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AA8BH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAAC,IAAI,EAAE,SAAS,EAAC,EAAE;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAA;CAAC,+BAqC7F"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* @file SignalStrength.tsx
|
|
4
|
+
* @description A component that visually represents the current signal strength using bars and an optional percentage value.
|
|
5
|
+
*/
|
|
6
|
+
/*
|
|
7
|
+
MIT License
|
|
8
|
+
|
|
9
|
+
Copyright (c) 2026 HumberASV
|
|
10
|
+
Copyright (c) 2026 Carson Fujita
|
|
11
|
+
|
|
12
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
13
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
14
|
+
in the Software without restriction, including without limitation the rights
|
|
15
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
16
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
17
|
+
furnished to do so, subject to the following conditions:
|
|
18
|
+
|
|
19
|
+
The above copyright notice and this permission notice shall be included in all
|
|
20
|
+
copies or substantial portions of the Software.
|
|
21
|
+
|
|
22
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
23
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
24
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
25
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
26
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
27
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
28
|
+
SOFTWARE.
|
|
29
|
+
*/
|
|
30
|
+
import { useSelector } from "react-redux";
|
|
31
|
+
import { Box, Typography } from "@mui/material";
|
|
32
|
+
export default function SignalStrength({ size, showValue }) {
|
|
33
|
+
const barSize = size || 10;
|
|
34
|
+
const signalStrength = useSelector((state) => state.telemetry.signal.strength);
|
|
35
|
+
// Calculate signal bars (0-4 bars based on 0-100 strength)
|
|
36
|
+
const signalBars = Math.ceil((signalStrength / 100) * 4);
|
|
37
|
+
const getSignalColor = () => {
|
|
38
|
+
if (signalStrength > 75)
|
|
39
|
+
return "#10b981"; // Green
|
|
40
|
+
if (signalStrength > 50)
|
|
41
|
+
return "#eab308"; // Yellow
|
|
42
|
+
if (signalStrength > 25)
|
|
43
|
+
return "#f97316"; // Orange
|
|
44
|
+
return "#ef4444"; // Red
|
|
45
|
+
};
|
|
46
|
+
return (_jsxs(Box, { sx: { display: "flex", alignItems: "center", gap: "4px", flexDirection: "column" }, children: [_jsx(Box, { sx: { display: "flex", gap: "2px", justifyContent: "center", alignItems: "flex-end" }, children: [1, 2, 3, 4].map((bar) => (_jsx(Box, { sx: {
|
|
47
|
+
width: `${barSize}px`,
|
|
48
|
+
height: `${bar * barSize}px`,
|
|
49
|
+
backgroundColor: bar <= signalBars ? getSignalColor() : "#d1d5db",
|
|
50
|
+
borderRadius: "2px",
|
|
51
|
+
} }, bar))) }), showValue && (_jsxs(Typography, { variant: "caption", sx: { fontSize: "10px", color: "#6b7280" }, children: [Math.round(signalStrength), "%"] }))] }));
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=SignalStrength.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignalStrength.js","sourceRoot":"","sources":["../../../../src/components/hud/telemetry/SignalStrength.tsx"],"names":[],"mappings":";AAAA;;;GAGG;AACH;;;;;;;;;;;;;;;;;;;;;;;EAuBE;AAEF,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAAC,IAAI,EAAE,SAAS,EAAuC;IAC7F,MAAM,OAAO,GAAG,IAAI,IAAI,EAAE,CAAC;IAC3B,MAAM,cAAc,GAAG,WAAW,CAAC,CAAC,KAAgB,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAE1F,2DAA2D;IAC3D,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,cAAc,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;IAEzD,MAAM,cAAc,GAAG,GAAG,EAAE;QAC3B,IAAI,cAAc,GAAG,EAAE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],"mappings":"AA6BA,MAAM,CAAC,OAAO,UAAU,WAAW,gCA6DlC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/*
|
|
3
|
+
MIT License
|
|
4
|
+
|
|
5
|
+
Copyright (c) 2026 HumberASV
|
|
6
|
+
Copyright (c) 2026 Carson Fujita
|
|
7
|
+
|
|
8
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
in the Software without restriction, including without limitation the rights
|
|
11
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
furnished to do so, subject to the following conditions:
|
|
14
|
+
|
|
15
|
+
The above copyright notice and this permission notice shall be included in all
|
|
16
|
+
copies or substantial portions of the Software.
|
|
17
|
+
|
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
+
SOFTWARE.
|
|
25
|
+
*/
|
|
26
|
+
import { useSelector } from "react-redux";
|
|
27
|
+
import { Box, Typography } from "@mui/material";
|
|
28
|
+
import { useTheme } from "@mui/material/styles";
|
|
29
|
+
export default function Speedometer() {
|
|
30
|
+
const theme = useTheme();
|
|
31
|
+
const speed = useSelector((state) => state.telemetry.asv.speed);
|
|
32
|
+
// Determine gauge color based on speed
|
|
33
|
+
const getGaugeColor = () => {
|
|
34
|
+
if (speed < 1)
|
|
35
|
+
return "#3b82f6"; // Blue - slow
|
|
36
|
+
if (speed < 3)
|
|
37
|
+
return "#10b981"; // Green - moderate
|
|
38
|
+
if (speed < 4)
|
|
39
|
+
return "#eab308"; // Yellow - fast
|
|
40
|
+
return "#ef4444"; // Red - very fast
|
|
41
|
+
};
|
|
42
|
+
return (_jsxs(Box, { sx: {
|
|
43
|
+
// Width is 5 characters
|
|
44
|
+
width: "8rem",
|
|
45
|
+
borderRadius: 2,
|
|
46
|
+
height: "100%",
|
|
47
|
+
backgroundColor: theme.palette.telemetry?.background.primary,
|
|
48
|
+
border: `1px solid ${theme.palette.telemetry?.border.light}`,
|
|
49
|
+
padding: "10px",
|
|
50
|
+
display: "flex",
|
|
51
|
+
flexDirection: "column",
|
|
52
|
+
gap: "3px",
|
|
53
|
+
minHeight: "100px",
|
|
54
|
+
}, children: [_jsx(Typography, { variant: "h4", sx: {
|
|
55
|
+
textAlign: "center",
|
|
56
|
+
fontWeight: "bold",
|
|
57
|
+
color: getGaugeColor(),
|
|
58
|
+
fontSize: "45px",
|
|
59
|
+
}, children: speed.toFixed(2) }), _jsx(Box, { sx: { textAlign: "center",
|
|
60
|
+
flex: 1,
|
|
61
|
+
display: "flex",
|
|
62
|
+
alignItems: "center",
|
|
63
|
+
justifyContent: "center"
|
|
64
|
+
}, children: _jsx(Typography, { sx: {
|
|
65
|
+
color: theme.palette.text.primary,
|
|
66
|
+
fontSize: "17px",
|
|
67
|
+
marginLeft: "4px",
|
|
68
|
+
}, children: "m/s" }) })] }));
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=Speedometer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Speedometer.js","sourceRoot":"","sources":["../../../../src/components/hud/telemetry/Speedometer.tsx"],"names":[],"mappings":";AAAA;;;;;;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AAK,EAAE,aAAa,EAAE;oBACtB,QAAQ,EAAE,MAAM;iBAChB,YAEA,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,GACL,EAGb,KAAC,GAAG,IAAC,EAAE,EAAE,EAAE,SAAS,EAAE,QAAQ;oBAC7B,IAAI,EAAE,CAAC;oBACP,OAAO,EAAE,MAAM;oBACf,UAAU,EAAE,QAAQ;oBACpB,cAAc,EAAE,QAAQ;iBACxB,YAEA,KAAC,UAAU,IACV,EAAE,EAAE;wBACH,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO;wBACjC,QAAQ,EAAE,MAAM;wBAChB,UAAU,EAAE,KAAK;qBACjB,oBAGW,GACR,IACD,CACN,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Task.d.ts","sourceRoot":"","sources":["../../../../src/components/hud/telemetry/Task.tsx"],"names":[],"mappings":"AA8BA,MAAM,CAAC,OAAO,UAAU,IAAI,gCAmD3B"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/*
|
|
3
|
+
|
|
4
|
+
MIT License
|
|
5
|
+
|
|
6
|
+
Copyright (c) 2026 HumberASV
|
|
7
|
+
Copyright (c) 2026 Carson Fujita
|
|
8
|
+
|
|
9
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
11
|
+
in the Software without restriction, including without limitation the rights
|
|
12
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
13
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
14
|
+
furnished to do so, subject to the following conditions:
|
|
15
|
+
|
|
16
|
+
The above copyright notice and this permission notice shall be included in all
|
|
17
|
+
copies or substantial portions of the Software.
|
|
18
|
+
|
|
19
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
20
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
21
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
22
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
23
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
24
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
25
|
+
SOFTWARE.
|
|
26
|
+
*/
|
|
27
|
+
import { useSelector } from "react-redux";
|
|
28
|
+
import { Box, Typography } from "@mui/material";
|
|
29
|
+
import { useTheme } from "@mui/material/styles";
|
|
30
|
+
export default function Task() {
|
|
31
|
+
const theme = useTheme();
|
|
32
|
+
const taskData = useSelector((state) => state.telemetry.task.data);
|
|
33
|
+
return (_jsxs(Box, { sx: {
|
|
34
|
+
width: "100%",
|
|
35
|
+
height: "100%",
|
|
36
|
+
backgroundColor: theme.palette.telemetry?.background.primary,
|
|
37
|
+
border: `1px solid ${theme.palette.telemetry?.border.light}`,
|
|
38
|
+
borderRadius: "10px",
|
|
39
|
+
padding: "1px",
|
|
40
|
+
display: "flex",
|
|
41
|
+
flexDirection: "column",
|
|
42
|
+
gap: "1px",
|
|
43
|
+
justifyContent: "center",
|
|
44
|
+
minHeight: "100px",
|
|
45
|
+
}, children: [_jsx(Typography, { variant: "caption", sx: {
|
|
46
|
+
textAlign: "center",
|
|
47
|
+
fontWeight: "bold",
|
|
48
|
+
color: theme.palette.text.primary,
|
|
49
|
+
fontSize: "10px",
|
|
50
|
+
textTransform: "uppercase",
|
|
51
|
+
}, children: "Task" }), _jsx(Typography, { variant: "h6", sx: {
|
|
52
|
+
textAlign: "center",
|
|
53
|
+
fontWeight: "bold",
|
|
54
|
+
color: theme.palette.text.primary,
|
|
55
|
+
fontSize: "16px",
|
|
56
|
+
overflow: "hidden",
|
|
57
|
+
textOverflow: "ellipsis",
|
|
58
|
+
whiteSpace: "nowrap",
|
|
59
|
+
}, children: taskData?.name || "No task assigned" })] }));
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=Task.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Task.js","sourceRoot":"","sources":["../../../../src/components/hud/telemetry/Task.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;EAwBE;AAEF,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,MAAM,CAAC,OAAO,UAAU,IAAI;IAC3B,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,KAAgB,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAE9E,OAAO,CACN,MAAC,GAAG,IACH,EAAE,EAAE;YACH,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,MAAM;YACd,eAAe,EAAE,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,UAAU,CAAC,OAAO;YAC5D,MAAM,EAAE,aAAa,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,KAAK,EAAE;YAC5D,YAAY,EAAE,MAAM;YACpB,OAAO,EAAE,KAAK;YACd,OAAO,EAAE,MAAM;YACf,aAAa,EAAE,QAAQ;YACvB,GAAG,EAAE,KAAK;YACV,cAAc,EAAE,QAAQ;YACxB,SAAS,EAAE,OAAO;SAClB,aAGD,KAAC,UAAU,IACV,OAAO,EAAC,SAAS,EACjB,EAAE,EAAE;oBACH,SAAS,EAAE,QAAQ;oBACnB,UAAU,EAAE,MAAM;oBAClB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO;oBACjC,QAAQ,EAAE,MAAM;oBAChB,aAAa,EAAE,WAAW;iBAC1B,qBAGW,EAGb,KAAC,UAAU,IACV,OAAO,EAAC,IAAI,EACZ,EAAE,EAAE;oBACH,SAAS,EAAE,QAAQ;oBACnB,UAAU,EAAE,MAAM;oBAClB,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO;oBACjC,QAAQ,EAAE,MAAM;oBAChB,QAAQ,EAAE,QAAQ;oBAClB,YAAY,EAAE,UAAU;oBACxB,UAAU,EAAE,QAAQ;iBACpB,YAEA,QAAQ,EAAE,IAAI,IAAI,kBAAkB,GACzB,IACR,CACN,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskData.d.ts","sourceRoot":"","sources":["../../../../src/components/hud/telemetry/TaskData.tsx"],"names":[],"mappings":"AA8CA,MAAM,CAAC,OAAO,UAAU,QAAQ,gCAwG/B"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/*
|
|
3
|
+
MIT License
|
|
4
|
+
|
|
5
|
+
Copyright (c) 2026 HumberASV
|
|
6
|
+
Copyright (c) 2026 Carson Fujita
|
|
7
|
+
|
|
8
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
in the Software without restriction, including without limitation the rights
|
|
11
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
furnished to do so, subject to the following conditions:
|
|
14
|
+
|
|
15
|
+
The above copyright notice and this permission notice shall be included in all
|
|
16
|
+
copies or substantial portions of the Software.
|
|
17
|
+
|
|
18
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
+
SOFTWARE.
|
|
25
|
+
*/
|
|
26
|
+
import { useSelector } from "react-redux";
|
|
27
|
+
import { Box, Typography, Chip } from "@mui/material";
|
|
28
|
+
import { useTheme } from "@mui/material/styles";
|
|
29
|
+
const fmt = (n) => n.toFixed(2);
|
|
30
|
+
function DataRow({ label, value }) {
|
|
31
|
+
const theme = useTheme();
|
|
32
|
+
return (_jsxs(Box, { sx: { display: "flex", gap: "4px", alignItems: "baseline" }, children: [_jsx(Typography, { sx: { fontSize: "9px", color: theme.palette.telemetry?.text.secondary, minWidth: 60 }, children: label }), _jsx(Typography, { sx: { fontSize: "10px", color: theme.palette.telemetry?.text.primary, fontFamily: "monospace" }, children: value })] }));
|
|
33
|
+
}
|
|
34
|
+
export default function TaskData() {
|
|
35
|
+
const theme = useTheme();
|
|
36
|
+
const taskData = useSelector((state) => state.telemetry.task.data);
|
|
37
|
+
const zed = useSelector((state) => state.telemetry.zed);
|
|
38
|
+
const getStatusColor = (status) => {
|
|
39
|
+
switch (status) {
|
|
40
|
+
case "autonomous": return "success";
|
|
41
|
+
case "remote": return "info";
|
|
42
|
+
case "standby": return "warning";
|
|
43
|
+
case "out of control": return "error";
|
|
44
|
+
default: return "default";
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
const sectionLabel = (text) => (_jsx(Typography, { sx: { fontSize: "9px", fontWeight: "bold", color: theme.palette.telemetry?.text.secondary, textTransform: "uppercase", mt: 0.5 }, children: text }));
|
|
48
|
+
return (_jsxs(Box, { sx: {
|
|
49
|
+
width: "100%",
|
|
50
|
+
height: "100%",
|
|
51
|
+
backgroundColor: theme.palette.telemetry?.background.primary,
|
|
52
|
+
border: `2px solid ${theme.palette.telemetry?.border.light}`,
|
|
53
|
+
borderRadius: "8px",
|
|
54
|
+
padding: "12px",
|
|
55
|
+
display: "flex",
|
|
56
|
+
flexDirection: "column",
|
|
57
|
+
gap: "6px",
|
|
58
|
+
minHeight: "120px",
|
|
59
|
+
overflowY: "auto",
|
|
60
|
+
}, children: [_jsx(Typography, { variant: "caption", sx: { fontWeight: "bold", color: theme.palette.telemetry?.text.primary, fontSize: "10px", textTransform: "uppercase" }, children: "Task Data" }), taskData ? (_jsxs(Box, { sx: { display: "flex", alignItems: "center", gap: "6px" }, children: [_jsx(Typography, { variant: "caption", sx: { fontSize: "10px", color: theme.palette.telemetry?.text.primary, fontWeight: "bold" }, children: "Status:" }), _jsx(Chip, { label: taskData.status || "Unknown", size: "small", color: getStatusColor(taskData.status), variant: "outlined", sx: { height: "20px", fontSize: "10px" } })] })) : (_jsx(Typography, { variant: "caption", sx: { color: theme.palette.telemetry?.text.secondary, fontSize: "10px" }, children: "No task data" })), sectionLabel("ZED Odometry"), _jsx(DataRow, { label: "pos x", value: fmt(zed.odom.position.x) }), _jsx(DataRow, { label: "pos y", value: fmt(zed.odom.position.y) }), _jsx(DataRow, { label: "pos z", value: fmt(zed.odom.position.z) }), _jsx(DataRow, { label: "roll", value: `${fmt(zed.odom.orientation.roll)}°` }), _jsx(DataRow, { label: "pitch", value: `${fmt(zed.odom.orientation.pitch)}°` }), _jsx(DataRow, { label: "yaw", value: `${fmt(zed.odom.orientation.yaw)}°` }), sectionLabel("ZED Camera"), _jsxs(Box, { sx: { display: "flex", alignItems: "center", gap: "6px" }, children: [_jsx(Typography, { sx: { fontSize: "9px", color: theme.palette.telemetry?.text.secondary, minWidth: 60 }, children: "active" }), _jsx(Box, { sx: { width: 8, height: 8, borderRadius: "50%", backgroundColor: zed.camera.active ? theme.palette.success.main : theme.palette.error.main } })] }), zed.camera.active && (_jsxs(_Fragment, { children: [_jsx(DataRow, { label: "resolution", value: `${zed.camera.width}×${zed.camera.height}` }), _jsx(DataRow, { label: "encoding", value: zed.camera.encoding || "—" })] })), sectionLabel(`Objects (${zed.objects.length})`), zed.objects.length === 0 ? (_jsx(Typography, { sx: { fontSize: "10px", color: theme.palette.telemetry?.text.secondary }, children: "None" })) : (zed.objects.map((obj, i) => (_jsxs(Box, { sx: { display: "flex", gap: "6px", alignItems: "baseline" }, children: [_jsx(Typography, { sx: { fontSize: "10px", color: theme.palette.telemetry?.text.primary, fontWeight: "bold", minWidth: 60 }, children: obj.label }), _jsxs(Typography, { sx: { fontSize: "9px", color: theme.palette.telemetry?.text.secondary, fontFamily: "monospace" }, children: [(obj.confidence * 100).toFixed(0), "% @ (", fmt(obj.position.x), ", ", fmt(obj.position.y), ", ", fmt(obj.position.z), ")"] })] }, i))))] }));
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=TaskData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TaskData.js","sourceRoot":"","sources":["../../../../src/components/hud/telemetry/TaskData.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;EAuBE;AAEF,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,MAAM,GAAG,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAExC,SAAS,OAAO,CAAC,EAAE,KAAK,EAAE,KAAK,EAAo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AE,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,qBAAmB,CACvG,CAAC,CAAC,CAAC,CACH,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,EAAE,CAAC,CAC3B,MAAC,GAAG,IAAS,EAAE,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,aACvE,KAAC,UAAU,IAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,YAClH,GAAG,CAAC,KAAK,GACE,EACb,MAAC,UAAU,IAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,aAC1G,CAAC,GAAG,CAAC,UAAU,GAAG,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,WAAO,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAI,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAI,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,SAC9F,KANJ,CAAC,CAOL,CACN,CAAC,CACF,IACI,CACN,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Carson Fujita
|
|
3
|
+
*
|
|
4
|
+
* @description
|
|
5
|
+
* This module serves as the central export point for all telemetry-related components in the ASV dashboard.
|
|
6
|
+
* It aggregates various components that display different aspects of the ASV's telemetry data, such as battery levels, compass heading, signal strength, speed, and more.
|
|
7
|
+
*
|
|
8
|
+
* The components included in this module are:
|
|
9
|
+
* - `Batteries`: Displays the battery levels for the ASV's motors and power system.
|
|
10
|
+
* - `Compass`: Displays the compass heading of the ASV.
|
|
11
|
+
* - `Log`: Displays a log of telemetry events and messages.
|
|
12
|
+
* - `Map`: Displays the ASV's current location and path on a map.
|
|
13
|
+
* - `PowerRudderPanel`: Displays the power levels and rudder positions for the ASV's motors.
|
|
14
|
+
* - `SignalLog`: Displays a scrolling log of signal/comms events.
|
|
15
|
+
* - `SignalStrength`: Displays the signal strength of the ASV's communication link.
|
|
16
|
+
* - `Speedometer`: Displays the current speed of the ASV.
|
|
17
|
+
* - `Task`: Displays information about the current task being performed by the ASV.
|
|
18
|
+
* - `TaskData`: Displays detailed data related to the current task.
|
|
19
|
+
*
|
|
20
|
+
* The composed dashboard itself lives one level up as `TelemetryDashboard`
|
|
21
|
+
* (exported from the package root) — it imports this barrel, so it must not be
|
|
22
|
+
* re-exported here.
|
|
23
|
+
*/
|
|
24
|
+
import Batteries from "./Batteries";
|
|
25
|
+
import Compass from "./Compass";
|
|
26
|
+
import Log from "./Log";
|
|
27
|
+
import Map from "./Map";
|
|
28
|
+
import PowerRudderPanel from "./PowerRudderPanel";
|
|
29
|
+
import SignalLog from "./SignalLog";
|
|
30
|
+
import SignalStrength from "./SignalStrength";
|
|
31
|
+
import Speedometer from "./Speedometer";
|
|
32
|
+
import Task from "./Task";
|
|
33
|
+
import TaskData from "./TaskData";
|
|
34
|
+
export { Batteries, Compass, Log, Map, PowerRudderPanel, SignalLog, SignalStrength, Speedometer, Task, TaskData, };
|
|
35
|
+
export { RadiusVisualizer, type RadiusVisualizerProps, type RadarObstacle } from "./RadiusVisualizer";
|
|
36
|
+
export { RadiusVisualizerPanel, type RadiusVisualizerPanelProps } from "./RadiusVisualizerPanel";
|
|
37
|
+
export { ShipRudderVisualizer, type ShipRudderVisualizerProps } from "./ShipRudderVisualizer";
|
|
38
|
+
export { ShipRudderVisualizerPanel, type ShipRudderVisualizerPanelProps } from "./ShipRudderVisualizerPanel";
|
|
39
|
+
export { getPowerColor } from "./powerColor";
|
|
40
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/hud/telemetry/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,GAAG,MAAM,OAAO,CAAC;AACxB,OAAO,GAAG,MAAM,OAAO,CAAC;AACxB,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,OAAO,EACN,SAAS,EACT,OAAO,EACP,GAAG,EACH,GAAG,EACH,gBAAgB,EAChB,SAAS,EACT,cAAc,EACd,WAAW,EACX,IAAI,EACJ,QAAQ,GACR,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAE,KAAK,qBAAqB,EAAE,KAAK,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACtG,OAAO,EAAE,qBAAqB,EAAE,KAAK,0BAA0B,EAAE,MAAM,yBAAyB,CAAC;AACjG,OAAO,EAAE,oBAAoB,EAAE,KAAK,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAC9F,OAAO,EAAE,yBAAyB,EAAE,KAAK,8BAA8B,EAAE,MAAM,6BAA6B,CAAC;AAC7G,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @author Carson Fujita
|
|
3
|
+
*
|
|
4
|
+
* @description
|
|
5
|
+
* This module serves as the central export point for all telemetry-related components in the ASV dashboard.
|
|
6
|
+
* It aggregates various components that display different aspects of the ASV's telemetry data, such as battery levels, compass heading, signal strength, speed, and more.
|
|
7
|
+
*
|
|
8
|
+
* The components included in this module are:
|
|
9
|
+
* - `Batteries`: Displays the battery levels for the ASV's motors and power system.
|
|
10
|
+
* - `Compass`: Displays the compass heading of the ASV.
|
|
11
|
+
* - `Log`: Displays a log of telemetry events and messages.
|
|
12
|
+
* - `Map`: Displays the ASV's current location and path on a map.
|
|
13
|
+
* - `PowerRudderPanel`: Displays the power levels and rudder positions for the ASV's motors.
|
|
14
|
+
* - `SignalLog`: Displays a scrolling log of signal/comms events.
|
|
15
|
+
* - `SignalStrength`: Displays the signal strength of the ASV's communication link.
|
|
16
|
+
* - `Speedometer`: Displays the current speed of the ASV.
|
|
17
|
+
* - `Task`: Displays information about the current task being performed by the ASV.
|
|
18
|
+
* - `TaskData`: Displays detailed data related to the current task.
|
|
19
|
+
*
|
|
20
|
+
* The composed dashboard itself lives one level up as `TelemetryDashboard`
|
|
21
|
+
* (exported from the package root) — it imports this barrel, so it must not be
|
|
22
|
+
* re-exported here.
|
|
23
|
+
*/
|
|
24
|
+
import Batteries from "./Batteries";
|
|
25
|
+
import Compass from "./Compass";
|
|
26
|
+
import Log from "./Log";
|
|
27
|
+
import Map from "./Map";
|
|
28
|
+
import PowerRudderPanel from "./PowerRudderPanel";
|
|
29
|
+
import SignalLog from "./SignalLog";
|
|
30
|
+
import SignalStrength from "./SignalStrength";
|
|
31
|
+
import Speedometer from "./Speedometer";
|
|
32
|
+
import Task from "./Task";
|
|
33
|
+
import TaskData from "./TaskData";
|
|
34
|
+
export { Batteries, Compass, Log, Map, PowerRudderPanel, SignalLog, SignalStrength, Speedometer, Task, TaskData, };
|
|
35
|
+
export { RadiusVisualizer } from "./RadiusVisualizer";
|
|
36
|
+
export { RadiusVisualizerPanel } from "./RadiusVisualizerPanel";
|
|
37
|
+
export { ShipRudderVisualizer } from "./ShipRudderVisualizer";
|
|
38
|
+
export { ShipRudderVisualizerPanel } from "./ShipRudderVisualizerPanel";
|
|
39
|
+
export { getPowerColor } from "./powerColor";
|
|
40
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/hud/telemetry/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,GAAG,MAAM,OAAO,CAAC;AACxB,OAAO,GAAG,MAAM,OAAO,CAAC;AACxB,OAAO,gBAAgB,MAAM,oBAAoB,CAAC;AAClD,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,cAAc,MAAM,kBAAkB,CAAC;AAC9C,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC,OAAO,EACN,SAAS,EACT,OAAO,EACP,GAAG,EACH,GAAG,EACH,gBAAgB,EAChB,SAAS,EACT,cAAc,EACd,WAAW,EACX,IAAI,EACJ,QAAQ,GACR,CAAC;AAEF,OAAO,EAAE,gBAAgB,EAAkD,MAAM,oBAAoB,CAAC;AACtG,OAAO,EAAE,qBAAqB,EAAmC,MAAM,yBAAyB,CAAC;AACjG,OAAO,EAAE,oBAAoB,EAAkC,MAAM,wBAAwB,CAAC;AAC9F,OAAO,EAAE,yBAAyB,EAAuC,MAAM,6BAA6B,CAAC;AAC7G,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file powerColor.ts
|
|
3
|
+
* @description Shared motor-power → color threshold mapping for the propulsion
|
|
4
|
+
* panels ({@link PowerRudderPanel}, {@link ShipRudderVisualizer}). Colors come
|
|
5
|
+
* from the theme's status palette so the panels stay theme-consistent.
|
|
6
|
+
*
|
|
7
|
+
* @author Carson Fujita
|
|
8
|
+
* @license MIT
|
|
9
|
+
*/
|
|
10
|
+
import type { Theme } from '@mui/material/styles';
|
|
11
|
+
/**
|
|
12
|
+
* Maps a motor power percentage (0–100) to a status color:
|
|
13
|
+
* >75% danger, >50% caution, >25% nominal, otherwise idle/low.
|
|
14
|
+
*/
|
|
15
|
+
export declare const getPowerColor: (theme: Theme, power: number) => string;
|
|
16
|
+
//# sourceMappingURL=powerColor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"powerColor.d.ts","sourceRoot":"","sources":["../../../../src/components/hud/telemetry/powerColor.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAElD;;;GAGG;AACH,eAAO,MAAM,aAAa,GAAI,OAAO,KAAK,EAAE,OAAO,MAAM,KAAG,MAM3D,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Maps a motor power percentage (0–100) to a status color:
|
|
3
|
+
* >75% danger, >50% caution, >25% nominal, otherwise idle/low.
|
|
4
|
+
*/
|
|
5
|
+
export const getPowerColor = (theme, power) => {
|
|
6
|
+
const status = theme.palette.status.primary;
|
|
7
|
+
if (power > 75)
|
|
8
|
+
return status['out of control'];
|
|
9
|
+
if (power > 50)
|
|
10
|
+
return status.standby;
|
|
11
|
+
if (power > 25)
|
|
12
|
+
return status.autonomous;
|
|
13
|
+
return status.remote;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=powerColor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"powerColor.js","sourceRoot":"","sources":["../../../../src/components/hud/telemetry/powerColor.ts"],"names":[],"mappings":"AAWA;;;GAGG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAY,EAAE,KAAa,EAAU,EAAE;IACjE,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC;IAC5C,IAAI,KAAK,GAAG,EAAE;QAAE,OAAO,MAAM,CAAC,gBAAgB,CAAC,CAAC;IAChD,IAAI,KAAK,GAAG,EAAE;QAAE,OAAO,MAAM,CAAC,OAAO,CAAC;IACtC,IAAI,KAAK,GAAG,EAAE;QAAE,OAAO,MAAM,CAAC,UAAU,CAAC;IACzC,OAAO,MAAM,CAAC,MAAM,CAAC;AACzB,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file MappingScene.tsx
|
|
3
|
+
* @description Animation orchestrator for the mapping visualizer scene.
|
|
4
|
+
* Renamed from MappingVisualizer.tsx. Uses useEnginePhysics and dispatches
|
|
5
|
+
* scene events for objective reached and map regeneration.
|
|
6
|
+
*/
|
|
7
|
+
import React from 'react';
|
|
8
|
+
/**
|
|
9
|
+
* @component MappingScene
|
|
10
|
+
* @description The main mapping visualizer scene component.
|
|
11
|
+
* It orchestrates the animation loop, handles user input, and renders the map, ASV, and HUD.
|
|
12
|
+
* @remarks
|
|
13
|
+
* This component uses the `useEnginePhysics` hook to simulate the ASV's movement based on speed and heading.
|
|
14
|
+
* It dispatches scene events for objective reached and map regeneration, and manages the course trail.
|
|
15
|
+
*
|
|
16
|
+
* @returns a React element representing the mapping visualizer scene.
|
|
17
|
+
*/
|
|
18
|
+
export default function MappingScene(): React.JSX.Element;
|
|
19
|
+
//# sourceMappingURL=MappingScene.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MappingScene.d.ts","sourceRoot":"","sources":["../../../src/components/scenes/MappingScene.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAsB1B;;;;;;;;;GASG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,sBAuYnC"}
|