From dbd6eea4e92bb7a076114d9f1c57b6cabce2459c Mon Sep 17 00:00:00 2001 From: Matt Morley Date: Sun, 18 Jan 2026 08:04:20 -0800 Subject: [PATCH] Cache requested calibration format outside of state store (#2310) ## Description On main, this pop-up lists the wrong resolution. The index in the state is getting updated out from underneath us. The easiest solution I have is to just cache this number. image image Not sure of a great way to test this, since it requires the backend taking calibration snapshots ## 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 --- .../src/components/cameras/CameraCalibrationCard.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/photon-client/src/components/cameras/CameraCalibrationCard.vue b/photon-client/src/components/cameras/CameraCalibrationCard.vue index 55e3e16e2..39527df72 100644 --- a/photon-client/src/components/cameras/CameraCalibrationCard.vue +++ b/photon-client/src/components/cameras/CameraCalibrationCard.vue @@ -99,6 +99,7 @@ const patternHeight = ref(8); const boardType = ref(CalibrationBoardTypes.Charuco); const useOldPattern = ref(false); const tagFamily = ref(CalibrationTagFamilies.Dict_4X4_1000); +const requestedVideoFormatIndex = ref(0); // Emperical testing - with stack size limit of 1MB, we can handle at -least- 700k points const tooManyPoints = computed( @@ -191,6 +192,7 @@ const startCalibration = () => { useCameraSettingsStore().currentCameraSettings.currentPipelineIndex = WebsocketPipelineType.Calib3d; // isCalibrating.value = true; calibCanceled.value = false; + requestedVideoFormatIndex.value = useStateStore().calibrationData.videoFormatIndex; }; const showCalibEndDialog = ref(false); const calibCanceled = ref(false); @@ -559,7 +561,7 @@ const setSelectedVideoFormat = (format: VideoFormat) => { {{ useCameraSettingsStore().currentCameraSettings.validVideoFormats.map((f) => getResolutionString(f.resolution) - )[useStateStore().calibrationData.videoFormatIndex] + )[requestedVideoFormatIndex] }}!