mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-26 01:51:40 +00:00
## Description There isn't anything that 3D mode adds for OD, and the results are typically messed up. Thus, we disable 3D mode when we're using an OD pipeline. ## Meta Merge checklist: - [x] Pull Request title is [short, imperative summary](https://cbea.ms/git-commit/) of proposed changes - [x] The description documents the _what_ and _why_ - [ ] If this PR changes behavior or adds a feature, user documentation is updated - [ ] If this PR touches photon-serde, all messages have been regenerated and hashes have not changed unexpectedly - [ ] If this PR touches configuration, this is backwards compatible with settings back to v2025.3.2 - [ ] If this PR touches pipeline settings or anything related to data exchange, the frontend typing is updated - [ ] If this PR addresses a bug, a regression test for it is added
108 lines
3.4 KiB
Vue
108 lines
3.4 KiB
Vue
<script setup lang="ts">
|
|
import { computed } from "vue";
|
|
import { useCameraSettingsStore } from "@/stores/settings/CameraSettingsStore";
|
|
import { useStateStore } from "@/stores/StateStore";
|
|
import { useTheme } from "vuetify";
|
|
import { PipelineType } from "@/types/PipelineTypes";
|
|
|
|
const theme = useTheme();
|
|
|
|
const value = defineModel<number[]>();
|
|
|
|
const processingMode = computed<number>({
|
|
get: () => (useCameraSettingsStore().currentPipelineSettings.solvePNPEnabled ? 1 : 0),
|
|
set: (v) => {
|
|
if (useCameraSettingsStore().isCurrentVideoFormatCalibrated) {
|
|
useCameraSettingsStore().changeCurrentPipelineSetting({ solvePNPEnabled: v === 1 }, true);
|
|
}
|
|
}
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<v-card
|
|
:disabled="useCameraSettingsStore().isDriverMode || useStateStore().colorPickingMode"
|
|
class="mt-3 rounded-12"
|
|
color="surface"
|
|
style="flex-grow: 1; display: flex; flex-direction: column"
|
|
>
|
|
<v-row class="pa-3 pb-0 align-center">
|
|
<v-col class="pa-4">
|
|
<p style="color: white">Processing Mode</p>
|
|
<v-btn-toggle v-model="processingMode" mandatory class="fill w-100">
|
|
<v-btn
|
|
color="buttonPassive"
|
|
:disabled="!useCameraSettingsStore().hasConnected"
|
|
:variant="theme.global.name.value === 'LightTheme' ? 'elevated' : 'outlined'"
|
|
class="w-50"
|
|
>
|
|
<template #prepend>
|
|
<v-icon size="large">mdi-square-outline</v-icon>
|
|
</template>
|
|
<span>2D</span>
|
|
</v-btn>
|
|
<v-btn
|
|
color="buttonPassive"
|
|
:disabled="
|
|
!useCameraSettingsStore().hasConnected ||
|
|
!useCameraSettingsStore().isCurrentVideoFormatCalibrated ||
|
|
useCameraSettingsStore().currentPipelineSettings.pipelineType == PipelineType.ObjectDetection ||
|
|
useCameraSettingsStore().currentPipelineSettings.pipelineType == PipelineType.ColoredShape
|
|
"
|
|
:variant="theme.global.name.value === 'LightTheme' ? 'elevated' : 'outlined'"
|
|
class="w-50"
|
|
>
|
|
<template #prepend>
|
|
<v-icon size="large">mdi-cube-outline</v-icon>
|
|
</template>
|
|
<span>3D</span>
|
|
</v-btn>
|
|
</v-btn-toggle>
|
|
</v-col>
|
|
</v-row>
|
|
<v-row class="pa-3 pt-0 align-center">
|
|
<v-col class="pa-4 pt-0">
|
|
<p style="color: white">Stream Display</p>
|
|
<v-btn-toggle v-model="value" :multiple="true" mandatory class="fill w-100">
|
|
<v-btn
|
|
color="buttonPassive"
|
|
class="fill w-50"
|
|
:variant="theme.global.name.value === 'LightTheme' ? 'elevated' : 'outlined'"
|
|
>
|
|
<v-icon start class="mode-btn-icon" size="large">mdi-import</v-icon>
|
|
<span class="mode-btn-label">Raw</span>
|
|
</v-btn>
|
|
<v-btn
|
|
color="buttonPassive"
|
|
class="fill w-50"
|
|
:variant="theme.global.name.value === 'LightTheme' ? 'elevated' : 'outlined'"
|
|
>
|
|
<v-icon start class="mode-btn-icon" size="large">mdi-export</v-icon>
|
|
<span class="mode-btn-label">Processed</span>
|
|
</v-btn>
|
|
</v-btn-toggle>
|
|
</v-col>
|
|
</v-row>
|
|
</v-card>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.v-btn--disabled {
|
|
background-color: #191919 !important;
|
|
}
|
|
|
|
th {
|
|
width: 80px;
|
|
text-align: center;
|
|
}
|
|
|
|
@media only screen and (max-width: 351px) {
|
|
.mode-btn-icon {
|
|
margin: 0 !important;
|
|
}
|
|
.mode-btn-label {
|
|
display: none;
|
|
}
|
|
}
|
|
</style>
|