From a42fef67f2351d18cd23c8f6d4924ec3558b2cca Mon Sep 17 00:00:00 2001
From: Jack <31329139+realSaddy@users.noreply.github.com>
Date: Sat, 29 Oct 2022 05:57:32 -0500
Subject: [PATCH] Fix Camera Calibration Frontend (#542)
* Fix Start Calibration button requiring a page refresh
* Fix camera resolution selection
* Fix camera resolution selection so it works with the default selection
---
photon-client/src/views/CamerasView.vue | 8 +++-----
photon-client/src/views/PipelineViews/TargetsTab.vue | 8 ++++----
2 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/photon-client/src/views/CamerasView.vue b/photon-client/src/views/CamerasView.vue
index 3bb6e64d8..39a8f9dfd 100644
--- a/photon-client/src/views/CamerasView.vue
+++ b/photon-client/src/views/CamerasView.vue
@@ -432,13 +432,11 @@ export default {
return filtered
}
},
-
stringResolutionList: {
get() {
return this.filteredResolutionList.map(res => `${res['width']} X ${res['height']}`);
}
},
-
cameraSettings: {
get() {
return this.$store.getters.currentCameraSettings;
@@ -447,7 +445,6 @@ export default {
this.$store.commit('cameraSettings', value);
}
},
-
boardType: {
get() {
return this.calibrationData.boardType
@@ -650,13 +647,14 @@ export default {
if (this.isCalibrating === true) {
data['takeCalibrationSnapshot'] = true
} else {
+ // This store prevents an edge case of a user not selecting a different resolution, which causes the set logic to not be called
+ this.$store.commit('mutateCalibrationState', {['videoModeIndex']: this.filteredResolutionList[this.selectedFilteredResIndex].index});
const calData = this.calibrationData;
calData.isCalibrating = true;
data['startPnpCalibration'] = calData;
-
console.log("starting calibration with index " + calData.videoModeIndex);
}
-
+ this.$store.commit('currentPipelineIndex', -2);
this.$socket.send(this.$msgPack.encode(data));
},
sendCalibrationFinish() {
diff --git a/photon-client/src/views/PipelineViews/TargetsTab.vue b/photon-client/src/views/PipelineViews/TargetsTab.vue
index d4ec4ea24..71230f0ae 100644
--- a/photon-client/src/views/PipelineViews/TargetsTab.vue
+++ b/photon-client/src/views/PipelineViews/TargetsTab.vue
@@ -50,7 +50,7 @@
-
+
Ambiguity
@@ -82,9 +82,9 @@