2023-08-21 01:51:35 -04:00
|
|
|
<script setup lang="ts">
|
2025-06-29 00:18:54 -04:00
|
|
|
import { computed, ref } from "vue";
|
2023-08-21 01:51:35 -04:00
|
|
|
import CamerasCard from "@/components/dashboard/CamerasCard.vue";
|
|
|
|
|
import CameraAndPipelineSelectCard from "@/components/dashboard/CameraAndPipelineSelectCard.vue";
|
|
|
|
|
import StreamConfigCard from "@/components/dashboard/StreamConfigCard.vue";
|
|
|
|
|
import PipelineConfigCard from "@/components/dashboard/ConfigOptions.vue";
|
|
|
|
|
import { useCameraSettingsStore } from "@/stores/settings/CameraSettingsStore";
|
|
|
|
|
import { useStateStore } from "@/stores/StateStore";
|
2025-07-04 16:43:17 -05:00
|
|
|
import { useSettingsStore } from "@/stores/settings/GeneralSettingsStore";
|
2023-08-21 01:51:35 -04:00
|
|
|
|
|
|
|
|
const cameraViewType = computed<number[]>({
|
|
|
|
|
get: (): number[] => {
|
|
|
|
|
// Only show the input stream in Color Picking Mode
|
2023-08-31 16:56:58 -04:00
|
|
|
if (useStateStore().colorPickingMode) return [0];
|
2023-08-21 01:51:35 -04:00
|
|
|
|
|
|
|
|
// Only show the output stream in Driver Mode or Calibration Mode
|
2023-08-31 16:56:58 -04:00
|
|
|
if (useCameraSettingsStore().isDriverMode || useCameraSettingsStore().isCalibrationMode) return [1];
|
2023-08-21 01:51:35 -04:00
|
|
|
|
|
|
|
|
const ret: number[] = [];
|
2023-08-31 16:56:58 -04:00
|
|
|
if (useCameraSettingsStore().currentPipelineSettings.inputShouldShow) {
|
2023-08-21 01:51:35 -04:00
|
|
|
ret.push(0);
|
|
|
|
|
}
|
2023-08-31 16:56:58 -04:00
|
|
|
if (useCameraSettingsStore().currentPipelineSettings.outputShouldShow) {
|
2023-08-21 01:51:35 -04:00
|
|
|
ret.push(1);
|
|
|
|
|
}
|
|
|
|
|
|
2023-08-31 16:56:58 -04:00
|
|
|
if (ret.length === 0) return [0];
|
2023-08-21 01:51:35 -04:00
|
|
|
|
|
|
|
|
return ret;
|
|
|
|
|
},
|
2023-08-31 16:56:58 -04:00
|
|
|
set: (v) => {
|
|
|
|
|
useCameraSettingsStore().changeCurrentPipelineSetting(
|
|
|
|
|
{
|
|
|
|
|
inputShouldShow: v.includes(0),
|
|
|
|
|
outputShouldShow: v.includes(1)
|
|
|
|
|
},
|
|
|
|
|
true
|
|
|
|
|
);
|
2023-08-21 01:51:35 -04:00
|
|
|
}
|
|
|
|
|
});
|
2025-01-01 03:04:20 -05:00
|
|
|
|
2025-01-01 14:18:44 -05:00
|
|
|
const arducamWarningShown = computed<boolean>(() => {
|
2025-01-03 18:50:25 -05:00
|
|
|
return Object.values(useCameraSettingsStore().cameras).some(
|
2025-01-01 14:18:44 -05:00
|
|
|
(c) =>
|
|
|
|
|
c.cameraQuirks?.quirks?.ArduCamCamera === true &&
|
|
|
|
|
!(
|
|
|
|
|
c.cameraQuirks?.quirks?.ArduOV2311Controls === true ||
|
|
|
|
|
c.cameraQuirks?.quirks?.ArduOV9281Controls === true ||
|
|
|
|
|
c.cameraQuirks?.quirks?.ArduOV9782Controls === true
|
|
|
|
|
)
|
|
|
|
|
);
|
|
|
|
|
});
|
2025-06-29 00:18:54 -04:00
|
|
|
|
2025-07-04 16:43:17 -05:00
|
|
|
const conflictingHostnameShown = computed<boolean>(() => {
|
|
|
|
|
return useSettingsStore().general.conflictingHostname;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const conflictingCameraShown = computed<boolean>(() => {
|
|
|
|
|
return useSettingsStore().general.conflictingCameras.length > 0;
|
|
|
|
|
});
|
|
|
|
|
|
2025-06-29 00:18:54 -04:00
|
|
|
const showCameraSetupDialog = ref(useCameraSettingsStore().needsCameraConfiguration);
|
2023-08-21 01:51:35 -04:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
2023-08-31 16:56:58 -04:00
|
|
|
<v-container class="pa-3" fluid>
|
2025-07-04 16:43:17 -05:00
|
|
|
<v-banner v-if="arducamWarningShown" rounded color="error" dark class="mb-3" icon="mdi-alert-circle-outline">
|
|
|
|
|
<span
|
|
|
|
|
>Arducam Camera Detected! Please configure the camera model in the <a href="#/cameras">Cameras tab</a>!
|
|
|
|
|
</span>
|
|
|
|
|
</v-banner>
|
2025-01-01 14:18:44 -05:00
|
|
|
<v-banner
|
2025-07-04 16:43:17 -05:00
|
|
|
v-if="conflictingHostnameShown"
|
2025-01-01 14:18:44 -05:00
|
|
|
rounded
|
2025-07-04 16:43:17 -05:00
|
|
|
bg-color="error"
|
2025-01-07 08:45:39 -05:00
|
|
|
color="error"
|
2025-01-01 14:18:44 -05:00
|
|
|
dark
|
|
|
|
|
class="mb-3"
|
|
|
|
|
icon="mdi-alert-circle-outline"
|
|
|
|
|
>
|
|
|
|
|
<span
|
2025-07-04 16:43:17 -05:00
|
|
|
>Conflicting Hostname Detected! Please change the hostname in the <a href="#/settings">Settings tab</a>!
|
|
|
|
|
</span>
|
|
|
|
|
</v-banner>
|
|
|
|
|
<v-banner
|
|
|
|
|
v-if="conflictingCameraShown"
|
|
|
|
|
rounded
|
|
|
|
|
bg-color="error"
|
|
|
|
|
color="error"
|
|
|
|
|
dark
|
|
|
|
|
class="mb-3"
|
|
|
|
|
icon="mdi-alert-circle-outline"
|
|
|
|
|
>
|
|
|
|
|
<span
|
|
|
|
|
>Conflicting Camera Name(s) Detected! Please change the name(s) of
|
|
|
|
|
{{ useSettingsStore().general.conflictingCameras }}!
|
2025-01-01 14:18:44 -05:00
|
|
|
</span>
|
|
|
|
|
</v-banner>
|
2025-05-06 18:21:41 -04:00
|
|
|
<v-row no-gutters>
|
2023-08-31 16:56:58 -04:00
|
|
|
<v-col cols="12" class="pb-3 pr-lg-3" lg="8" align-self="stretch">
|
2023-08-21 01:51:35 -04:00
|
|
|
<CamerasCard v-model="cameraViewType" />
|
|
|
|
|
</v-col>
|
2023-08-31 16:56:58 -04:00
|
|
|
<v-col cols="12" class="pb-3" lg="4" style="display: flex; flex-direction: column" align-self="stretch">
|
2023-08-21 01:51:35 -04:00
|
|
|
<CameraAndPipelineSelectCard />
|
|
|
|
|
<StreamConfigCard v-model="cameraViewType" />
|
|
|
|
|
</v-col>
|
|
|
|
|
</v-row>
|
|
|
|
|
<PipelineConfigCard />
|
2025-01-01 03:04:20 -05:00
|
|
|
|
|
|
|
|
<!-- TODO - not sure this belongs here -->
|
2025-06-29 00:18:54 -04:00
|
|
|
<v-dialog
|
|
|
|
|
v-if="useCameraSettingsStore().needsCameraConfiguration"
|
|
|
|
|
v-model="showCameraSetupDialog"
|
|
|
|
|
max-width="800"
|
|
|
|
|
dark
|
|
|
|
|
>
|
2025-05-06 18:21:41 -04:00
|
|
|
<v-card flat color="primary">
|
2025-01-01 03:04:20 -05:00
|
|
|
<v-card-title>Setup some cameras to get started!</v-card-title>
|
|
|
|
|
<v-card-text>
|
2025-06-29 00:18:54 -04:00
|
|
|
No cameras activated - head to the <router-link to="/cameraConfigs">Camera matching tab</router-link> to set
|
|
|
|
|
some up!
|
2025-01-01 03:04:20 -05:00
|
|
|
</v-card-text>
|
|
|
|
|
</v-card>
|
|
|
|
|
</v-dialog>
|
2023-08-21 01:51:35 -04:00
|
|
|
</v-container>
|
|
|
|
|
</template>
|
2025-01-01 03:04:20 -05:00
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
a:link {
|
|
|
|
|
color: #ffd843;
|
|
|
|
|
background-color: transparent;
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
}
|
|
|
|
|
a:visited {
|
|
|
|
|
color: #ffd843;
|
|
|
|
|
background-color: transparent;
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
}
|
|
|
|
|
a:hover {
|
|
|
|
|
color: pink;
|
|
|
|
|
background-color: transparent;
|
|
|
|
|
text-decoration: underline;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
a:active {
|
|
|
|
|
color: yellow;
|
|
|
|
|
background-color: transparent;
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
}
|
|
|
|
|
</style>
|