mirror of
https://github.com/PhotonVision/photonvision
synced 2026-07-05 03:21:40 +00:00
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. <img width="739" height="1051" alt="image" src="https://github.com/user-attachments/assets/a4383ea0-aa1b-4446-87f1-ece8c5ea9ad5" /> <img width="873" height="1116" alt="image" src="https://github.com/user-attachments/assets/7da4cd60-f8a6-4ac6-8bc6-9f0d5c165fee" /> 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
This commit is contained in:
@@ -99,6 +99,7 @@ const patternHeight = ref(8);
|
|||||||
const boardType = ref<CalibrationBoardTypes>(CalibrationBoardTypes.Charuco);
|
const boardType = ref<CalibrationBoardTypes>(CalibrationBoardTypes.Charuco);
|
||||||
const useOldPattern = ref(false);
|
const useOldPattern = ref(false);
|
||||||
const tagFamily = ref<CalibrationTagFamilies>(CalibrationTagFamilies.Dict_4X4_1000);
|
const tagFamily = ref<CalibrationTagFamilies>(CalibrationTagFamilies.Dict_4X4_1000);
|
||||||
|
const requestedVideoFormatIndex = ref(0);
|
||||||
|
|
||||||
// Emperical testing - with stack size limit of 1MB, we can handle at -least- 700k points
|
// Emperical testing - with stack size limit of 1MB, we can handle at -least- 700k points
|
||||||
const tooManyPoints = computed(
|
const tooManyPoints = computed(
|
||||||
@@ -191,6 +192,7 @@ const startCalibration = () => {
|
|||||||
useCameraSettingsStore().currentCameraSettings.currentPipelineIndex = WebsocketPipelineType.Calib3d;
|
useCameraSettingsStore().currentCameraSettings.currentPipelineIndex = WebsocketPipelineType.Calib3d;
|
||||||
// isCalibrating.value = true;
|
// isCalibrating.value = true;
|
||||||
calibCanceled.value = false;
|
calibCanceled.value = false;
|
||||||
|
requestedVideoFormatIndex.value = useStateStore().calibrationData.videoFormatIndex;
|
||||||
};
|
};
|
||||||
const showCalibEndDialog = ref(false);
|
const showCalibEndDialog = ref(false);
|
||||||
const calibCanceled = ref(false);
|
const calibCanceled = ref(false);
|
||||||
@@ -559,7 +561,7 @@ const setSelectedVideoFormat = (format: VideoFormat) => {
|
|||||||
{{
|
{{
|
||||||
useCameraSettingsStore().currentCameraSettings.validVideoFormats.map((f) =>
|
useCameraSettingsStore().currentCameraSettings.validVideoFormats.map((f) =>
|
||||||
getResolutionString(f.resolution)
|
getResolutionString(f.resolution)
|
||||||
)[useStateStore().calibrationData.videoFormatIndex]
|
)[requestedVideoFormatIndex]
|
||||||
}}!
|
}}!
|
||||||
</v-card-text>
|
</v-card-text>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user