mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-28 02:11:40 +00:00
Add disabled param for PhotonCamera (#2484)
This commit is contained in:
@@ -77,8 +77,18 @@ const conflictingCameraShown = computed<boolean>(() => {
|
||||
return useSettingsStore().general.conflictingCameras.length > 0;
|
||||
});
|
||||
|
||||
const fpsLimitWarningShown = computed<boolean>(() => {
|
||||
return Object.values(useCameraSettingsStore().cameras).some((c) => c.fpsLimit > 0);
|
||||
const fpsLimitedCameras = computed<string>(() => {
|
||||
return Object.values(useCameraSettingsStore().cameras)
|
||||
.filter((c) => c.fpsLimit > 0)
|
||||
.map((c) => c.nickname)
|
||||
.join(", ");
|
||||
});
|
||||
|
||||
const disabledCameras = computed<string>(() => {
|
||||
return Object.values(useCameraSettingsStore().cameras)
|
||||
.filter((c) => !c.isEnabled)
|
||||
.map((c) => c.nickname)
|
||||
.join(", ");
|
||||
});
|
||||
|
||||
const showCameraSetupDialog = ref(useCameraSettingsStore().needsCameraConfiguration);
|
||||
@@ -111,7 +121,7 @@ const showCameraSetupDialog = ref(useCameraSettingsStore().needsCameraConfigurat
|
||||
</span>
|
||||
</v-alert>
|
||||
<v-alert
|
||||
v-if="fpsLimitWarningShown"
|
||||
v-if="fpsLimitedCameras"
|
||||
class="mb-3"
|
||||
color="error"
|
||||
density="compact"
|
||||
@@ -119,10 +129,22 @@ const showCameraSetupDialog = ref(useCameraSettingsStore().needsCameraConfigurat
|
||||
:variant="theme.global.current.value.dark ? 'tonal' : 'elevated'"
|
||||
>
|
||||
<span
|
||||
>One or more cameras have an FPS limit set! This may cause performance issues. Check your logs for more
|
||||
>{{ fpsLimitedCameras }} have an FPS limit set! This may cause performance issues. Check your logs for more
|
||||
information.
|
||||
</span>
|
||||
</v-alert>
|
||||
<v-alert
|
||||
v-if="disabledCameras"
|
||||
class="mb-3"
|
||||
color="error"
|
||||
density="compact"
|
||||
icon="mdi-alert-circle-outline"
|
||||
:variant="theme.global.current.value.dark ? 'tonal' : 'elevated'"
|
||||
>
|
||||
<span
|
||||
>{{ disabledCameras }} are disabled! This may cause performance issues. Check your logs for more information.
|
||||
</span>
|
||||
</v-alert>
|
||||
<v-alert
|
||||
v-if="conflictingCameraShown"
|
||||
class="mb-3"
|
||||
|
||||
Reference in New Issue
Block a user