Files
PhotonVision/chameleon-client/src/views/CameraViewes/InputTab.vue

64 lines
2.2 KiB
Vue
Raw Normal View History

2019-09-22 00:14:12 +03:00
<template>
<div>
2019-10-29 23:58:06 +02:00
<CVslider name="Exposure" v-model="value.exposure" :min="0" :max="100" @input="handleData('exposure')"/>
<CVslider name="Brightness" v-model="value.brightness" :min="0" :max="100" @input="handleData('brightness')"/>
<CVselect name="Orientation" v-model="value.rotationMode" :list="['Normal','90° CW','180°','90° CCW']"
@input="handleData('rotationMode')"/>
2019-11-30 22:03:28 +02:00
<CVselect name="Resolution" v-model="value.videoModeIndex" :list="resolutionList" @input="handleData('videoModeIndex')"/>
<CVselect name="Stream Resolution" v-model="value.streamDivisor"
:list="streamResolutionList" @input="handleData('streamDivisor')"/>
</div>
2019-09-22 00:14:12 +03:00
</template>
<script>
2019-10-29 23:58:06 +02:00
import CVslider from '../../components/cv-slider'
import CVselect from '../../components/cv-select'
2019-09-22 00:14:12 +03:00
export default {
name: 'Input',
2019-10-29 23:58:06 +02:00
props: ['value'],
components: {
CVslider,
CVselect,
},
2019-10-29 23:58:06 +02:00
methods: {
handleData(val) {
this.handleInput(val, this.value[val]);
2019-10-29 23:58:06 +02:00
this.$emit('update')
}
},
2019-09-22 00:14:12 +03:00
data() {
return {
2019-10-29 23:58:06 +02:00
t: 0,
a: 1
2019-09-22 00:14:12 +03:00
}
},
computed: {
resolutionList: {
get() {
let tmp_list = [];
for (let i of this.$store.state.resolutionList) {
tmp_list.push(`${i['width']} X ${i['height']} at ${i['fps']} FPS, ${i['pixelFormat']}`)
}
return tmp_list;
}
},
streamResolutionList: {
get() {
2019-11-30 22:03:28 +02:00
let cam_res = this.$store.state.resolutionList[this.value.videoModeIndex];
let tmp_list = [];
let x = 1;
for (let i = 0; i < 4; i++) {
tmp_list.push(`${cam_res['width'] / x} X ${cam_res['height'] / x}`);
x *= 2;
}
return tmp_list;
}
}
}
2019-09-22 00:14:12 +03:00
}
</script>
<style scoped>
2019-10-29 23:58:06 +02:00
2019-09-22 00:14:12 +03:00
</style>