Browse Source

mod:整体运行 读取配置量

panqiuyao 7 months ago
parent
commit
99c16308b1
1 changed files with 24 additions and 2 deletions
  1. 24 2
      frontend/src/views/Developer/normal.vue

+ 24 - 2
frontend/src/views/Developer/normal.vue

@@ -19,7 +19,7 @@
          <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">
@@ -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,17 @@ async function  connect_mcu__init(){
   }
 }
 
+async  function  AllChangeNum (){
+  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)
 
+}
 
 
 //设置 移动 调整