|
|
@@ -2,7 +2,7 @@
|
|
|
|
|
|
|
|
|
<headerBar
|
|
|
- title="开发者配置"
|
|
|
+ title="初始设备调频设置"
|
|
|
/>
|
|
|
|
|
|
<div class="page">
|
|
|
@@ -10,20 +10,20 @@
|
|
|
<el-col :span="24"><h3>相机设置</h3></el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
- <el-col :span="6">电机偏移mm:</el-col>
|
|
|
+ <el-col :span="6">相机高度mm:</el-col>
|
|
|
<el-col :span="12"><el-input
|
|
|
- @change="changeNum('相机电机','move_deviation','camera_high_motor_deviation',0, 400)"
|
|
|
- :min="0" :max="400"
|
|
|
+ @change="changeNum('相机电机','move_deviation','camera_high_motor_deviation',0, 50)"
|
|
|
+ :min="0" :max="50"
|
|
|
:step="1"
|
|
|
v-model="editRowData.camera_high_motor_deviation" type="number"/>
|
|
|
- <div class="error-msg">最小0,最大400</div>
|
|
|
+ <div class="error-msg">最小0,最大50</div>
|
|
|
</el-col>
|
|
|
<el-col :span="6"><el-button
|
|
|
- @click="changeNum('相机电机','set_deviation','camera_high_motor_deviation',0, 400)"
|
|
|
+ @click="changeNum('相机电机','set_deviation','camera_high_motor_deviation',0, 50)"
|
|
|
>设定</el-button></el-col>
|
|
|
</el-row>
|
|
|
<el-row class="mar-top-10">
|
|
|
- <el-col :span="6">舵机偏移(度):</el-col>
|
|
|
+ <el-col :span="6">相机角度(度):</el-col>
|
|
|
|
|
|
<el-col :span="12"><el-input
|
|
|
@change="changeNum('相机舵机','move_deviation','camera_steering_deviation',-90, 90)"
|
|
|
@@ -61,7 +61,7 @@
|
|
|
v-model="editRowData.turntable_front_end_deviation" type="number"/>
|
|
|
<div class="error-msg">最小0,最大950</div>
|
|
|
</el-col>
|
|
|
- <el-col :span="6"><el-button @click="changeNum('转盘前后电机','set_deviation','turntable_front_end_deviation',0, 950)">设定</el-button></el-col>
|
|
|
+ <el-col :span="6"><!--<el-button @click="changeNum('转盘前后电机','set_deviation','turntable_front_end_deviation',0, 950)">设定</el-button>--></el-col>
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
@@ -118,8 +118,9 @@
|
|
|
|
|
|
<el-row align="middle" justify="middle" class="mar-top-20 bottom-wrap">
|
|
|
<el-col :span="24">
|
|
|
- <el-button type="primary" @click="get_deviation">读取偏移量</el-button>
|
|
|
<el-button type="primary" @click="connect_mcu__init">设备初始化</el-button>
|
|
|
+ <el-button type="primary" @click="get_deviation">读取偏移量并运行</el-button>
|
|
|
+ <el-button type="primary" @click="AllChangeNum">整体设定</el-button>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
@@ -177,6 +178,17 @@ async function get_deviation(){
|
|
|
editRowData.value.overturn_steering_high = result.data.overturn_steering_high
|
|
|
editRowData.value.overturn_steering_up_speed = result.data.overturn_steering_up_speed
|
|
|
editRowData.value.overturn_steering_down_speed = result.data.overturn_steering_down_speed
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ changeNum('相机电机','move_deviation','camera_high_motor_deviation',0, 50)
|
|
|
+ changeNum('相机舵机','move_deviation','camera_steering_deviation',-90, 90)
|
|
|
+ changeNum('转盘舵机','move_deviation','turntable_steering_deviation',-720, 720)
|
|
|
+ changeNum('转盘前后电机','move_deviation','turntable_front_end_deviation',0, 950)
|
|
|
+ changeNum('翻板舵机中位','move_deviation','overturn_steering_middle',0, 180)
|
|
|
+ // changeNum('翻板舵机高位','move_deviation','overturn_steering_high',0, 180)
|
|
|
+ // changeNum('翻板舵机上升速度','move_deviation','overturn_steering_up_speed',0, 10)
|
|
|
+ // changeNum('翻板舵机下降速度','move_deviation','overturn_steering_down_speed',0, 10)
|
|
|
}else if(result.msg){
|
|
|
ElMessage.error(result.msg)
|
|
|
}
|
|
|
@@ -200,7 +212,19 @@ async function connect_mcu__init(){
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+const allTipsCount = ref(0)
|
|
|
+async function AllChangeNum (){
|
|
|
+ allTipsCount.value = 7
|
|
|
+ changeNum('相机电机','set_deviation','camera_high_motor_deviation',0, 50)
|
|
|
+ changeNum('相机舵机','set_deviation','camera_steering_deviation',-90, 90)
|
|
|
+ changeNum('转盘舵机','set_deviation','turntable_steering_deviation',-720, 720)
|
|
|
+// changeNum('转盘前后电机','set_deviation','turntable_front_end_deviation',0, 950)
|
|
|
+ changeNum('翻板舵机中位','set_deviation','overturn_steering_middle',0, 180)
|
|
|
+ changeNum('翻板舵机高位','set_deviation','overturn_steering_high',0, 180)
|
|
|
+ changeNum('翻板舵机上升速度','set_deviation','overturn_steering_up_speed',0, 10)
|
|
|
+ changeNum('翻板舵机下降速度','set_deviation','overturn_steering_down_speed',0, 10)
|
|
|
|
|
|
+}
|
|
|
|
|
|
|
|
|
//设置 移动 调整
|
|
|
@@ -228,6 +252,19 @@ async function changeNum(action_name, type, key, min, max) {
|
|
|
console.log('set_deviation')
|
|
|
console.log(result)
|
|
|
if(result.code === 0){
|
|
|
+ if(result.msg === "相机舵机 设置成功"){
|
|
|
+
|
|
|
+ editRowData.value.camera_steering_deviation = 0
|
|
|
+ }
|
|
|
+ if(allTipsCount.value === 1){
|
|
|
+ allTipsCount.value--;
|
|
|
+ ElMessage.success('设定成功')
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if(allTipsCount.value > 0){
|
|
|
+ allTipsCount.value--;
|
|
|
+ return;
|
|
|
+ }
|
|
|
ElMessage.success(result.msg)
|
|
|
}else if(result.msg){
|
|
|
ElMessage.error(result.msg)
|