|
@@ -4,145 +4,141 @@
|
|
|
<div class="drone-control-box">
|
|
<div class="drone-control-box">
|
|
|
<div class="box">
|
|
<div class="box">
|
|
|
<div class="row">
|
|
<div class="row">
|
|
|
- <div class="drone-control"><Button :ghost="!flightController" size="small" @click="onClickFightControl">{{ flightController ? 'Exit Remote Control' : 'Enter Remote Control'}}</Button></div>
|
|
|
|
|
|
|
+ <div class="drone-control"><Button :ghost="!flightController" size="small" @click="onClickFightControl">{{
|
|
|
|
|
+ flightController ? 'Exit Remote Control' : 'Enter Remote Control' }}</Button></div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="row">
|
|
<div class="row">
|
|
|
<div class="drone-control-direction">
|
|
<div class="drone-control-direction">
|
|
|
<Button size="small" ghost @mousedown="onMouseDown(KeyCode.KEY_Q)" @onmouseup="onMouseUp">
|
|
<Button size="small" ghost @mousedown="onMouseDown(KeyCode.KEY_Q)" @onmouseup="onMouseUp">
|
|
|
- <template #icon><UndoOutlined /></template><span class="word">Q</span>
|
|
|
|
|
|
|
+ <template #icon>
|
|
|
|
|
+ <UndoOutlined />
|
|
|
|
|
+ </template><span class="word">Q</span>
|
|
|
</Button>
|
|
</Button>
|
|
|
<Button size="small" ghost @mousedown="onMouseDown(KeyCode.KEY_W)" @onmouseup="onMouseUp">
|
|
<Button size="small" ghost @mousedown="onMouseDown(KeyCode.KEY_W)" @onmouseup="onMouseUp">
|
|
|
- <template #icon><UpOutlined/></template><span class="word">W</span>
|
|
|
|
|
|
|
+ <template #icon>
|
|
|
|
|
+ <UpOutlined />
|
|
|
|
|
+ </template><span class="word">W</span>
|
|
|
</Button>
|
|
</Button>
|
|
|
<Button size="small" ghost @mousedown="onMouseDown(KeyCode.KEY_E)" @onmouseup="onMouseUp">
|
|
<Button size="small" ghost @mousedown="onMouseDown(KeyCode.KEY_E)" @onmouseup="onMouseUp">
|
|
|
- <template #icon><RedoOutlined /></template><span class="word">E</span>
|
|
|
|
|
|
|
+ <template #icon>
|
|
|
|
|
+ <RedoOutlined />
|
|
|
|
|
+ </template><span class="word">E</span>
|
|
|
</Button>
|
|
</Button>
|
|
|
<Button size="small" ghost @mousedown="onMouseDown(KeyCode.ARROW_UP)" @onmouseup="onMouseUp">
|
|
<Button size="small" ghost @mousedown="onMouseDown(KeyCode.ARROW_UP)" @onmouseup="onMouseUp">
|
|
|
- <template #icon><ArrowUpOutlined /></template>
|
|
|
|
|
|
|
+ <template #icon>
|
|
|
|
|
+ <ArrowUpOutlined />
|
|
|
|
|
+ </template>
|
|
|
</Button>
|
|
</Button>
|
|
|
<br />
|
|
<br />
|
|
|
<Button size="small" ghost @mousedown="onMouseDown(KeyCode.KEY_A)" @onmouseup="onMouseUp">
|
|
<Button size="small" ghost @mousedown="onMouseDown(KeyCode.KEY_A)" @onmouseup="onMouseUp">
|
|
|
- <template #icon><LeftOutlined/></template><span class="word">A</span>
|
|
|
|
|
|
|
+ <template #icon>
|
|
|
|
|
+ <LeftOutlined />
|
|
|
|
|
+ </template><span class="word">A</span>
|
|
|
</Button>
|
|
</Button>
|
|
|
<Button size="small" ghost @mousedown="onMouseDown(KeyCode.KEY_S)" @onmouseup="onMouseUp">
|
|
<Button size="small" ghost @mousedown="onMouseDown(KeyCode.KEY_S)" @onmouseup="onMouseUp">
|
|
|
- <template #icon><DownOutlined/></template><span class="word">S</span>
|
|
|
|
|
|
|
+ <template #icon>
|
|
|
|
|
+ <DownOutlined />
|
|
|
|
|
+ </template><span class="word">S</span>
|
|
|
</Button>
|
|
</Button>
|
|
|
<Button size="small" ghost @mousedown="onMouseDown(KeyCode.KEY_D)" @onmouseup="onMouseUp">
|
|
<Button size="small" ghost @mousedown="onMouseDown(KeyCode.KEY_D)" @onmouseup="onMouseUp">
|
|
|
- <template #icon><RightOutlined/></template><span class="word">D</span>
|
|
|
|
|
|
|
+ <template #icon>
|
|
|
|
|
+ <RightOutlined />
|
|
|
|
|
+ </template><span class="word">D</span>
|
|
|
</Button>
|
|
</Button>
|
|
|
<Button size="small" ghost @mousedown="onMouseDown(KeyCode.ARROW_DOWN)" @onmouseup="onMouseUp">
|
|
<Button size="small" ghost @mousedown="onMouseDown(KeyCode.ARROW_DOWN)" @onmouseup="onMouseUp">
|
|
|
- <template #icon><ArrowDownOutlined /></template>
|
|
|
|
|
|
|
+ <template #icon>
|
|
|
|
|
+ <ArrowDownOutlined />
|
|
|
|
|
+ </template>
|
|
|
</Button>
|
|
</Button>
|
|
|
</div>
|
|
</div>
|
|
|
- <Button type="primary" size="small" danger ghost @click="handleEmergencyStop" >
|
|
|
|
|
- <template #icon><PauseCircleOutlined/></template><span>Break</span>
|
|
|
|
|
|
|
+ <Button type="primary" size="small" danger ghost @click="handleEmergencyStop">
|
|
|
|
|
+ <template #icon>
|
|
|
|
|
+ <PauseCircleOutlined />
|
|
|
|
|
+ </template><span>Break</span>
|
|
|
</Button>
|
|
</Button>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="row">
|
|
<div class="row">
|
|
|
- <DroneControlPopover
|
|
|
|
|
- :visible="flyToPointPopoverData.visible"
|
|
|
|
|
- :loading="flyToPointPopoverData.loading"
|
|
|
|
|
- @confirm="($event) => onFlyToConfirm(true)"
|
|
|
|
|
- @cancel="($event) =>onFlyToConfirm(false)"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <DroneControlPopover :visible="flyToPointPopoverData.visible" :loading="flyToPointPopoverData.loading"
|
|
|
|
|
+ @confirm="($event) => onFlyToConfirm(true)" @cancel="($event) => onFlyToConfirm(false)">
|
|
|
<template #formContent>
|
|
<template #formContent>
|
|
|
<div class="form-content">
|
|
<div class="form-content">
|
|
|
<div>
|
|
<div>
|
|
|
<span class="form-label">latitude:</span>
|
|
<span class="form-label">latitude:</span>
|
|
|
- <a-input-number v-model:value="flyToPointPopoverData.latitude"/>
|
|
|
|
|
|
|
+ <a-input-number v-model:value="flyToPointPopoverData.latitude" />
|
|
|
</div>
|
|
</div>
|
|
|
<div>
|
|
<div>
|
|
|
<span class="form-label">longitude:</span>
|
|
<span class="form-label">longitude:</span>
|
|
|
- <a-input-number v-model:value="flyToPointPopoverData.longitude"/>
|
|
|
|
|
|
|
+ <a-input-number v-model:value="flyToPointPopoverData.longitude" />
|
|
|
</div>
|
|
</div>
|
|
|
<div>
|
|
<div>
|
|
|
<span class="form-label">height(m):</span>
|
|
<span class="form-label">height(m):</span>
|
|
|
- <a-input-number v-model:value="flyToPointPopoverData.height"/>
|
|
|
|
|
|
|
+ <a-input-number v-model:value="flyToPointPopoverData.height" />
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
- <Button size="small" ghost @click="onShowFlyToPopover" >
|
|
|
|
|
|
|
+ <Button size="small" ghost @click="onShowFlyToPopover">
|
|
|
<span>Fly to</span>
|
|
<span>Fly to</span>
|
|
|
</Button>
|
|
</Button>
|
|
|
</DroneControlPopover>
|
|
</DroneControlPopover>
|
|
|
- <Button size="small" ghost @click="onStopFlyToPoint" >
|
|
|
|
|
|
|
+ <Button size="small" ghost @click="onStopFlyToPoint">
|
|
|
<span>Stop Fly to</span>
|
|
<span>Stop Fly to</span>
|
|
|
</Button>
|
|
</Button>
|
|
|
- <DroneControlPopover
|
|
|
|
|
- :visible="takeoffToPointPopoverData.visible"
|
|
|
|
|
- :loading="takeoffToPointPopoverData.loading"
|
|
|
|
|
- @confirm="($event) => onTakeoffToPointConfirm(true)"
|
|
|
|
|
- @cancel="($event) =>onTakeoffToPointConfirm(false)"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <DroneControlPopover :visible="takeoffToPointPopoverData.visible" :loading="takeoffToPointPopoverData.loading"
|
|
|
|
|
+ @confirm="($event) => onTakeoffToPointConfirm(true)" @cancel="($event) => onTakeoffToPointConfirm(false)">
|
|
|
<template #formContent>
|
|
<template #formContent>
|
|
|
<div class="form-content">
|
|
<div class="form-content">
|
|
|
<div>
|
|
<div>
|
|
|
<span class="form-label">latitude:</span>
|
|
<span class="form-label">latitude:</span>
|
|
|
- <a-input-number v-model:value="takeoffToPointPopoverData.latitude"/>
|
|
|
|
|
|
|
+ <a-input-number v-model:value="takeoffToPointPopoverData.latitude" />
|
|
|
</div>
|
|
</div>
|
|
|
<div>
|
|
<div>
|
|
|
<span class="form-label">longitude:</span>
|
|
<span class="form-label">longitude:</span>
|
|
|
- <a-input-number v-model:value="takeoffToPointPopoverData.longitude"/>
|
|
|
|
|
|
|
+ <a-input-number v-model:value="takeoffToPointPopoverData.longitude" />
|
|
|
</div>
|
|
</div>
|
|
|
<div>
|
|
<div>
|
|
|
<span class="form-label">height(m):</span>
|
|
<span class="form-label">height(m):</span>
|
|
|
- <a-input-number v-model:value="takeoffToPointPopoverData.height"/>
|
|
|
|
|
|
|
+ <a-input-number v-model:value="takeoffToPointPopoverData.height" />
|
|
|
</div>
|
|
</div>
|
|
|
<div>
|
|
<div>
|
|
|
<span class="form-label">Safe Takeoff Altitude(m):</span>
|
|
<span class="form-label">Safe Takeoff Altitude(m):</span>
|
|
|
- <a-input-number v-model:value="takeoffToPointPopoverData.securityTakeoffHeight"/>
|
|
|
|
|
|
|
+ <a-input-number v-model:value="takeoffToPointPopoverData.securityTakeoffHeight" />
|
|
|
</div>
|
|
</div>
|
|
|
<div>
|
|
<div>
|
|
|
<span class="form-label">Return-to-Home Altitude(m):</span>
|
|
<span class="form-label">Return-to-Home Altitude(m):</span>
|
|
|
- <a-input-number v-model:value="takeoffToPointPopoverData.rthAltitude"/>
|
|
|
|
|
|
|
+ <a-input-number v-model:value="takeoffToPointPopoverData.rthAltitude" />
|
|
|
</div>
|
|
</div>
|
|
|
<div>
|
|
<div>
|
|
|
<span class="form-label">Lost Action:</span>
|
|
<span class="form-label">Lost Action:</span>
|
|
|
- <a-select
|
|
|
|
|
- v-model:value="takeoffToPointPopoverData.rcLostAction"
|
|
|
|
|
- style="width: 120px"
|
|
|
|
|
- :options="LostControlActionInCommandFLightOptions"
|
|
|
|
|
- ></a-select>
|
|
|
|
|
|
|
+ <a-select v-model:value="takeoffToPointPopoverData.rcLostAction" style="width: 120px"
|
|
|
|
|
+ :options="LostControlActionInCommandFLightOptions"></a-select>
|
|
|
</div>
|
|
</div>
|
|
|
<div>
|
|
<div>
|
|
|
<span class="form-label">Wayline Lost Action:</span>
|
|
<span class="form-label">Wayline Lost Action:</span>
|
|
|
- <a-select
|
|
|
|
|
- v-model:value="takeoffToPointPopoverData.exitWaylineWhenRcLost"
|
|
|
|
|
- style="width: 120px"
|
|
|
|
|
- :options="WaylineLostControlActionInCommandFlightOptions"
|
|
|
|
|
- ></a-select>
|
|
|
|
|
|
|
+ <a-select v-model:value="takeoffToPointPopoverData.exitWaylineWhenRcLost" style="width: 120px"
|
|
|
|
|
+ :options="WaylineLostControlActionInCommandFlightOptions"></a-select>
|
|
|
</div>
|
|
</div>
|
|
|
<div>
|
|
<div>
|
|
|
<span class="form-label">Return-to-Home Mode:</span>
|
|
<span class="form-label">Return-to-Home Mode:</span>
|
|
|
- <a-select
|
|
|
|
|
- v-model:value="takeoffToPointPopoverData.rthMode"
|
|
|
|
|
- style="width: 120px"
|
|
|
|
|
- :options="RthModeInCommandFlightOptions"
|
|
|
|
|
- ></a-select>
|
|
|
|
|
|
|
+ <a-select v-model:value="takeoffToPointPopoverData.rthMode" style="width: 120px"
|
|
|
|
|
+ :options="RthModeInCommandFlightOptions"></a-select>
|
|
|
</div>
|
|
</div>
|
|
|
<div>
|
|
<div>
|
|
|
<span class="form-label">Commander Mode Lost Action:</span>
|
|
<span class="form-label">Commander Mode Lost Action:</span>
|
|
|
- <a-select
|
|
|
|
|
- v-model:value="takeoffToPointPopoverData.commanderModeLostAction"
|
|
|
|
|
- style="width: 120px"
|
|
|
|
|
- :options="CommanderModeLostActionInCommandFlightOptions"
|
|
|
|
|
- ></a-select>
|
|
|
|
|
|
|
+ <a-select v-model:value="takeoffToPointPopoverData.commanderModeLostAction" style="width: 120px"
|
|
|
|
|
+ :options="CommanderModeLostActionInCommandFlightOptions"></a-select>
|
|
|
</div>
|
|
</div>
|
|
|
<div>
|
|
<div>
|
|
|
<span class="form-label">Commander Flight Mode:</span>
|
|
<span class="form-label">Commander Flight Mode:</span>
|
|
|
- <a-select
|
|
|
|
|
- v-model:value="takeoffToPointPopoverData.commanderFlightMode"
|
|
|
|
|
- style="width: 120px"
|
|
|
|
|
- :options="CommanderFlightModeInCommandFlightOptions"
|
|
|
|
|
- ></a-select>
|
|
|
|
|
|
|
+ <a-select v-model:value="takeoffToPointPopoverData.commanderFlightMode" style="width: 120px"
|
|
|
|
|
+ :options="CommanderFlightModeInCommandFlightOptions"></a-select>
|
|
|
</div>
|
|
</div>
|
|
|
<div>
|
|
<div>
|
|
|
<span class="form-label">Commander Flight Height(m):</span>
|
|
<span class="form-label">Commander Flight Height(m):</span>
|
|
|
- <a-input-number v-model:value="takeoffToPointPopoverData.commanderFlightHeight"/>
|
|
|
|
|
|
|
+ <a-input-number v-model:value="takeoffToPointPopoverData.commanderFlightHeight" />
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
- <Button size="small" ghost @click="onShowTakeoffToPointPopover" >
|
|
|
|
|
|
|
+ <Button size="small" ghost @click="onShowTakeoffToPointPopover">
|
|
|
<span>Take off</span>
|
|
<span>Take off</span>
|
|
|
</Button>
|
|
</Button>
|
|
|
<div v-for="(cmdItem) in cmdList" :key="cmdItem.cmdKey" class="control-cmd-item">
|
|
<div v-for="(cmdItem) in cmdList" :key="cmdItem.cmdKey" class="control-cmd-item">
|
|
@@ -151,115 +147,95 @@
|
|
|
</Button>
|
|
</Button>
|
|
|
</div>
|
|
</div>
|
|
|
<div>
|
|
<div>
|
|
|
- <Button size="small" ghost @click="openLivestreamAgora" >
|
|
|
|
|
|
|
+ <Button size="small" ghost @click="openLivestreamAgora">
|
|
|
<span>Agora Live</span>
|
|
<span>Agora Live</span>
|
|
|
</Button>
|
|
</Button>
|
|
|
- <Button size="small" ghost @click="openLivestreamOthers" >
|
|
|
|
|
|
|
+ <Button size="small" ghost @click="openLivestreamOthers">
|
|
|
<span>RTMP/GB28181 Live</span>
|
|
<span>RTMP/GB28181 Live</span>
|
|
|
</Button>
|
|
</Button>
|
|
|
</div>
|
|
</div>
|
|
|
</DroneControlPopover>
|
|
</DroneControlPopover>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
- <div class="box">
|
|
|
|
|
- <div class="row">
|
|
|
|
|
- <Select v-model:value="payloadSelectInfo.value" style="width: 110px; marginRight: 5px" :options="payloadSelectInfo.options" @change="handlePayloadChange"/>
|
|
|
|
|
- <div class="drone-control">
|
|
|
|
|
- <Button type="primary" size="small" @click="onAuthPayload">Payload Control</Button>
|
|
|
|
|
- </div>
|
|
|
|
|
</div>
|
|
</div>
|
|
|
- <div class="row">
|
|
|
|
|
- <DroneControlPopover
|
|
|
|
|
- :visible="gimbalResetPopoverData.visible"
|
|
|
|
|
- :loading="gimbalResetPopoverData.loading"
|
|
|
|
|
- @confirm="($event) => onGimbalResetConfirm(true)"
|
|
|
|
|
- @cancel="($event) =>onGimbalResetConfirm(false)"
|
|
|
|
|
- >
|
|
|
|
|
- <template #formContent>
|
|
|
|
|
- <div class="form-content">
|
|
|
|
|
- <div>
|
|
|
|
|
- <span class="form-label">reset mode:</span>
|
|
|
|
|
- <a-select
|
|
|
|
|
- v-model:value="gimbalResetPopoverData.resetMode"
|
|
|
|
|
- style="width: 180px"
|
|
|
|
|
- :options="GimbalResetModeOptions"
|
|
|
|
|
- ></a-select>
|
|
|
|
|
|
|
+ <div class="box">
|
|
|
|
|
+ <div class="row">
|
|
|
|
|
+ <Select v-model:value="payloadSelectInfo.value" style="width: 110px; marginRight: 5px"
|
|
|
|
|
+ :options="payloadSelectInfo.options" @change="handlePayloadChange" />
|
|
|
|
|
+ <div class="drone-control">
|
|
|
|
|
+ <Button type="primary" size="small" @click="onAuthPayload">Payload Control</Button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="row">
|
|
|
|
|
+ <DroneControlPopover :visible="gimbalResetPopoverData.visible" :loading="gimbalResetPopoverData.loading"
|
|
|
|
|
+ @confirm="($event) => onGimbalResetConfirm(true)" @cancel="($event) => onGimbalResetConfirm(false)">
|
|
|
|
|
+ <template #formContent>
|
|
|
|
|
+ <div class="form-content">
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <span class="form-label">reset mode:</span>
|
|
|
|
|
+ <a-select v-model:value="gimbalResetPopoverData.resetMode" style="width: 180px"
|
|
|
|
|
+ :options="GimbalResetModeOptions"></a-select>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
- </template>
|
|
|
|
|
- <Button size="small" ghost @click="onShowGimbalResetPopover">
|
|
|
|
|
- <span>Gimbal Reset</span>
|
|
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <Button size="small" ghost @click="onShowGimbalResetPopover">
|
|
|
|
|
+ <span>Gimbal Reset</span>
|
|
|
|
|
+ </Button>
|
|
|
|
|
+ </DroneControlPopover>
|
|
|
|
|
+ <Button size="small" ghost @click="onSwitchCameraMode">
|
|
|
|
|
+ <span>Camera Mode Switch</span>
|
|
|
</Button>
|
|
</Button>
|
|
|
- </DroneControlPopover>
|
|
|
|
|
- <Button size="small" ghost @click="onSwitchCameraMode">
|
|
|
|
|
- <span>Camera Mode Switch</span>
|
|
|
|
|
- </Button>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="row">
|
|
|
|
|
- <Button size="small" ghost @click="onStartCameraRecording">
|
|
|
|
|
- <span>Start Recording</span>
|
|
|
|
|
- </Button>
|
|
|
|
|
- <Button size="small" ghost @click="onStopCameraRecording">
|
|
|
|
|
- <span>Stop Recording</span>
|
|
|
|
|
- </Button>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="row">
|
|
|
|
|
- <Button size="small" ghost @click="onTakeCameraPhoto">
|
|
|
|
|
- <span>Take Photo</span>
|
|
|
|
|
- </Button>
|
|
|
|
|
- <DroneControlPopover
|
|
|
|
|
- :visible="zoomFactorPopoverData.visible"
|
|
|
|
|
- :loading="zoomFactorPopoverData.loading"
|
|
|
|
|
- @confirm="($event) => onZoomFactorConfirm(true)"
|
|
|
|
|
- @cancel="($event) =>onZoomFactorConfirm(false)"
|
|
|
|
|
- >
|
|
|
|
|
- <template #formContent>
|
|
|
|
|
- <div class="form-content">
|
|
|
|
|
- <div>
|
|
|
|
|
- <span class="form-label">camera type:</span>
|
|
|
|
|
- <a-select
|
|
|
|
|
- v-model:value="zoomFactorPopoverData.cameraType"
|
|
|
|
|
- style="width: 120px"
|
|
|
|
|
- :options="ZoomCameraTypeOptions"
|
|
|
|
|
- ></a-select>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div>
|
|
|
|
|
- <span class="form-label">zoom factor:</span>
|
|
|
|
|
- <a-input-number v-model:value="zoomFactorPopoverData.zoomFactor" :min="2" :max="200" />
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </template>
|
|
|
|
|
- <Button size="small" ghost @click="($event) => onShowZoomFactorPopover()">
|
|
|
|
|
- <span class="word" @click=";">Zoom</span>
|
|
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="row">
|
|
|
|
|
+ <Button size="small" ghost @click="onStartCameraRecording">
|
|
|
|
|
+ <span>Start Recording</span>
|
|
|
</Button>
|
|
</Button>
|
|
|
- </DroneControlPopover>
|
|
|
|
|
- <DroneControlPopover
|
|
|
|
|
- :visible="cameraAimPopoverData.visible"
|
|
|
|
|
- :loading="cameraAimPopoverData.loading"
|
|
|
|
|
- @confirm="($event) => onCameraAimConfirm(true)"
|
|
|
|
|
- @cancel="($event) =>onCameraAimConfirm(false)"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <Button size="small" ghost @click="onStopCameraRecording">
|
|
|
|
|
+ <span>Stop Recording</span>
|
|
|
|
|
+ </Button>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="row">
|
|
|
|
|
+ <Button size="small" ghost @click="onTakeCameraPhoto">
|
|
|
|
|
+ <span>Take Photo</span>
|
|
|
|
|
+ </Button>
|
|
|
|
|
+ <DroneControlPopover :visible="zoomFactorPopoverData.visible" :loading="zoomFactorPopoverData.loading"
|
|
|
|
|
+ @confirm="($event) => onZoomFactorConfirm(true)" @cancel="($event) => onZoomFactorConfirm(false)">
|
|
|
<template #formContent>
|
|
<template #formContent>
|
|
|
<div class="form-content">
|
|
<div class="form-content">
|
|
|
<div>
|
|
<div>
|
|
|
<span class="form-label">camera type:</span>
|
|
<span class="form-label">camera type:</span>
|
|
|
- <a-select
|
|
|
|
|
- v-model:value="cameraAimPopoverData.cameraType"
|
|
|
|
|
- style="width: 120px"
|
|
|
|
|
- :options="CameraTypeOptions"
|
|
|
|
|
- ></a-select>
|
|
|
|
|
|
|
+ <a-select v-model:value="zoomFactorPopoverData.cameraType" style="width: 120px"
|
|
|
|
|
+ :options="ZoomCameraTypeOptions"></a-select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <span class="form-label">zoom factor:</span>
|
|
|
|
|
+ <a-input-number v-model:value="zoomFactorPopoverData.zoomFactor" :min="2" :max="200" />
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ <Button size="small" ghost @click="($event) => onShowZoomFactorPopover()">
|
|
|
|
|
+ <span class="word" @click=";">Zoom</span>
|
|
|
|
|
+ </Button>
|
|
|
|
|
+ </DroneControlPopover>
|
|
|
|
|
+ <DroneControlPopover :visible="cameraAimPopoverData.visible" :loading="cameraAimPopoverData.loading"
|
|
|
|
|
+ @confirm="($event) => onCameraAimConfirm(true)" @cancel="($event) => onCameraAimConfirm(false)">
|
|
|
|
|
+ <template #formContent>
|
|
|
|
|
+ <div class="form-content">
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <span class="form-label">camera type:</span>
|
|
|
|
|
+ <a-select v-model:value="cameraAimPopoverData.cameraType" style="width: 120px"
|
|
|
|
|
+ :options="CameraTypeOptions"></a-select>
|
|
|
</div>
|
|
</div>
|
|
|
<div>
|
|
<div>
|
|
|
<span class="form-label">locked:</span>
|
|
<span class="form-label">locked:</span>
|
|
|
- <a-switch v-model:checked="cameraAimPopoverData.locked"/>
|
|
|
|
|
|
|
+ <a-switch v-model:checked="cameraAimPopoverData.locked" />
|
|
|
</div>
|
|
</div>
|
|
|
<div>
|
|
<div>
|
|
|
<span class="form-label">x:</span>
|
|
<span class="form-label">x:</span>
|
|
|
- <a-input-number v-model:value="cameraAimPopoverData.x" :min="0" :max="1"/>
|
|
|
|
|
|
|
+ <a-input-number v-model:value="cameraAimPopoverData.x" :min="0" :max="1" />
|
|
|
</div>
|
|
</div>
|
|
|
<div>
|
|
<div>
|
|
|
<span class="form-label">y:</span>
|
|
<span class="form-label">y:</span>
|
|
|
- <a-input-number v-model:value="cameraAimPopoverData.y" :min="0" :max="1"/>
|
|
|
|
|
|
|
+ <a-input-number v-model:value="cameraAimPopoverData.y" :min="0" :max="1" />
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -267,9 +243,9 @@
|
|
|
<span class="word" @click=";">AIM</span>
|
|
<span class="word" @click=";">AIM</span>
|
|
|
</Button>
|
|
</Button>
|
|
|
</DroneControlPopover>
|
|
</DroneControlPopover>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
<!-- 信息提示 -->
|
|
<!-- 信息提示 -->
|
|
|
<DroneControlInfoPanel :message="drcInfo"></DroneControlInfoPanel>
|
|
<DroneControlInfoPanel :message="drcInfo"></DroneControlInfoPanel>
|
|
|
</div>
|
|
</div>
|
|
@@ -320,7 +296,7 @@ const {
|
|
|
sendDockControlCmd
|
|
sendDockControlCmd
|
|
|
} = useDockControl()
|
|
} = useDockControl()
|
|
|
|
|
|
|
|
-async function sendControlCmd (cmdItem: DeviceCmdItem, index: number) {
|
|
|
|
|
|
|
+async function sendControlCmd(cmdItem: DeviceCmdItem, index: number) {
|
|
|
cmdItem.loading = true
|
|
cmdItem.loading = true
|
|
|
const result = await sendDockControlCmd({
|
|
const result = await sendDockControlCmd({
|
|
|
sn: props.sn,
|
|
sn: props.sn,
|
|
@@ -350,7 +326,7 @@ const flyToPointPopoverData = reactive({
|
|
|
maxSpeed: MAX_SPEED,
|
|
maxSpeed: MAX_SPEED,
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
-function onShowFlyToPopover () {
|
|
|
|
|
|
|
+function onShowFlyToPopover() {
|
|
|
flyToPointPopoverData.visible = !flyToPointPopoverData.visible
|
|
flyToPointPopoverData.visible = !flyToPointPopoverData.visible
|
|
|
flyToPointPopoverData.loading = false
|
|
flyToPointPopoverData.loading = false
|
|
|
flyToPointPopoverData.latitude = null
|
|
flyToPointPopoverData.latitude = null
|
|
@@ -358,7 +334,7 @@ function onShowFlyToPopover () {
|
|
|
flyToPointPopoverData.height = null
|
|
flyToPointPopoverData.height = null
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-async function onFlyToConfirm (confirm: boolean) {
|
|
|
|
|
|
|
+async function onFlyToConfirm(confirm: boolean) {
|
|
|
if (confirm) {
|
|
if (confirm) {
|
|
|
if (!flyToPointPopoverData.height || !flyToPointPopoverData.latitude || !flyToPointPopoverData.longitude) {
|
|
if (!flyToPointPopoverData.height || !flyToPointPopoverData.latitude || !flyToPointPopoverData.longitude) {
|
|
|
message.error('Input error')
|
|
message.error('Input error')
|
|
@@ -381,7 +357,7 @@ async function onFlyToConfirm (confirm: boolean) {
|
|
|
flyToPointPopoverData.visible = false
|
|
flyToPointPopoverData.visible = false
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-async function onStopFlyToPoint () {
|
|
|
|
|
|
|
+async function onStopFlyToPoint() {
|
|
|
await stopFlyToPoint(props.sn)
|
|
await stopFlyToPoint(props.sn)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -402,7 +378,7 @@ const takeoffToPointPopoverData = reactive({
|
|
|
commanderFlightHeight: null as null | number,
|
|
commanderFlightHeight: null as null | number,
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
-function onShowTakeoffToPointPopover () {
|
|
|
|
|
|
|
+function onShowTakeoffToPointPopover() {
|
|
|
takeoffToPointPopoverData.visible = !takeoffToPointPopoverData.visible
|
|
takeoffToPointPopoverData.visible = !takeoffToPointPopoverData.visible
|
|
|
takeoffToPointPopoverData.loading = false
|
|
takeoffToPointPopoverData.loading = false
|
|
|
takeoffToPointPopoverData.latitude = null
|
|
takeoffToPointPopoverData.latitude = null
|
|
@@ -417,14 +393,14 @@ function onShowTakeoffToPointPopover () {
|
|
|
takeoffToPointPopoverData.commanderFlightHeight = null
|
|
takeoffToPointPopoverData.commanderFlightHeight = null
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-async function onTakeoffToPointConfirm (confirm: boolean) {
|
|
|
|
|
|
|
+async function onTakeoffToPointConfirm(confirm: boolean) {
|
|
|
if (confirm) {
|
|
if (confirm) {
|
|
|
if (!takeoffToPointPopoverData.height ||
|
|
if (!takeoffToPointPopoverData.height ||
|
|
|
- !takeoffToPointPopoverData.latitude ||
|
|
|
|
|
- !takeoffToPointPopoverData.longitude ||
|
|
|
|
|
- !takeoffToPointPopoverData.securityTakeoffHeight ||
|
|
|
|
|
- !takeoffToPointPopoverData.rthAltitude ||
|
|
|
|
|
- !takeoffToPointPopoverData.commanderFlightHeight) {
|
|
|
|
|
|
|
+ !takeoffToPointPopoverData.latitude ||
|
|
|
|
|
+ !takeoffToPointPopoverData.longitude ||
|
|
|
|
|
+ !takeoffToPointPopoverData.securityTakeoffHeight ||
|
|
|
|
|
+ !takeoffToPointPopoverData.rthAltitude ||
|
|
|
|
|
+ !takeoffToPointPopoverData.commanderFlightHeight) {
|
|
|
message.error('Input error')
|
|
message.error('Input error')
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
@@ -463,7 +439,7 @@ useMqtt(deviceTopicInfo)
|
|
|
// })
|
|
// })
|
|
|
const flightController = ref(false)
|
|
const flightController = ref(false)
|
|
|
|
|
|
|
|
-async function onClickFightControl () {
|
|
|
|
|
|
|
+async function onClickFightControl() {
|
|
|
if (flightController.value) {
|
|
if (flightController.value) {
|
|
|
exitFlightCOntrol()
|
|
exitFlightCOntrol()
|
|
|
return
|
|
return
|
|
@@ -472,7 +448,7 @@ async function onClickFightControl () {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 进入飞行控制
|
|
// 进入飞行控制
|
|
|
-async function enterFlightControl () {
|
|
|
|
|
|
|
+async function enterFlightControl() {
|
|
|
try {
|
|
try {
|
|
|
const { code, data } = await postDrcEnter({
|
|
const { code, data } = await postDrcEnter({
|
|
|
client_id: clientId.value,
|
|
client_id: clientId.value,
|
|
@@ -497,7 +473,7 @@ async function enterFlightControl () {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 退出飞行控制
|
|
// 退出飞行控制
|
|
|
-async function exitFlightCOntrol () {
|
|
|
|
|
|
|
+async function exitFlightCOntrol() {
|
|
|
try {
|
|
try {
|
|
|
const { code } = await postDrcExit({
|
|
const { code } = await postDrcExit({
|
|
|
client_id: clientId.value,
|
|
client_id: clientId.value,
|
|
@@ -522,11 +498,11 @@ const {
|
|
|
resetControlState,
|
|
resetControlState,
|
|
|
} = useManualControl(deviceTopicInfo, flightController)
|
|
} = useManualControl(deviceTopicInfo, flightController)
|
|
|
|
|
|
|
|
-function onMouseDown (type: KeyCode) {
|
|
|
|
|
|
|
+function onMouseDown(type: KeyCode) {
|
|
|
handleKeyup(type)
|
|
handleKeyup(type)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function onMouseUp () {
|
|
|
|
|
|
|
+function onMouseUp() {
|
|
|
resetControlState()
|
|
resetControlState()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -611,7 +587,7 @@ const {
|
|
|
cameraAim,
|
|
cameraAim,
|
|
|
} = usePayloadControl()
|
|
} = usePayloadControl()
|
|
|
|
|
|
|
|
-async function onAuthPayload () {
|
|
|
|
|
|
|
+async function onAuthPayload() {
|
|
|
const result = await authPayload(props.sn, payloadSelectInfo.payloadIndex)
|
|
const result = await authPayload(props.sn, payloadSelectInfo.payloadIndex)
|
|
|
if (result) {
|
|
if (result) {
|
|
|
payloadControlSource.value = ControlSource.A
|
|
payloadControlSource.value = ControlSource.A
|
|
@@ -624,13 +600,13 @@ const gimbalResetPopoverData = reactive({
|
|
|
resetMode: null as null | GimbalResetMode,
|
|
resetMode: null as null | GimbalResetMode,
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
-function onShowGimbalResetPopover () {
|
|
|
|
|
|
|
+function onShowGimbalResetPopover() {
|
|
|
gimbalResetPopoverData.visible = !gimbalResetPopoverData.visible
|
|
gimbalResetPopoverData.visible = !gimbalResetPopoverData.visible
|
|
|
gimbalResetPopoverData.loading = false
|
|
gimbalResetPopoverData.loading = false
|
|
|
gimbalResetPopoverData.resetMode = null
|
|
gimbalResetPopoverData.resetMode = null
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-async function onGimbalResetConfirm (confirm: boolean) {
|
|
|
|
|
|
|
+async function onGimbalResetConfirm(confirm: boolean) {
|
|
|
if (confirm) {
|
|
if (confirm) {
|
|
|
if (gimbalResetPopoverData.resetMode === null) {
|
|
if (gimbalResetPopoverData.resetMode === null) {
|
|
|
message.error('Please select reset mode')
|
|
message.error('Please select reset mode')
|
|
@@ -648,7 +624,7 @@ async function onGimbalResetConfirm (confirm: boolean) {
|
|
|
gimbalResetPopoverData.visible = false
|
|
gimbalResetPopoverData.visible = false
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-async function onSwitchCameraMode () {
|
|
|
|
|
|
|
+async function onSwitchCameraMode() {
|
|
|
if (!checkPayloadAuth(payloadSelectInfo.controlSource)) {
|
|
if (!checkPayloadAuth(payloadSelectInfo.controlSource)) {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
@@ -659,21 +635,21 @@ async function onSwitchCameraMode () {
|
|
|
})
|
|
})
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-async function onTakeCameraPhoto () {
|
|
|
|
|
|
|
+async function onTakeCameraPhoto() {
|
|
|
if (!checkPayloadAuth(payloadSelectInfo.controlSource)) {
|
|
if (!checkPayloadAuth(payloadSelectInfo.controlSource)) {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
await takeCameraPhoto(props.sn, payloadSelectInfo.payloadIndex)
|
|
await takeCameraPhoto(props.sn, payloadSelectInfo.payloadIndex)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-async function onStartCameraRecording () {
|
|
|
|
|
|
|
+async function onStartCameraRecording() {
|
|
|
if (!checkPayloadAuth(payloadSelectInfo.controlSource)) {
|
|
if (!checkPayloadAuth(payloadSelectInfo.controlSource)) {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
await startCameraRecording(props.sn, payloadSelectInfo.payloadIndex)
|
|
await startCameraRecording(props.sn, payloadSelectInfo.payloadIndex)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-async function onStopCameraRecording () {
|
|
|
|
|
|
|
+async function onStopCameraRecording() {
|
|
|
if (!checkPayloadAuth(payloadSelectInfo.controlSource)) {
|
|
if (!checkPayloadAuth(payloadSelectInfo.controlSource)) {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
@@ -687,14 +663,14 @@ const zoomFactorPopoverData = reactive({
|
|
|
zoomFactor: null as null | number,
|
|
zoomFactor: null as null | number,
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
-function onShowZoomFactorPopover () {
|
|
|
|
|
|
|
+function onShowZoomFactorPopover() {
|
|
|
zoomFactorPopoverData.visible = !zoomFactorPopoverData.visible
|
|
zoomFactorPopoverData.visible = !zoomFactorPopoverData.visible
|
|
|
zoomFactorPopoverData.loading = false
|
|
zoomFactorPopoverData.loading = false
|
|
|
zoomFactorPopoverData.cameraType = null
|
|
zoomFactorPopoverData.cameraType = null
|
|
|
zoomFactorPopoverData.zoomFactor = null
|
|
zoomFactorPopoverData.zoomFactor = null
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-async function onZoomFactorConfirm (confirm: boolean) {
|
|
|
|
|
|
|
+async function onZoomFactorConfirm(confirm: boolean) {
|
|
|
if (confirm) {
|
|
if (confirm) {
|
|
|
if (!zoomFactorPopoverData.zoomFactor || zoomFactorPopoverData.cameraType === null) {
|
|
if (!zoomFactorPopoverData.zoomFactor || zoomFactorPopoverData.cameraType === null) {
|
|
|
message.error('Please input Zoom Factor')
|
|
message.error('Please input Zoom Factor')
|
|
@@ -722,7 +698,7 @@ const cameraAimPopoverData = reactive({
|
|
|
y: null as null | number,
|
|
y: null as null | number,
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
-function onShowCameraAimPopover () {
|
|
|
|
|
|
|
+function onShowCameraAimPopover() {
|
|
|
cameraAimPopoverData.visible = !cameraAimPopoverData.visible
|
|
cameraAimPopoverData.visible = !cameraAimPopoverData.visible
|
|
|
cameraAimPopoverData.loading = false
|
|
cameraAimPopoverData.loading = false
|
|
|
cameraAimPopoverData.cameraType = null
|
|
cameraAimPopoverData.cameraType = null
|
|
@@ -731,15 +707,15 @@ function onShowCameraAimPopover () {
|
|
|
cameraAimPopoverData.y = null
|
|
cameraAimPopoverData.y = null
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function openLivestreamOthers () {
|
|
|
|
|
|
|
+function openLivestreamOthers() {
|
|
|
store.commit('SET_LIVESTREAM_OTHERS_VISIBLE', true)
|
|
store.commit('SET_LIVESTREAM_OTHERS_VISIBLE', true)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-function openLivestreamAgora () {
|
|
|
|
|
|
|
+function openLivestreamAgora() {
|
|
|
store.commit('SET_LIVESTREAM_AGORA_VISIBLE', true)
|
|
store.commit('SET_LIVESTREAM_AGORA_VISIBLE', true)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-async function onCameraAimConfirm (confirm: boolean) {
|
|
|
|
|
|
|
+async function onCameraAimConfirm(confirm: boolean) {
|
|
|
if (confirm) {
|
|
if (confirm) {
|
|
|
if (cameraAimPopoverData.cameraType === null || cameraAimPopoverData.x === null || cameraAimPopoverData.y === null) {
|
|
if (cameraAimPopoverData.cameraType === null || cameraAimPopoverData.x === null || cameraAimPopoverData.y === null) {
|
|
|
message.error('Input error')
|
|
message.error('Input error')
|
|
@@ -772,10 +748,10 @@ watch(() => errorInfo, (errorInfo) => {
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang='scss' scoped>
|
|
<style lang='scss' scoped>
|
|
|
-.drone-control-wrapper{
|
|
|
|
|
|
|
+.drone-control-wrapper {
|
|
|
// border-bottom: 1px solid #515151;
|
|
// border-bottom: 1px solid #515151;
|
|
|
|
|
|
|
|
- .drone-control-header{
|
|
|
|
|
|
|
+ .drone-control-header {
|
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
|
font-weight: 600;
|
|
font-weight: 600;
|
|
|
padding: 10px 10px 0px;
|
|
padding: 10px 10px 0px;
|
|
@@ -784,47 +760,43 @@ watch(() => errorInfo, (errorInfo) => {
|
|
|
.drone-control-box {
|
|
.drone-control-box {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
flex-wrap: 1;
|
|
flex-wrap: 1;
|
|
|
|
|
+
|
|
|
.box {
|
|
.box {
|
|
|
width: 50%;
|
|
width: 50%;
|
|
|
padding: 5px;
|
|
padding: 5px;
|
|
|
- border: 0.5px solid rgba(255,255,255,0.3);
|
|
|
|
|
|
|
+ border: 0.5px solid rgba(255, 255, 255, 0.3);
|
|
|
|
|
|
|
|
.row {
|
|
.row {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
flex-wrap: wrap;
|
|
flex-wrap: wrap;
|
|
|
padding: 2px;
|
|
padding: 2px;
|
|
|
|
|
|
|
|
- + .row{
|
|
|
|
|
|
|
+ +.row {
|
|
|
margin-bottom: 6px;
|
|
margin-bottom: 6px;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- &::v-deep{
|
|
|
|
|
- .ant-btn{
|
|
|
|
|
- font-size: 12px;
|
|
|
|
|
- padding: 0px 4px;
|
|
|
|
|
- margin-right: 5px;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ :deep(.ant-btn) {
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+ padding: 0px 4px;
|
|
|
|
|
+ margin-right: 5px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- .drone-control{
|
|
|
|
|
- &::v-deep{
|
|
|
|
|
|
|
+ .drone-control {
|
|
|
|
|
+ :deep(.ant-select-single:not(.ant-select-customize-input) .ant-select-selector) {
|
|
|
|
|
+ padding: 0 2px;
|
|
|
|
|
|
|
|
- .ant-select-single:not(.ant-select-customize-input) .ant-select-selector{
|
|
|
|
|
- padding: 0 2px;
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- .drone-control-direction{
|
|
|
|
|
|
|
+ .drone-control-direction {
|
|
|
margin-right: 10px;
|
|
margin-right: 10px;
|
|
|
|
|
|
|
|
.ant-btn {
|
|
.ant-btn {
|
|
|
- // padding: 0px 1px;
|
|
|
|
|
margin-right: 0;
|
|
margin-right: 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- .word{
|
|
|
|
|
|
|
+ .word {
|
|
|
width: 12px;
|
|
width: 12px;
|
|
|
margin-left: 2px;
|
|
margin-left: 2px;
|
|
|
font-size: 12px;
|
|
font-size: 12px;
|