<!-- 飞控新版鹰视1027 -->
<template>
  <div class="nest_controlBox">
    <throttleGauge
      v-if="uavData"
      :uavData="uavData"
      :throttleValue="uavData.accelerator || 0"
      style="transform: translateX(35px);"
    ></throttleGauge>
    <div class="nest_control">
      <Info class :uav-data="uavData"></Info>
      <div class="xian"></div>
      <battery :batteryList="uavData.batteryList"></battery>
    </div>
    <obstacle :uav-data="uavData" style="transform: translateX(-35px);"></obstacle>
  </div>
</template>
<script>
import throttleGauge from "./components/throttleGauge";
import Info from "./components/info/index";
import battery from "./components/battery/index";
import obstacle from "./components/obstacle";

export default {
  name: "MMCDataTransferPanel",
  data() {
    return {};
  },
  props: {
    // 无人机实时数据
    uavData: {
      type: Object,
      default: () => ({
        gps: {
          relativeAlt: 0, //相对地面高度
          absoluteAlt: 0, //海拔
        },
        flyDistance: 0, //飞行距离
        flyTime: 0, //飞行时间
        groundSpeed: 0, //飞行速度
        distanceToHome: 0, //离起飞点距离
        velocityX: 0, // 使用NED（北-东-下）坐标系，飞机在x方向上的当前速度，以米
        velocityY: 0, // 使用NED（北-东-下）坐标系，飞机在y方向上的当前速度，以米
        velocityZ: 0, //爬升率
        accelerator: 0, //油门值
        batteryList: [], //电池列表
        obstacle: null /* {
          // 避障信息（#272）
          minDistance: 100, // 壁障最小距离单位（cm）
          maxDistance: 2000, // 壁障最大距离单位（cm）
          distances: [
            // distances[36],360度避障距离，每隔10度一个距离
            3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000,
            3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000,
            3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000, 3000,
          ],
          enable: true, // true触发避障，false未触发
          obsDistance: 100, // 避障使能距离单位（m）
          type: 0, // 感器类型
        } */,
      }),
    },
    // 无人机设备信息
    device: {
      type: Object,
      default: () => ({}),
    },
  },
  components: { Info, battery, obstacle, throttleGauge },
  mounted() {},
  computed: {
    props_obj() {
      let { data } = this;
    },
  },
};
</script>
<style scoped lang="scss">
.nest_controlBox {
  height: 200px;
  display: flex;
  justify-content: start;
  justify-content: center;
  align-items: center;
  pointer-events: none;
  .nest_control {
    display: flex;
    align-items: center;
    background: #222222;
    backdrop-filter: blur(1px);
    padding: 0 60px 0 40px;
  }
}
.xian {
  width: 0.3px;
  height: 72px;
  border: 0.5px solid;
  border-image: linear-gradient(
      180deg,
      rgba(112, 218, 249, 0),
      rgba(112, 218, 249, 1),
      rgba(112, 218, 249, 0)
    )
    2 2;
  margin: 10px 10px 0 0;
}
</style>