mirror of
https://github.com/legop3/MultiRoombaRover.git
synced 2026-09-16 01:21:20 -04:00
videotile
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -11,7 +11,7 @@
|
|||||||
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
|
||||||
<meta name="apple-mobile-web-app-title" content="Multi Roomba Rover" />
|
<meta name="apple-mobile-web-app-title" content="Multi Roomba Rover" />
|
||||||
<title>Multi Roomba Rover</title>
|
<title>Multi Roomba Rover</title>
|
||||||
<script type="module" crossorigin src="/assets/index-L5eomcx0.js"></script>
|
<script type="module" crossorigin src="/assets/index-CtJOO8C0.js"></script>
|
||||||
<link rel="stylesheet" crossorigin href="/assets/index-DVTOmRBl.css">
|
<link rel="stylesheet" crossorigin href="/assets/index-DVTOmRBl.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ export default function VideoTile({
|
|||||||
overcurrentLimiter = null,
|
overcurrentLimiter = null,
|
||||||
showTurnCue = false,
|
showTurnCue = false,
|
||||||
turnTimerText = null,
|
turnTimerText = null,
|
||||||
turnSeconds = null,
|
|
||||||
isActiveDriver = false,
|
isActiveDriver = false,
|
||||||
idleSkipSeconds = null,
|
idleSkipSeconds = null,
|
||||||
}) {
|
}) {
|
||||||
@@ -86,15 +85,9 @@ export default function VideoTile({
|
|||||||
const desktopLayout = layoutFormat === 'desktop';
|
const desktopLayout = layoutFormat === 'desktop';
|
||||||
const mobileHud = !desktopLayout;
|
const mobileHud = !desktopLayout;
|
||||||
const effectiveHudMapPosition = mobileHud ? 'top-right' : hudMapPosition;
|
const effectiveHudMapPosition = mobileHud ? 'top-right' : hudMapPosition;
|
||||||
const [showHudMapDesktop, setShowHudMapDesktop] = useHudMapSetting();
|
const [showHudMapDesktop] = useHudMapSetting();
|
||||||
const showHudMap = hudForceMap ? true : mobileHud ? true : showHudMapDesktop;
|
const showHudMap = hudForceMap ? true : mobileHud ? true : showHudMapDesktop;
|
||||||
const batteryVisual = buildBatteryVisual({ charge: batteryCharge, config: batteryConfig });
|
const batteryVisual = buildBatteryVisual({ charge: batteryCharge, config: batteryConfig });
|
||||||
// console.log('[BatteryBarDebug]', {
|
|
||||||
// frameSensors: sensors,
|
|
||||||
// batteryCharge,
|
|
||||||
// batteryCapacity,
|
|
||||||
// config: batteryConfig,
|
|
||||||
// });
|
|
||||||
const wheelOvercurrents = sensors?.wheelOvercurrents || null;
|
const wheelOvercurrents = sensors?.wheelOvercurrents || null;
|
||||||
const overcurrentMotors =
|
const overcurrentMotors =
|
||||||
wheelOvercurrents == null
|
wheelOvercurrents == null
|
||||||
@@ -602,25 +595,21 @@ export default function VideoTile({
|
|||||||
{!noHud && showTurnCue ? (
|
{!noHud && showTurnCue ? (
|
||||||
<TurnCueOverlay
|
<TurnCueOverlay
|
||||||
mobileHud={mobileHud}
|
mobileHud={mobileHud}
|
||||||
turnSeconds={turnSeconds}
|
|
||||||
isActiveDriver={isActiveDriver}
|
isActiveDriver={isActiveDriver}
|
||||||
idleSkipSeconds={idleSkipSeconds}
|
idleSkipSeconds={idleSkipSeconds}
|
||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
{!noHud ? (
|
{!noHud ? (
|
||||||
<HudOverlay
|
<HudOverlay
|
||||||
frame={telemetryFrame}
|
|
||||||
sensors={sensors}
|
sensors={sensors}
|
||||||
label={label}
|
label={label}
|
||||||
roverColor={roverColor}
|
roverColor={roverColor}
|
||||||
status={renderedStatus}
|
status={renderedStatus}
|
||||||
audioStatus={renderedAudioStatus}
|
audioStatus={renderedAudioStatus}
|
||||||
levelStatus={levelIndicator}
|
levelStatus={levelIndicator}
|
||||||
desktopLayout={desktopLayout}
|
|
||||||
layoutFormat={layoutFormat}
|
layoutFormat={layoutFormat}
|
||||||
variant={hudVariant}
|
variant={hudVariant}
|
||||||
driverLabel={driverLabel}
|
driverLabel={driverLabel}
|
||||||
battery={batteryVisual}
|
|
||||||
showTopDown={showHudMap}
|
showTopDown={showHudMap}
|
||||||
mobileHud={mobileHud}
|
mobileHud={mobileHud}
|
||||||
mapPosition={effectiveHudMapPosition}
|
mapPosition={effectiveHudMapPosition}
|
||||||
@@ -677,4 +666,3 @@ export default function VideoTile({
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,18 +4,15 @@ import TopDownMap from '../TopDownMap.jsx';
|
|||||||
import { roverNameChromeStyle } from '../../lib/roverColor.js';
|
import { roverNameChromeStyle } from '../../lib/roverColor.js';
|
||||||
|
|
||||||
export default function HudOverlay({
|
export default function HudOverlay({
|
||||||
frame,
|
|
||||||
sensors,
|
sensors,
|
||||||
label,
|
label,
|
||||||
roverColor = null,
|
roverColor = null,
|
||||||
status,
|
status,
|
||||||
audioStatus,
|
audioStatus,
|
||||||
levelStatus,
|
levelStatus,
|
||||||
desktopLayout = true,
|
|
||||||
layoutFormat = 'desktop',
|
layoutFormat = 'desktop',
|
||||||
variant = 'default',
|
variant = 'default',
|
||||||
driverLabel = null,
|
driverLabel = null,
|
||||||
battery,
|
|
||||||
showTopDown = false,
|
showTopDown = false,
|
||||||
mobileHud = false,
|
mobileHud = false,
|
||||||
mapPosition = 'top-center',
|
mapPosition = 'top-center',
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import React from 'react';
|
|||||||
|
|
||||||
export default function TurnCueOverlay({
|
export default function TurnCueOverlay({
|
||||||
mobileHud = false,
|
mobileHud = false,
|
||||||
turnSeconds = null,
|
|
||||||
isActiveDriver = false,
|
isActiveDriver = false,
|
||||||
idleSkipSeconds = null,
|
idleSkipSeconds = null,
|
||||||
}) {
|
}) {
|
||||||
|
|||||||
Reference in New Issue
Block a user