diff --git a/chameleon-client/src/components/OutputTab/SingleCalibration.vue b/chameleon-client/src/components/OutputTab/SingleCalibration.vue
index c77dc8b53..eaed4c846 100644
--- a/chameleon-client/src/components/OutputTab/SingleCalibration.vue
+++ b/chameleon-client/src/components/OutputTab/SingleCalibration.vue
@@ -21,8 +21,21 @@
this.$emit('update');
},
takePoint() {
- this.handleInput('point', this.rawPoint);
- this.$emit('update');
+ let hasNaN = false;
+ console.log(this.rawPoint);
+ for (let i = 0; i < this.rawPoint.length&&!hasNaN; i++) {
+ hasNaN = !(this.rawPoint[i]||this.rawPoint[i]===0);
+ }
+ if(!hasNaN){//if array doesnt have undefined values
+ console.log("sending points");
+ this.handleInput('point', this.rawPoint);
+ this.$emit('update');
+ }
+ else
+ {
+ console.log("sending error");
+ this.$emit('snackbar');
+ }
}
}
}
diff --git a/chameleon-client/src/views/CameraViewes/OutputTab.vue b/chameleon-client/src/views/CameraViewes/OutputTab.vue
index f9c7f3910..28f5121d5 100644
--- a/chameleon-client/src/views/CameraViewes/OutputTab.vue
+++ b/chameleon-client/src/views/CameraViewes/OutputTab.vue
@@ -8,9 +8,9 @@
-
+
- Points are too close
+ {{getErrorMsg()}}
Close
@@ -40,6 +40,15 @@
},
doUpdate() {
this.$emit('update')
+ },
+ getErrorMsg()
+ {
+ switch (this.value.calibrationMode) {
+ case 1:
+ return "No target found";
+ case 2:
+ return "Points are too close"
+ }
}
},