|
|
@@ -0,0 +1,149 @@
|
|
|
+<template>
|
|
|
+
|
|
|
+
|
|
|
+ <headerBar
|
|
|
+ title="开发者配置"
|
|
|
+ />
|
|
|
+
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24"><h3>相机设置</h3></el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="6">电机偏移mm:</el-col>
|
|
|
+ <el-col :span="12"><el-input v-model="editRowData.camera_high_motor_deviation" type="number"/></el-col>
|
|
|
+ <el-col :span="6"><el-button>设定</el-button></el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row class="mar-top-10">
|
|
|
+ <el-col :span="6">舵机偏移(度):</el-col>
|
|
|
+ <el-col :span="12"><el-input v-model="editRowData.camera_steering_deviation" type="number"/></el-col>
|
|
|
+ <el-col :span="6"><el-button>设定</el-button></el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24"><h3>转盘设置</h3></el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="6">角度偏移 (度):</el-col>
|
|
|
+ <el-col :span="12"><el-input v-model="editRowData.turntable_steering_deviation" type="number"/></el-col>
|
|
|
+ <el-col :span="6"><el-button>设定</el-button></el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row class="mar-top-10">
|
|
|
+ <el-col :span="6">前后偏移:</el-col>
|
|
|
+ <el-col :span="12"><el-input v-model="editRowData.turntable_front_end_deviation" type="number"/></el-col>
|
|
|
+ <el-col :span="6"><el-button>设定</el-button></el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="24"><h3>翻版舵机</h3></el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="6">中位:</el-col>
|
|
|
+ <el-col :span="12"><el-input v-model="editRowData.overturn_steering_middle" type="number"/></el-col>
|
|
|
+ <el-col :span="6"><el-button>设定</el-button></el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row class="mar-top-10">
|
|
|
+ <el-col :span="6">高位:</el-col>
|
|
|
+ <el-col :span="12"><el-input v-model="editRowData.overturn_steering_high" type="number"/></el-col>
|
|
|
+ <el-col :span="6"><el-button>设定</el-button></el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row class="mar-top-10">
|
|
|
+ <el-col :span="6">上升速度:</el-col>
|
|
|
+ <el-col :span="12"><el-input v-model="editRowData.overturn_steering_up_speed" type="number"/></el-col>
|
|
|
+ <el-col :span="6"><el-button>设定</el-button></el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row class="mar-top-10">
|
|
|
+ <el-col :span="6">下降速度:</el-col>
|
|
|
+ <el-col :span="12"><el-input v-model="editRowData.overturn_steering_down_speed" type="number"/></el-col>
|
|
|
+ <el-col :span="6"><el-button>设定</el-button></el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+
|
|
|
+ <el-row align="middle" justify="middle" class="mar-top-20">
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-button type="primary" @click="get_deviation">读取偏移量</el-button>
|
|
|
+ <el-button type="primary" @click="connect_mcu__init">设备初始化</el-button>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
+
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup lang="ts">
|
|
|
+
|
|
|
+import {ref,reactive,onMounted} from "vue";
|
|
|
+
|
|
|
+import client from "@/stores/modules/client";
|
|
|
+import icpList from '@/utils/ipc'
|
|
|
+import socket from "@/stores/modules/socket";
|
|
|
+import {ElMessage} from "element-plus";
|
|
|
+const clientStore = client();
|
|
|
+const socketStore = socket()
|
|
|
+
|
|
|
+
|
|
|
+const editRowData = reactive({
|
|
|
+ "camera_high_motor_deviation": '',
|
|
|
+ "camera_steering_deviation": '',
|
|
|
+ "turntable_steering_deviation": '',
|
|
|
+ "turntable_front_end_deviation":'',
|
|
|
+ "overturn_steering_middle": '',
|
|
|
+ "overturn_steering_high": '',
|
|
|
+ "overturn_steering_up_speed": '',
|
|
|
+ "overturn_steering_down_speed": ''
|
|
|
+}); // 当前编辑行的数据
|
|
|
+
|
|
|
+onMounted(()=>{
|
|
|
+ get_deviation()
|
|
|
+})
|
|
|
+
|
|
|
+//获取配置
|
|
|
+async function get_deviation(){
|
|
|
+ if(clientStore.isClient){
|
|
|
+
|
|
|
+ socketStore.sendMessage({
|
|
|
+ type: 'get_deviation',
|
|
|
+ data:"get_deviation"
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ clientStore.ipc.on(icpList.socket.message+'_get_deviation_data', (event, result) => {
|
|
|
+ console.log('_get_deviation_data')
|
|
|
+ console.log(result)
|
|
|
+ if(result.code === 0){
|
|
|
+ editRowData.camera_high_motor_deviation = result.data.camera_high_motor_deviation
|
|
|
+ editRowData.camera_steering_deviation = result.data.camera_steering_deviation
|
|
|
+ editRowData.turntable_steering_deviation = result.data.turntable_steering_deviation
|
|
|
+ editRowData.turntable_front_end_deviation = result.data.turntable_front_end_deviation
|
|
|
+
|
|
|
+ editRowData.overturn_steering_middle = result.data.overturn_steering_middle
|
|
|
+ editRowData.overturn_steering_high = result.data.overturn_steering_high
|
|
|
+ editRowData.overturn_steering_up_speed = result.data.overturn_steering_up_speed
|
|
|
+ editRowData.overturn_steering_down_speed = result.data.overturn_steering_down_speed
|
|
|
+ }else if(result.msg){
|
|
|
+ ElMessage.error(result.msg)
|
|
|
+ }
|
|
|
+ clientStore.ipc.removeAllListeners(icpList.socket.message+'_get_deviation_data');
|
|
|
+ });
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+//MCU初始化
|
|
|
+async function connect_mcu__init(){
|
|
|
+ if(clientStore.isClient){
|
|
|
+
|
|
|
+ socketStore.sendMessage({
|
|
|
+ type: 'init_mcu',
|
|
|
+ data:"init_mcu"
|
|
|
+ })
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped lang="scss">
|
|
|
+</style>
|