mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-27 02:01:40 +00:00
Allow 90-deg rotation of USB cameras on Pi (#1103)
UI would say that every camera on a Pi device was a CSI camera basically. It would not let you rotate usb cameras 90 degrees or 270 degrees because it thought that they were CSI cameras. Fixes: #1098
This commit is contained in:
@@ -12,7 +12,7 @@ const cameraRotations = computed(() =>
|
||||
["Normal", "90° CW", "180°", "90° CCW"].map((v, i) => ({
|
||||
name: v,
|
||||
value: i,
|
||||
disabled: useSettingsStore().gpuAccelerationEnabled ? [1, 3].includes(i) : false
|
||||
disabled: useCameraSettingsStore().isCSICamera ? [1, 3].includes(i) : false
|
||||
}))
|
||||
);
|
||||
|
||||
|
||||
@@ -58,6 +58,9 @@ export const useCameraSettingsStore = defineStore("cameraSettings", {
|
||||
},
|
||||
isCalibrationMode(): boolean {
|
||||
return this.currentCameraSettings.currentPipelineIndex == WebsocketPipelineType.Calib3d;
|
||||
},
|
||||
isCSICamera(): boolean {
|
||||
return this.currentCameraSettings.isCSICamera;
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
@@ -99,6 +102,7 @@ export const useCameraSettingsStore = defineStore("cameraSettings", {
|
||||
perViewErrors: calib.perViewErrors,
|
||||
intrinsics: calib.intrinsics
|
||||
})),
|
||||
isCSICamera: d.isCSICamera,
|
||||
pipelineNicknames: d.pipelineNicknames,
|
||||
currentPipelineIndex: d.currentPipelineIndex,
|
||||
pipelineSettings: d.currentPipelineSettings
|
||||
|
||||
@@ -112,6 +112,7 @@ export interface CameraSettings {
|
||||
currentPipelineIndex: number;
|
||||
pipelineNicknames: string[];
|
||||
pipelineSettings: ActivePipelineSettings;
|
||||
isCSICamera: boolean;
|
||||
}
|
||||
|
||||
export const PlaceholderCameraSettings: CameraSettings = {
|
||||
@@ -145,7 +146,8 @@ export const PlaceholderCameraSettings: CameraSettings = {
|
||||
pipelineNicknames: ["Placeholder Pipeline"],
|
||||
lastPipelineIndex: 0,
|
||||
currentPipelineIndex: 0,
|
||||
pipelineSettings: DefaultAprilTagPipelineSettings
|
||||
pipelineSettings: DefaultAprilTagPipelineSettings,
|
||||
isCSICamera: false
|
||||
};
|
||||
|
||||
export enum CalibrationBoardTypes {
|
||||
|
||||
@@ -52,6 +52,7 @@ export interface WebsocketCameraSettingsUpdate {
|
||||
fov: number;
|
||||
inputStreamPort: number;
|
||||
isFovConfigurable: boolean;
|
||||
isCSICamera: boolean;
|
||||
nickname: string;
|
||||
outputStreamPort: number;
|
||||
pipelineNicknames: string[];
|
||||
|
||||
Reference in New Issue
Block a user