mirror of
https://github.com/PhotonVision/photonvision
synced 2026-06-26 01:51:40 +00:00
Add an error when the connection for the end calibration request fails (#1840)
This commit is contained in:
@@ -182,8 +182,10 @@ const startCalibration = () => {
|
||||
const showCalibEndDialog = ref(false);
|
||||
const calibCanceled = ref(false);
|
||||
const calibSuccess = ref<boolean | undefined>(undefined);
|
||||
const calibEndpointFail = ref(false);
|
||||
const endCalibration = () => {
|
||||
calibSuccess.value = undefined;
|
||||
calibEndpointFail.value = false;
|
||||
|
||||
if (!useStateStore().calibrationData.hasEnoughImages) {
|
||||
calibCanceled.value = true;
|
||||
@@ -196,7 +198,13 @@ const endCalibration = () => {
|
||||
.then(() => {
|
||||
calibSuccess.value = true;
|
||||
})
|
||||
.catch(() => {
|
||||
.catch((e) => {
|
||||
if (e.response) {
|
||||
// Server returned a status code
|
||||
} else if (e.request) {
|
||||
// Something went wrong. Unsure if calibration actually worked
|
||||
calibEndpointFail.value = true;
|
||||
}
|
||||
calibSuccess.value = false;
|
||||
})
|
||||
.finally(() => {
|
||||
@@ -525,6 +533,13 @@ const setSelectedVideoFormat = (format: VideoFormat) => {
|
||||
}}!
|
||||
</v-card-text>
|
||||
</template>
|
||||
<template v-else-if="calibEndpointFail">
|
||||
<v-icon color="gray" size="70"> mdi-help-circle-outline </v-icon>
|
||||
<v-card-text
|
||||
>Unable to determine if calibration was successful. Refresh this page and manually check if calibration
|
||||
was successful.</v-card-text
|
||||
>
|
||||
</template>
|
||||
<template v-else>
|
||||
<v-icon color="red" size="70"> mdi-close </v-icon>
|
||||
<v-card-text>
|
||||
|
||||
@@ -210,7 +210,7 @@ public class Calibrate3dPipeline
|
||||
broadcastState();
|
||||
}
|
||||
|
||||
private void broadcastState() {
|
||||
public void broadcastState() {
|
||||
var state =
|
||||
SerializationUtils.objectToHashMap(
|
||||
new UICalibrationData(
|
||||
|
||||
@@ -395,6 +395,7 @@ public class VisionModule {
|
||||
settings.cameraAutoExposure = true;
|
||||
|
||||
setPipeline(PipelineManager.CAL_3D_INDEX);
|
||||
pipelineManager.calibration3dPipeline.broadcastState();
|
||||
}
|
||||
|
||||
public void saveInputSnapshot() {
|
||||
|
||||
Reference in New Issue
Block a user