cleaned up single point calibration and bug fixed isBinary in driverMode

This commit is contained in:
ori agranat
2019-12-07 17:11:22 +02:00
parent aeb08442dd
commit 4213e28da4
4 changed files with 19 additions and 30 deletions

View File

@@ -8,9 +8,9 @@
<v-divider dark color="white"/>
<CVselect name="Calibration Mode" v-model="value.calibrationMode" :list="['None','Single point','Dual point']"
@input="handleData('calibrationMode')"/>
<component :raw-point="rawPoint" :is="selectedComponent" @update="doUpdate" @snackbar="snackbar=true"/>
<component :raw-point="rawPoint" :is="selectedComponent" @update="doUpdate" @snackbar="showSnackbar"/>
<v-snackbar :timeout="3000" v-model="snackbar" top color="error">
<span style="color:#000">{{getErrorMsg()}}</span>
<span style="color:#000">{{snackbarText}}</span>
<v-btn color="black" text @click="snackbar = false">Close</v-btn>
</v-snackbar>
</div>
@@ -41,20 +41,16 @@
doUpdate() {
this.$emit('update')
},
getErrorMsg()
{
switch (this.value.calibrationMode) {
case 1:
return "No target found";
case 2:
return "Points are too close"
}
}
showSnackbar(message){
this.snackbarText = message;
this.snackbar = true;
},
},
data() {
return {
snackbar: false,
snackbarText:""
}
},
computed: {